Well, it had to happen. It is amazing that I’ve been using WordPress so long without getting into its guts. While hacking on the Tweet this plugin ever so gently, I started to get the feel for how WP plugins work. So I wrote a couple myself. The first one is serious old school, as it’s modeled on some older plugins. The second one actually uses more object oriented methodology, and so should be easier to read, maintain, and hack on.
But I’m sure most of you don’t care about that as long as the plugins work. And probably you are wondering what they do.
Plugin # 1: Random Widget
You know how they say don’t overload your blog with widgets because it will grind itself to a slow death. Yeah but there are so many cool widgets and it might give your blog a little stickiness if people never knew exactly what widget they would see when they visited next. So I got the idea to store the HTML codes for the widgets in the database instead of embed them directly in the blog templates. Then when you place the random widget metamarkup in your sidebar, the plugin will choose one of the widget blurps randomly and display that widget. I thought I had so many little blurps of widget code but the problem is a lot of them count something. So it’s not really great to put the blog catalog recent visitors widget because it will only count the people who visit when the widget is chosen. There are plenty of widgets that don’t count anything, and those are good candidates for RandomWidget.
Plugin # 2 Comment DM
This plugin is for Twitter addicts who check their Twitter more than their email. Word Press can be set up to email you whenever anyone comments, but if you want it on Twitter as well, the plugin will send you a DM (from yourself) that tells you who commented on what post and when. It’s a little wanky to get DM’s from yourself but no one else needs to know. The Comment DM plugin has some PHP5 only code in it, so if your Word Press is still running on PHP4, it will not work.
I’m not ready to unleash these on the general public unless a few people try them out first and let me know what they think. Want ’em? Comment here or follow me on Twitter and DM me there. My Twitter info may be found in the Lijit widget on the left sidebar. It’s always there, not random at all. These plugins are beta but the worst they can do is make your blog look crappy (that’s more about what widgets you choose though!) or just not work. I don’t believe they will trash your blog but as with any software, caveat emptor.