"Send Email to" should be visible only to the admin

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

"Send Email to" should be visible only to the admin

Priyanka_Mallu
Hi Pedro,

I want "Send Email" option to be disabled for visitors.
Only the admin should have the option to "send email".

So how do I go about it?

Thank you,

Regards,
Priyanka
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Send Email to" should be visible only to the admin

Pedro <Nabble>
Do you mean the "Send Email to..." option at the profile page?
My test forum.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Send Email to" should be visible only to the admin

Priyanka_Mallu
Yes Pedro.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Send Email to" should be visible only to the admin

Pedro <Nabble>
<override_macro name="send_email_to_user_link" requires="user">
    <n.set_local_user.this_user />
     <!-- If visitor is admin -->
    <n.if.visitor.is_site_admin>
        <then>
            <!-- 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>
        </then>
    </n.if.visitor.is_site_admin>
</override_macro>
My test forum.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Send Email to" should be visible only to the admin

Priyanka_Mallu
Awesome,Thanks Pedro !!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Send Email to" should be visible only to the admin

Priyanka_Mallu
In reply to this post by Pedro <Nabble>
Pedro could look into this question as well.
http://support.nabble.com/Disable-quot-Online-Indicator-quot-td7589737.html
Thanks a ton.
Loading...