Textpattern Tip: De-Publicizing Commenters' E-mail Addresses

Since I just launched this site with Textpattern, I picked up a few things that could assist you if you too have a Textpattern site.

Today’s tip has to do with protecting your commenters from SPAM (and thereby encouraging copious amounts of conversation, thus increasing traffic, building community, etc.).

The first thing to point out is just how commenters are in danger of becoming recipients of SPAM. When an e-mail address is posted anywhere on a Web site, it can be grabbed by scripts written to harvest these addresses (even when they are encoded using HTML entities, which is Textpattern’s default ‘safety feature’). These addresses are then used to SPAM (either directly by the harvester or by those who purchase the lists).

Okay, so that’s bad. Nobody wants that. In fact, people are so against it that they will either post a fake e-mail address when they comment or just choose not to comment for fear of SPAM. I have been there. A few times when I have posted without realizing that my e-mail address would be displayed, I have immediately e-mailed the site owner requesting that my e-mail address be removed.

So what to do?

I perused Textpattern’s admin tab profusely. And found nothing. Hmmm… After several reruns of that, I decided to open up my favorite development tool and do a complete site search (Find – Entire Current Local Site). Well, after some PHP perusal, I narrowed it down to the /textpattern/lib/admin_config.php file.

If you open that file, you can change ‘never_display_email’ => 0 to ‘never_display_email’ => 1. BAM. Problem solved.

There are some other neat variables in there you might want to take a look at, as well.

I could have been smart and consulted the Textpattern Support Forum, which actually talks about it in a few places. But why reuse an already invented wheel?

  1. Whew,

    Man, I’m glad my email isn’t being displayed. I already get like 30 SPAM/day. Not cool at all. SPAM’s just one of those things that you can “do without.” Glad to see that your looking out for the other guy :)

    P.S. Dreamweaver Rocks

    P.P.S. Can you get it to post without having to preview?
    Jordon Brill is the author. Dec 3, 22:08 is the time. <
  2. Thanks for the info on TxP! I’m going to implement the same thing on my site.

    Jordan, the commenting without preview can be done, but you risk getting comment spam… It’s funny that you bring up removing a feature built in to discourage spam when we’re discussing spam to begin with. :)
    Ray is the author. Dec 4, 21:41 is the time. <
  3. Jordan, I hear you on the SPAM. I’ve had to abandon many an e-mail address taken over by SPAM. And yes, Dreamweaver is some sweet action. The code completion and coloring, along with easy FTPing are some of my favorite features.

    And as Ray said, you can remove the preview button. Heck, if you know PHP, you can do whatever you want. ;)

    Ray, sweet site! I really like the design. As you can see, that’s an area where I really struggle. =) No problem on the TxP tips. I have some more on the way, so stick around if you want.
    Nathan Logan is the author. Dec 5, 16:27 is the time. <
  4. Nathan,

    Ok, I figured that there was a good reason that you only had preview on this site. Don’t we ALL hate SPAM…

    I hear you on the PHP. IF you know it, you can do all kinds of stuff. I personally am not all that great at PHP -Yet ;). But I am lerning through the design of my personal site. It really does come in handy for those programming applications though.

    As for the Dreamweaver, I just love it. I had used MS FrontPage – Absolutely Horrible! Never again…
    Jordon Brill is the author. Dec 5, 22:58 is the time. <