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
25
26
27
28
29
<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 > 1000)
                    $div.append("Super Farmer");
                else if (postCount > 500)
                    $div.append("Crop Master");
                else if (postCount > 300)
                    $div.append("Agriculturalist");
                else if (postCount > 200)
                    $div.append("Farmer");
                else if (postCount > 100)
                    $div.append("Rancher");
                else if (postCount > 50)
                    $div.append("Farm Hand");
                else if (postCount > 20)
                    $div.append("Cowpoke");
                else
                    $div.append("Sprout");
            </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>