Zero108 Posted May 26, 2018 Share Posted May 26, 2018 (edited) Как в виджет статистики приложения Форумы добавить суммарное количество просмотров всех тем всех форумов? Виджет статистики форума:По аналогии, как делали с блогами: Edited May 26, 2018 by Zero108 Link to comment Share on other sites More sharing options...
newbie Posted May 27, 2018 Share Posted May 27, 2018 как делали с блогами:Почти также. Только редактировать нужно шаблон forumStatistics и файл \applications\forums\widgets\forumStatistics.php$stats['total_topics'] = \IPS\Db::i()->select( "COUNT(*)", 'forums_topics', array( 'approved = ?', 1 ) )->first();заменить на $stats = array_merge($stats, \IPS\Db::i()->select( "COUNT(*) as total_topics, SUM(views) AS total_topics_views", 'forums_topics', array( 'approved = ?', 1 ) )->first()); В шаблоне использовать $stats['total_topics_views'] 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now