Page 4 of 4

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

Posted: Wed Mar 21, 2012 3:34 pm
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

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

Posted: Wed Mar 21, 2012 3:51 pm
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. :)

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

Posted: Wed Mar 21, 2012 4:05 pm
by Don Chambers
I think its time for a beer! :mrgreen:

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

Posted: Wed Mar 21, 2012 4:19 pm
by Bernardo
Don Chambers wrote:I think its time for a beer! :mrgreen:
Yup...cheers! :mrgreen:

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

Posted: Wed Mar 21, 2012 4:51 pm
by Timbalu
Good boys!

Maybe thats worth adding a note to the wiki!

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

Posted: Wed Mar 21, 2012 5:27 pm
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: