LoveHate 0 Posted May 8, 2023 Report Share Posted May 8, 2023 hi I use below code to show user's rank level in postbit and everything good works: {{if $comment->author()->canHaveAchievements() and \IPS\core\Achievements\Rank::show() and \IPS\core\Achievements\Rank::getStore() and $rank = $comment->author()->rank()}} <div class="postlevel"> {{if $nextRank = $comment->author()->nextRank()}} <div class="postlevel_content"> <span class="postlevel_levels">{$rank->rankPosition()['pos']} level</span> <span class="postlevel_exp" ><b>{$comment->author()->achievements_points}</b> / {$nextRank->points}</span> </div> <div class="postlevel_progress"> <div class="postlevel_progress_bar" style="width: calc({expression='$comment->author()->achievements_points'} / {$nextRank->points} * 100%);"></div> </div> {{endif}} </div> {{endif}} I want to put these codes in a new HTML template file and call them using the following method in postcontainer, but I get an error. {template="pos_ranks" app="core" group="xxx" location="front" params=""} what do I do? thanks! Обратиться 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.