Way to indicate comments made by (logged in) user/admin

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Bernardo
Regular
Posts: 37
Joined: Sat Jan 09, 2010 8:39 pm

Re: Way to indicate comments made by (logged in) user/admin

Post by Bernardo »

Don Chambers wrote:I think I have the answer as to why Timbalu sees email, clear_email, etc, and I do not.... I have the anti-spam plugin configured to hide email addresses. When configured to hide email addresses, a logged in admin will still have access to $comment.email and $comment.clear_email. When logged out, these are not available. If anti-spam plugin is configured to show email addresses, they are always available.
I can verify this. My spam plugin is configured to hide mail addresses.
Don Chambers wrote:If you did want the email addresses hidden from the public, you could configure the plugin to show them, but modify your tpl so they are never actually shown. Then you could perform your conditional test on $comment.clear_email.
That's a good idea. I will give it a try...

Thanks for your investigative help! :D
Bernardo
Regular
Posts: 37
Joined: Sat Jan 09, 2010 8:39 pm

Re: Way to indicate comments made by (logged in) user/admin

Post by Bernardo »

Works perfect with the following code:

Code: Select all

<div class="serendipity_comment_source{if $comment.clear_email == 'runzheimer@googlemail.com'}_admin{/if} icon_link">

Code: Select all

<span class="comment_source_author">
    {if $entry.is_entry_owner}
        <a href="mailto:{$comment.email}">
    {/if}
        {$comment.author|@default:$CONST.ANONYMOUS}
    {if $entry.is_entry_owner}
        </a>
    {/if}
</span>
That way, mail addresses are only shown to the (logged in) entry owner. :)
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Way to indicate comments made by (logged in) user/admin

Post by Don Chambers »

I think its time for a beer! :mrgreen:
=Don=
Bernardo
Regular
Posts: 37
Joined: Sat Jan 09, 2010 8:39 pm

Re: Way to indicate comments made by (logged in) user/admin

Post by Bernardo »

Don Chambers wrote:I think its time for a beer! :mrgreen:
Yup...cheers! :mrgreen:
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Way to indicate comments made by (logged in) user/admin

Post by Timbalu »

Good boys!

Maybe thats worth adding a note to the wiki!
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Way to indicate comments made by (logged in) user/admin

Post by Don Chambers »

Timbalu wrote:Good boys!

Maybe thats worth adding a note to the wiki!
You played the pivotal role here! Never would have solved it without your posts.... which got me thinking about how you could see those, but I was not. BINGO!

Damn event plugins!!! LOL!! :mrgreen:
=Don=
Post Reply