The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Plugins Spam Protector HIDE EMAIL ADDRESSES

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

Postby rj » Fri Nov 05, 2010 12:19 pm

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.

User avatar
garvinhicking
Core Developer
 
Posts: 28954
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Fri Nov 05, 2010 1:13 pm

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/

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

Postby rj » Fri Nov 05, 2010 4:49 pm

Thanx! I will look into that and let you know about my success, or failure!

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

Postby rj » Fri Nov 05, 2010 6:24 pm

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'];

User avatar
kleinerChemiker
Regular
 
Posts: 720
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria

Postby kleinerChemiker » Fri Nov 05, 2010 8:33 pm

garvinhicking wrote:Hi!

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

Regards,
Garvin

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

Postby rj » Fri Nov 05, 2010 9:35 pm

I can't seen to find comments.tpl. What directory is it in?
thanx
RJ

User avatar
yellowled
Regular
 
Posts: 4887
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Fri Nov 05, 2010 11:51 pm

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

/templates/NAME_OF_YOUR_TEMPLATE/

YL

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

Postby rj » Sat Nov 06, 2010 12:17 am

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

User avatar
yellowled
Regular
 
Posts: 4887
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Sat Nov 06, 2010 12:03 pm

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

User avatar
Don Chambers
Regular
 
Posts: 3077
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA

Postby Don Chambers » Mon Nov 08, 2010 4:39 am

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.



Return to Plugins

Who is online

Users browsing this forum: No registered users and 1 guest

cron