Category: Textpattern

A few changes due to comment spam

Due to an increasing amount of spam comments on my site, I am trying out my own version of a plugin (mrw_spamkeywords_urlcount) that should fish out a large majority of the offending posts.

The plugin uses some new features in the latest textpattern (version 4.0.4) that allows for comments to be processed by plugins before being saved. As a result, my live comments preview has been disabled for now – the plugin that runs the previews (nhn_livecommentpreview) is not yet fully compatible with the new handling of comments submission.

This also means that comments have gone back to the defauilt textpattern process of having to preview your comment before finally submitting it to the site. This is a bit ugly and I don’t like making people have to step through a preview of their comment first, but until I tidy things up, it will hopefully help to curb the spam a little further!

Feeds Knackered

Some of my feeds are busted at the moment… something to do with the feed URLs not using the same year/month/day/title format as the rest of the site. I’ve now fixed the feeds (see below).

Thanks to Pat for the heads up.


14.09.2006 @ 16:15

All seems to be working again now. For some reason, textpattern 4.0.3 doesn’t report the correct “Permanent link mode” when building feeds for sections, while the main feed will work fine. I’ll try to delve into it more when I have some time.

Please post a comment if you are still having problems.

14.09.2006 @ 16:33

Note: The problem described here appears to be fixed in Textpattern 4.0.4.

If anyone having the same problem stumbles across this post, I worked around the problem by editing “/textpattern/publish/rss.php” and replacing the line that builds the permanent link URL:
$permlink = permlinkurl($a);
…with this:
list($dtj_y,$dtj_m,$dtj_d) = explode(”-”,date(“Y-m-d”,$a[‘posted’]));
$permlink = hu.”$dtj_y/$dtj_m/$dtj_d/$uTitle”;

…to make sure that the date format is used for the permanent link URL when building all feeds.

Textpattern E-mail Encoding Plugin

After being told by my host that I’m not allowed to use a third party (or my own) script for a form-based contact page, I’ve had to remove contact forms from a few of my sites. I need an interim solution, so I’ve added contact e-mail addresses to the sites. Of course, this is probably a good idea anyway, instead of relying on contact forms.

Anyway, I’ve been encoding e-mail addresses using a mixed-mode obfuscation technique similar to Enigma’s Email Obfuscator. As a couple of my sites run on Textpattern, I decided to write a plugin that will encode e-mail addresses to help hide them from harvesters.


This plugin will allow you to encode an e-mail address via a Textpattern tag using a few different modes.

Go check out the dtj_obfuscated_email plugin page for more info and accept my apologies for the ugly-looking page. It’s a bit like the rest of my site at the moment – in limbo while I finish my new design.

I hope someone finds this plugin useful. Please let me know if you have any feedback.



In case anyone is interested, I have published the PHP code I used for the dtj_obfuscated_email plugin. Please let me know if you have any suggestions for improvements.