aLEX49566 2 07/04/2024 05:22 AM (edited) Всем привет. Подскажите, кто знает, как вывести в постконтейнере, под аватаром, количество созданных тем юзером/админом? На подобие того, как выводится кол-во созданных сообщений. Вроде не сложно, но мозг не поворачивается Edited July 4, 2024 by aLEX49566 Share this post Link to post
aLEX49566 2 07/04/2024 07:44 AM (edited) Сделал так: <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="member_post_count" pluralize="$comment->author()->member_posts"}" data-ipsTooltip class="ipsType_blendLinks"> {{$where[] = "starter_id = " . $comment->author()->member_id;}} {{$author_topics = \IPS\forums\Topic::getItemsWithPermission( $where, NULL, 0 );}} <i class="fa fa-comment"></i> {{$topics_count = count($author_topics);}} {$topics_count} </a> Но перекидывает при нажатии на темы, а в сообщения. При наведении тоже показывает не темы а сообщения. Edited July 5, 2024 by Lesovsky Share this post Link to post
aLEX49566 2 07/04/2024 07:45 AM Если бы кто с этими двумя моментами помог, был бы приемного благодарен! Share this post Link to post
aLEX49566 2 07/06/2024 08:37 PM (edited) Пишу с телефона, а тут кодом не вставить( Для пк: <li> {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) }} <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="member_post_count" pluralize="$comment->author()->member_posts"}" data-ipsTooltip class="ipsType_blendLinks"> {{endif}} <i class="fa fa-comments"></i> {number="$comment->author()->member_posts" format="short"} {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) }} </a> {{endif}} </li> <li> <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content&type=forums_topic&change_section=1" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="User_Created_Themes"}" data-ipsTooltip class="ipsType_blendLinks"> {{$where[] = "starter_id = " . $comment->author()->member_id;}} {{$author_topics = \IPS\forums\Topic::getItemsWithPermission( $where, NULL, 0 );}} <i class="fa fa-comment"></i> {{$topics_count = count($author_topics);}} {$topics_count} </a> </li> для моб: <h3 class='ipsComment_author ipsType_blendLinks'> {template="userLink" app="core" group="global" params="$comment->author(), $comment->warningRef(), NULL, $comment->isAnonymous()"} {template="reputationBadge" group="global" app="core" params="$comment->author()"} {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) }} <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="member_post_count" pluralize="$comment->author()->member_posts"}" data-ipsTooltip class="ipsType_blendLinks ipsRepBadge"> {{endif}} <i class="fa fa-comments"></i> {number="$comment->author()->member_posts" format="short"} {{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members', 'front' ) ) }} </a> {{endif}} <a href="{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}&do=content&type=forums_topic&change_section=1" seoTemplate="profile_content" seoTitle="$comment->author()->members_seo_name"}" rel="nofollow" title="{lang="User_Created_Themes"}" data-ipsTooltip class="ipsType_blendLinks ipsRepBadge"> {{$where[] = "starter_id = " . $comment->author()->member_id;}} {{$author_topics = \IPS\forums\Topic::getItemsWithPermission( $where, NULL, 0 );}} <i class="fa fa-comment"></i> {{$topics_count = count($author_topics);}} {$topics_count} </a> </h3> В языки: <word key="User_Created_Themes" js="0">Созданные темы пользователя</word> Результат: Edited July 9, 2024 by Lesovsky 1 Share this post Link to post
Lesovsky 185 07/09/2024 04:55 PM Только по-хорошему нужно указывать в какие шаблоны нужно производить изменения. Share this post Link to post
aLEX49566 2 07/09/2024 10:16 PM (edited) 5 часов назад, Lesovsky сказал: Только по-хорошему нужно указывать в какие шаблоны нужно производить изменения. Согласен. С телефона был. По человечески не вышло(. Как нибудь напишу по человечески : ) Edited July 9, 2024 by aLEX49566 Share this post Link to post