ShadowQ Posted January 24, 2021 Share Posted January 24, 2021 Есть счетчик постов рядом с каждой категорией форума на главной. Как сделать чтобы показывал и счетчик тем?. Дизайн дефолтный. Спасибо) Quote Link to comment Share on other sites More sharing options...
SlawkA Posted January 24, 2021 Share Posted January 24, 2021 ShadowQ Спойлер <i class="fa fa-comments fa-lg" aria-hidden="true"> </i> {lang="Тем:"} <strong> {{if $forum->hasChildren()}}{{$cSubTopics = 0;}}{{foreach $forum->children() as $subforum}}{{$cSubTopics += $subforum->topics;}}{{endforeach}}{{$cTopics = $forum->topics + $cSubTopics;}}{number="$cTopics"}{{else}}{{$cTopics = $forum->topics;}}{number="$cTopics"}{{endif}}</strong> <br/><br/> {{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}} <i class="fa fa-envelope-o fa-lg" aria-hidden="true"></i> <span>{lang="Сообщения:"}</span> <strong>{number="$count"}</strong> Спойлер Quote Link to comment Share on other sites More sharing options...
ShadowQ Posted January 24, 2021 Author Share Posted January 24, 2021 3 часа назад, SlawkA сказал: ShadowQ Показать контент <i class="fa fa-comments fa-lg" aria-hidden="true"> </i> {lang="Тем:"} <strong> {{if $forum->hasChildren()}}{{$cSubTopics = 0;}}{{foreach $forum->children() as $subforum}}{{$cSubTopics += $subforum->topics;}}{{endforeach}}{{$cTopics = $forum->topics + $cSubTopics;}}{number="$cTopics"}{{else}}{{$cTopics = $forum->topics;}}{number="$cTopics"}{{endif}}</strong> <br/><br/> {{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}} <i class="fa fa-envelope-o fa-lg" aria-hidden="true"></i> <span>{lang="Сообщения:"}</span> <strong>{number="$count"}</strong> Показать контент Спасибо, заработало:) У меня чет тут нету кнопки такой, отблагодарить репой:). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.