Sunday, July 13 2003

trollbridge

Teresa Nielsen Hayden of Making Light has a charming way of dealing with obnoxious commenters: she disemvowels them. This seems to be far more effective than simply trying to delete their comments or ban their IP addresses. She apparently does it by hand, in BBEdit. Bryant liked the idea enough to make a plugin that automatically strips the vowels out of comments coming from a specific set of IP addresses.

I don’t have any comments to deal with at the moment, but the concept amused me, and I wanted to start tinkering with the guts of MT, so I quickly knocked together a plugin that allows you to mark individual entries for disemvoweling. While I was at it, I included another way to molest obnoxious comments.

To enable Trollbridge for a field, modify all relevant templates that the field appears in to include an argument, like so:

<$MTCommentBody trollbridge=""$>

To disemvowel a specific comment, simply edit it to include the string “[disemvowel]” (or just “[dis]”) as the first line. When viewed on your site, the vowels will be missing. Excuse me, that’s “th vwls wll b mssng”. It also strips out all HTML markup from affected fields.

The other mode that’s available is “translate into gibberish”, where each word is replaced by a random word taken from a text file. I’ve supplied sample lists of faux Elvish, Lovecraftian (C’thulhu), and Middle German, created with my random-word scripts. I also have a cron job generating new random word lists every fifteen minutes in fake Barsoomian, Latin, and Caveman (Ringo-style).

Activating this mode is done by changing the “trollbridge=” line to point to a directory where word lists are stored, and then inserting “[gibber wordlist]” as the first line of the field. Sample output from the supplied lists looks something like this: