Jump to content

Featured Replies

Posted
comment_180487

Hey guys, is there a way to show achievement progress on member profile?

To show like: " 999 points untill next rank" 

  • Author
comment_180494

Yes, in the userbar is shown like that:

1639388892_CapturadeTela2022-04-22as19_40_54.png.6f92889bbeb5877549be16f68155560b.png

 

But I wanted to show in the profile or over here in the postContainer.

600471727_CapturadeTela2022-04-22as19_41_56.png.c57034827e8d0b04160975442ef87d8a.png

 

If it's not possible, that's ok though.

 

 

comment_180504

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 by LoveHate

  • Author
comment_180509
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

  • Author
comment_180511
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.


Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.