Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Removing guest users email address from posts?

Quote Reply
Removing guest users email address from posts?
I don't really want the guest users address to be visible in the forums. Which templates should I edit? I thought I'd comment out the code that displays the address when viewing messages. Perhaps this could be added as an option in a future release?

Jason
Quote Reply
Re: [wickedmoon] Removing guest users email address from posts? In reply to
Try include_post_display.html

Remove:

Code:
<%if post_anonymous_email%>
<a href="mailto:<%post_anonymous_email%>"><%post_anonymous_email%></a>
<br>

You will also need to do the same in the default_top template set:

Code:
<%if post_anonymous_email%>
<br>
<a href="mailto:<%post_anonymous_email%>"><%post_anonymous_email%></a>
<%endif%>

I haven't done this myself as we don't allow guest access but it looks like the relevant part. Try it and see if it works.
Quote Reply
Re: [MJB] Removing guest users email address from posts? In reply to
Thanks, that works great.

Jason
Quote Reply
Re: [wickedmoon] Removing guest users email address from posts? In reply to
I just took a look at your forum and I have another tip that you might want to use.

Where you have a Private Reply link, adding the following will only display that link whan someone is logged in:

Code:
<%if current_user_id and not preview and not deleteview and not printing%>
<a href="gforum.cgi?do=message;user=<%user_id%>">Private Reply</a>
<%endif%>

Cool
Quote Reply
Re: [MJB] Removing guest users email address from posts? In reply to
Cool, that has been bugging me for a while :)

Jason
Quote Reply
Re: [MJB] Removing guest users email address from posts? In reply to
The plugin uses this code:

Code:
<%if user_accept_privmsg%><a href="gforum.cgi?do=message_post_reply_write;post=<%post_id%>;<%hidden_query%>">Private Reply</a><%endif>

How do you combine that with yours, the plugin code seems to benefit from options not present in what you gave me?

Jason
Quote Reply
Re: [wickedmoon] Removing guest users email address from posts? In reply to
I'm not using a plugin, it's just code that I added myself to the post display so it was easier for users to find the PM link.