send_email_to_user_link

NAML documentation   Watch a video
   Usages of this macro
... in send_email_to_user_link.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<override_macro name="send_email_to_user_link" requires="user">
    <n.set_local_user
Macro
Parameters: user
.this_user
Binary
Namespace: UserNamespace
Parameters: do
 />
    <!-- If this is not the profile of the visitor AND the user is authenticated -->
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.not
Binary
Namespace: BasicNamespace
Parameters: condition
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.equals
Binary
Namespace: UserNamespace
Parameters: user
.local_user
Macro
Parameters: do
/]" condition2="[n.local_user
Macro
Parameters: do
.is_authenticated
Binary
Namespace: UserNamespace
/]">
        <then>
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.is_emailer
Macro
Requires: user
>
                <then>
                    <div style="margin-top:.5em">
                        <img src="/images/mail.png" align="absmiddle" width="18" height="13"/>
                        <a href="[n.local_user
Macro
Parameters: do
.send_email_path
Macro
Requires: user
/]"><t>Send Email to <t.author.local_user
Macro
Parameters: do
.name
Binary
Namespace: UserNamespace
Parameters: truncate
/></t></a> (This will reveal your email address.)
                    </div>
                </then>
                <else>
                    <div style="margin-top:.5em">
                        You do not have email privileges. If you are a new user, see <a href="http://www.growspice.com/Getting-started-td600.html">Getting started</a>.
                    </div>
                </else>
            </n.if.visitor.is_emailer>
        </then>
    </n.if.both>
</override_macro>
Overrides default macro
... in user_profile.naml
222
223
224
225
226
227
228
229
230
231
232
233
<macro name="send_email_to_user_link" requires="user">
    <n.set_local_user.this_user />
    <!-- If this is not the profile of the visitor AND the user is authenticated -->
    <n.if.both condition1="[n.not.visitor.equals.local_user/]" condition2="[n.local_user.is_authenticated/]">
        <then>
            <div style="margin-top:.5em">
                <img src="/images/mail.png" align="absmiddle" width="18" height="13"/>
                <a href="[n.local_user.send_email_path/]"><t>Send Email to <t.author.local_user.name/></t></a>
            </div>
        </then>
    </n.if.both>
</macro>
Feedback, Links, Privacy, Rules, Support