SFIbis | NAML - post_count_js

post_count_js

NAML documentation   Watch a video
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "post_count_js".
... in post_count_js.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<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]"/>');  
                  
                var icon = "<img alt='' src='images/icon_starred.png' width='10px' height='10px' />"  
                  
                $div.append("<br/>");  
                var postCount = <n.page_user.post_count_value/>;  
                if (postCount > 200)  
                $div.append("Master<br/>"+icon+icon+icon+icon);  
                else if (postCount > 50)  
                $div.append("Senior Member<br/>"+icon+icon+icon);  
                else if (postCount > 30)  
                $div.append("Junior Member"+icon+icon);  
                else if (postCount > 10)  
                $div.append("Newbie"+icon);  
                  
            </then>  
        </n.if.not.page_user.is_deactivated>  
    </n.param_loop.>  
</override_macro>
Overrides default macro
... in topic.naml
602
603
604
605
606
607
608
609
610
611
<macro name="post_count_js">
    <n.param_loop. param="postCount">
        <n.if.not.page_user.is_deactivated>
            <then>
                $('div.post-count<n.page_user.user_tag_id/>')
                    .html('<n.one_or_many n="[n.page_user.post_count_value/]" one_text="[t]post[/t]" many_text="[t]posts[/t]"/>');
            </then>
        </n.if.not.page_user.is_deactivated>
    </n.param_loop.>
</macro>