Rank System
Posted by
Pedro on
Feb 21, 2014; 10:34pm
URL: https://support.nabble.com/Rank-System-tp7589491.html
This is possible with
NAML. A very simple change is:
(1) Open the NAML code of your app (click on the "See how NAML generates this page" link on the footer)
(2) Find the
post_count_js macro (click on the options dropdown and then "Search macros")
(3) Enter the code below and edit it as you want:
<override_macro name="post_count_js">
<n.param_loop. param="postCount">
<n.if.not.page_user.is_deactivated>
<then>
var $div = $('div.post-count<n.page_user.user_tag_id/>');
$div.html('<n.one_or_many n="[n.page_user.post_count_value/]" one_text="[t]post[/t]" many_text="[t]posts[/t]"/>');
$div.append("<br/>");
var postCount = <n.page_user.post_count_value/>;
if (postCount > 300)
$div.append("Elite Member");
else if (postCount > 200)
$div.append("Guru");
else if (postCount > 100)
$div.append("Master");
else if (postCount > 50)
$div.append("Helper");
else
$div.append("Newbie");
</then>
</n.if.not.page_user.is_deactivated>
</n.param_loop.>
</override_macro>