One of the first plugins I wanted to write for WordPress was a decent spam filter. At the time (late 2004) there were several plugins already out there, but they were all rules-based and I wanted something more adaptive. So I wrote a few simpler plugins for practice and soon abandoned the idea, since I really didn’t get much spam — or even many comments for that matter.
After a seven month absence, I came back here to find over 4000 comments in moderation, most of it spam. It took a week to sort through and clean that mess up, all to preserve the 5% of legitimate comments buried in there. Then after a 2 week vacation, I was stunned to see my empty moderation queue back up to 2700 comments. No rest for the wicked, I guess.
(more...)
UPDATE 27-Aug-2006: The table creation bug in the first beta has been fixed, thanks to the keen eye of Francesco Ferrucci. My apologies for including such an obvious bug, and for my 2 week absence (I’ve been on vacation).
UPDATE 4-Sep-2006: Some minor changes (now at beta3) for compatibility with MySQL 3.23, Semiologic and Chip’s tag cloud widget.
So over the past week, I’ve been working towards my promise (made only a scant 7+ months ago) of delivering a 2.0 version of “Jerome’s Keywords”. I’m glad to announce that most of the rewriting and debugging are done so there’s a beta of the 2.0 version for you to try out.
Before you do, a few caveats:
- It’s strictly WordPress 2.0+, older versions of WP aren’t supported.
- Tags are now stored in a dedicated table for performance reasons, so you need “create table” access on your database.
What’s new:
- Fixes a whole bunch of minor bugs introduced by WP2.0 (suggested keywords, including categories, etc.).
- Adds tag management features from LightPress.
- Adds an option page to make tag display setup easier.
- Including meta keywords in your header is now a one-click option; no template code required.
- Nicer template tag functions for posts and tag clouds (and no parameters required if you use the option page).
- Random tag cloud sort feature.
(more...)
I just finished a quick update to the Jerome’s Keywords to add compatibility for WordPress 2.0. Thanks to everyone who sent in reminders & suggestions, and a big thank-you to Horst Gutmann whose patch is the basis for this update.
Not much else has changed, except the ability to hide suggested keywords — but why would you want to? So you can stick with the 1.7/1.8 version of the plugin unless you have a burning need to upgrade to buggy WP2.0.
A serious update to this plugin is in the works which will build on the tagging system I wrote for LightPress. Tag management, an option page and the ability to import tags from other plugins (so you can switch back from UTW). It’s going to be great!
Between bouts of testing LightPress and customizing a fork of the WordPress admin interface, I found some time to work on that old favourite, Jerome’s Keywords. The latest version of this keywords + tagging plugin features some bug fixes and a few tweaks:
- Fixed the nefarious uksort() bug (which should never have seen the light of day)
- Fixed a minor bug in the tag cosmos scaling
- The local keyword search now includes results for tagged pages
- You can now generate Flickr- and del.icio.us-style links in your cosmos or top-X lists by using
%flickr% and %delicious% respectively. I’ll post an example shortly on the cosmos howto page.
Thanks to everyone who provided feedback about the above, especially to Denis de Bernardy who suggested fixes to the first three items.
After finishing this update, I think it’s time for some serious refactoring of the plugin code. It has grown very organically — perhaps too much even — thanks to all of the suggestions I’ve received. The time is right to finally add an administration page. I’d like to aim for simpler WP template tags, with most of the customization done within the admin interface. If you’re lucky, maybe you won’t have to use any template tags at all. mailliw has also sent me some intriguing ideas that would really push the tagging aspect to a new level. The next update should be a big one (barring any new bugs), so please hold tight.
I just wrote a quick plugin to help someone solve a WordPress performance issue. There’s definitely something wrong with this picture. I mean, I’ve been supporting LightPress and made the switch precisely because of performance issues (the templates are nifty too), didn’t I?
Granted I only found out about the problem because of Ludo’s outraged post on LightPress.org. Blaming MySQL is certainly a new twist on resolving performance problems, even if it’s utterly wrong in this case. My position on database queries: design them properly (that includes the underlying tables too) and they will work like a charm no matter database engine you use; write them poorly and thou shalt get bitten. MySQL and Oracle will both grind to a standstill with an unoptimized query that joins poorly designed tables.
It will be interesting to see what comes out in the end. Is it a plugin? Is it a WordPress query that scales badly? In any case, I know I don’t have to worry about the same problem over here in LightPress-land.
I’ve just released the newest version of my keywords plugin. This minor release includes two new features that I find very useful:
- Suggested keywords - A list of your eight most popular keywords will show up below the keywords field. Each time you save, they will update to reflect words used in the post. The algorithm used is very simple but should help you to remember other relevant keywords that you’ve used in the past.
- Natural sort for tag cosmos - By popular demand, the tag cosmos now uses a case-insensitive natural sort order. What does this mean? Upper- and lower-case keywords are no longer separated and the “natural sort” will put values like “9km” ahead of “10km”.
Enjoy!
LightPress 1.0 was released earlier this week and I finally made the switch. I’m really hoping that I haven’t missed anything in the transition — the initial conversion was simple but my test site diverged from my WordPress site several times in the past. If any parts of this site seem broken, please let me know!
I’m much happier with my LightPress templates, they’re much cleaner to work with. I’ve also written a bunch of LightPress plugins — including a new version of Jerome’s Keywords — and they took about 1/4 of the effort of the WordPress versions. I think that’s a pretty good trade. I’ll post the new plugins as soon as I can, along with a quick conversion guide. Ludo has received permission to convert Michael Heilemann’s Kubrick theme so look for that to appear shortly, too.
Comments are the only thing not working properly at the moment. All of my test comments have gone straight to moderation. It could be a Spaminator problem (bundled with LightPress) but it’s more likely a bone-headed configuration error on my part since they seem to work fine on all of the other LightPress sites, including both of my test sites. More to come…
I’ve been doing some Xdebug profiling on LightPress to ensure that speed is properly balanced with memory usage, thanks to some tips from Sencer. While I was at it, I thought it might be fun do a few profiles on my WordPress development site.
Xdebug offers numerous profiling modes, but the one I’ve used here is the “Total Execution Time” (4) profile which sums the excution time for each function call and lists functions in descending order. E.g. if the function apply_filters is called 10 times, the total will show the sum of the 10 separate calls (note that further calls made within a function count do count towards its total). This is a useful profile to determine which functions make up the bulk of WordPress processing time.
(more...)
After a complete rewrite, I’m pleased to announce the release of PreFormatted 2.0 beta. This is a plugin for WordPress 1.5 that reduces page rendering time by pre-formatting post content, excerpts and comments when they are saved to the database rather than formatting them every time a page is viewed. The original version of PreFormatted (primarily developed for the WPFF/LightPress project) suffered from a few design limitations but these have been eliminated in version 2.0.
The highlights:
- “Pre-formatted” data is now saved to the database separately from the original data.
- Generates pre-formatted data when unformatted content is viewed for the first time.
- Compatible with other formatting plugins such as Markdown and Textile.
- Extends LightPress formatting by allowing the above to be used. Note that a LightPress plugin (to be released soon) is required.
For more information please visit the PreFormatted plugin page.
Special thanks go out to Denis de Bernardy who provided numerous suggestions, testing and a patch or two. You can see PreFormatted 2.0 in action on both his site and mine.
I’ve just released a new version my keywords plugin for WordPress. Jerome’s Keywords version 1.5 finalizes the new tag cosmos and most-used keywords list functionality. Some minor bugs and annoyances have been fixed along the way too.
By far the most time-consuming part was revising the documentation. The plugin page now includes more “how-to” information and includes most of the tips and sample files scattered throughout earlier comment threads. Drop by the plugin page and check it out.
Known Issues & Future Plans
- The duplicate keywords issue reported by theanomaly has yet to be resolved (or duplicated).
- Add a “relevant posts” feature that returns posts with a high number of similar keywords.
- Enhance the edit page to suggest relevant keywords used in the past.
- Automatically parse post links tagged with “rel” and add their tag to the keyword list.