Posted 22 апреля, 20222 yr Hey guys, is there a way to show achievement progress on member profile? To show like: " 999 points untill next rank"
22 апреля, 20222 yr странный вопрос, ты же темы делаешь. посмотри, как реализовано в шаблоне userbar.
22 апреля, 20222 yr Author Yes, in the userbar is shown like that: But I wanted to show in the profile or over here in the postContainer. If it's not possible, that's ok though.
23 апреля, 20222 yr newload Отредактируйте шаблон, затем откройте файл Postcontainer и поместите следующий код в нужное место (119). {{if $nextRank = member.nextRank()}} <div class='ipsMargin_top:half'> <div> <div class='ipsAchievementsProgress'> <div style='width: calc({expression="\IPS\Member::loggedIn()->achievements_points"} / {$nextRank->points} * 100%)'></div> </div> </div> <div class='ipsType_small ipsType_light'>{lang="achievements_next_rank" pluralize="$nextRank->points - \IPS\Member::loggedIn()->achievements_points"}</div> </div> {{endif}} Edited 23 апреля, 20222 yr by LoveHate
23 апреля, 20222 yr Author 5 hours ago, LoveHate said: newload Edit the template, then open the Postcontainer and place the following code in the correct place (119). Works but it doesn't XD It shows the same progress number to everyone else. For example, I need 64 points to the next rank It also show the same value to the other members XD
23 апреля, 20222 yr $comment->author()->achievements_points, not \IPS\Member::loggedIn()->achievements_points
23 апреля, 20222 yr Author 8 minutes ago, Desti said: $comment->author()->achievements_points , not \IPS\Member::loggedIn()->achievements_points Great, worked out! Thanks!! 😁
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.