Войдите в ACP, перейдите в Темы - Ваша Тема - postContainer
Найдите этот код:
{{if $comment->author()->member_id}}
{template="customFieldsDisplay" group="global" app="core" params="$comment->author()"}
{{endif}}
Над ним добавить:
{{if \IPS\core\Achievements\Badge::show() AND \IPS\core\Achievements\Badge::getStore()}} {{if \count( $comment->author()->recentBadges($badgecount) )}} <li class="ipsType_break"> <div class="ipsResponsive_showDesktop ipsResponsive_block"> <ul class="ipsType_center ipsList_inline ipsList_csv ipsList_noSpacing" style="margin-top: 21px;"> {{foreach $comment->author()->recentBadges(3) as $badge}} <div class="ipc_badges"> {$badge->html( 'ipsDimension ipc_badges_size', TRUE, FALSE )|raw} </div> {{endforeach}} </ul> </div> </li> {{endif}} {{endif}}
Затем добавьте в custom.css:
.ipc_badges {display: inline-block;padding: 5px 3px;} .ipc_badges_size {width: 30px;height: 43px;}
Если вы хотите добавить кнопку для просмотра всех значков пользователя:
{{if \IPS\core\Achievements\Badge::show() AND \IPS\core\Achievements\Badge::getStore()}} {{if \count( $comment->author()->recentBadges($badgecount) )}} <li class="ipsType_break"> <div class="ipsResponsive_showDesktop ipsResponsive_block"> <ul class="ipsType_center ipsList_inline ipsList_csv ipsList_noSpacing" style="margin-top: 21px;"> {{foreach $comment->author()->recentBadges(3) as $badge}} <div class="ipc_badges"> {$badge->html( 'ipsDimension ipc_badges_size', TRUE, FALSE )|raw} </div> {{endforeach}} </ul> </div> </li> <a id="authorBadges" href="{$comment->author()->url()}/badges/" data-ipsdialog="" data-ipsdialog-size="medium">{$comment->author()->name}'s badges</a> {{endif}} {{endif}}
Результат:
Дополнительно:
Если вы хотите изменить количество значков, отображаемых для каждого пользователя, отредактируйте эту полосу.
{{foreach $comment->author()->recentBadges(КОЛИЧЕСТВО) as $badge}}
Recommended Comments
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.