Spam Protector HIDE EMAIL ADDRESSES

Creating and modifying plugins.
Post Reply
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Spam Protector HIDE EMAIL ADDRESSES

Post by rj »

In the list of options there is one that says HIDE EMAIL ADDRESS IN COMMENTS, I have it on YES. When one does a mouse over on the NAME of the person who comments, it shows the email address in the status bar with a (at) and if you click on it, the email edit window comes up with the TO field filled with the email address and the (at).

I think I understand the issue. Spam can't read (at) but bad people can, people who disagree with ones comments. This is American Politics, it is not friendly. :)
Since I forced registration to comment the other day, I am getting bombarded with complaints about this.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by garvinhicking »

Hi!

Edit your comments.tpl template and remove the mail address.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by rj »

Thanx! I will look into that and let you know about my success, or failure!
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by rj »

did you mean comments.php?

And is this the spot where I just do /* on the email line? */

$comment['url'] = $serendipity['POST']['url'];
$comment['comment'] = trim($serendipity['POST']['comment']);
$comment['name'] = $serendipity['POST']['name'];
$comment['email'] = $serendipity['POST']['email'];
$comment['subscribe'] = $serendipity['POST']['subscribe'];
$comment['parent_id'] = $serendipity['POST']['replyTo'];
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by kleinerChemiker »

garvinhicking wrote:Hi!

Edit your comments.tpl template and remove the mail address.

Regards,
Garvin
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by rj »

I can't seen to find comments.tpl. What directory is it in?
thanx
RJ
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by yellowled »

rj wrote:I can't seen to find comments.tpl. What directory is it in?
/templates/NAME_OF_YOUR_TEMPLATE/

YL
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by rj »

That was the first place I looked and there is not such file there.
Oh No!
If fact there are 4 comment tpl files in default and I have none, and a whole bunch of others I dont have. I looked in the last template I used and it has none of them either, that means I have had none of those files for about 3 years now. :(
Is this maybe about plugin I do not use that are being used in the Default?

I looked in the default template and loaded it and found this to be the only email reference

{if $comment.email}
<a href="mailto:{$comment.email}">{$comment.author|@default:$CONST.ANONYMOUS}</a>
{else}
{$comment.author|@default:$CONST.ANONYMOUS}
{/if}

Should I move this file from default to my template and then block the entire IF statement or just part of it?

Thanx for your patience
RJ
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by yellowled »

rj wrote:That was the first place I looked and there is not such file there.
Any .tpl file your template doesn't have is either pulled from /templates/default/ or, if it is a plugin's .tpl file, the plugin's subdirectory in /plugins/. You can individualize these by copying (not moving!) the .tpl file in question to your template's directory. If it's present there, it will be used instead of the original file.
rj wrote:If fact there are 4 comment tpl files in default and I have none
No, there's one comments.tpl in /templates/default.
rj wrote:Is this maybe about plugin I do not use that are being used in the Default?
No. A very simple answer to a potentially complicated question, but usually, templates and plugins don't mix in Serendipity.
rj wrote:Should I move this file from default to my template and then block the entire IF statement or just part of it?
Copy, not move. Copy, then edit. Strip away antyhing from the part you quote but:

Code: Select all

{$comment.author|@default:$CONST.ANONYMOUS}
That should do the trick.

YL
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Spam Protector HIDE EMAIL ADDRESSES

Post by Don Chambers »

There is no need to do this, unless you really want to. YOU, or more specifically, any admin will see something like john.doe [at] wherever.com. The general public does not see this if the option is set to hide email addresses. I have, however, written more than one template that fully removes email addresses because - option or not - I don't think any site owner/admin should ever reveal email addresses to anyone.
=Don=
Post Reply