avatar

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 "avatar".
... in user.naml
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<macro name="avatar" requires="user" parameters="size,group,border_class">
    <n.set_var. name="image_url">
        <n.if.is_banned>
            <then.default_avatar_url size="[n.size/]"/>
            <else.avatar_url size="[n.size/]"/>
        </n.if.is_banned>
    </n.set_var.>
    <n.remove_spaces_between_tags.>
        <n.if.is_empty.group>
            <then>
                <a href="[n.url/]" rel="nofollow" title="[t]View profile of [t.author.name/][/t]" class="nowrap no-decoration">
                    <img class="avatar [n.avatar_border.border_class/]" src="[n.var name='image_url'/]" height="[n.avatar_pixels.size/]" width="[n.avatar_pixels.size/]" alt="[n.name/]" title="[n.name/]"/>
                    <img src="/images/online.png" class="online[n.search_id/] online invisible" title="[t]User is online[/t]" alt="online"/>
                </a>
            </then>
            <else>
                <n.put_in_head.>
                    <script type="text/javascript">
                        var avatarBorder = "<n.avatar_border.border_class/>";
                        var userIsOnline = "<t>User is online</t>";
<![CDATA[
                        Nabble.createAvatar = function(showAvatar, url, id, size) {
                            var dim = size == 'small'? 24 : 100;
                            document.write("<img ");
                            if (showAvatar || showAvatar == null)
                                document.write("src='"+url+"' ");
                            else
                                document.write("src='/images/nop.gif' ");
                            document.write("xsrc='"+url+"' ");
                            document.write("width='"+dim+"' height='"+dim+"' class='"+avatarBorder+" avatar'/>");
                            if (id)
                                document.write('<img src="/images/online.png" class="online'+id+' online invisible" title="'+userIsOnline+'" alt="online"/>');
                        };
]]>
                    </script>
                </n.put_in_head.>
                <span class="avatar[n.group/]">
                    <a href="[n.url/]" rel="nofollow" title="[t]View profile of [t.author.name/][/t]" class="nowrap no-decoration">
                        <script type="text/javascript">
                            Nabble.createAvatar(window.hasAvatar<n.group/>, '<n.var name='image_url'/>', '<n.search_id/>', '<n.size/>');
                        </script>
                    </a>
                </span>
            </else>
        </n.if.is_empty.group>
    </n.remove_spaces_between_tags.>
 
    <n.call_later param="visitorOnline"/>
    <n.call_later value="[n.search_id/]" param="avatarOnline"/>
</macro>