11 Apr
[via Sarah In Tampa]
9 Apr
Don’t you just hate it. You install a program on your computer to try it out, then when you go to un-install it, it leaves files scattered all over your system. Whether it’s in the application folder that it can’t delete, or in the Application Data folder or system32, it’s not easy to find a program that cleans up after itself properly. I’ve got more of a chance of getting my kids to tidy up the lounge room after they’ve got all the Lego out.
This issue isn’t just limited to Windows applications though. I’ve noticed the same problem with a lot of WordPress plugins. It may just be leaving a couple of config options in the wp_options table, or it may be as much as leaving multiple custom db tables behind or even files in the WordPress install folder. I’m of the opinion that once you remove a plugin, it should be gone without a trace.
Now, for plugin developers, WordPress provides a simple way to do this. The register_deactivation_hook() method lets you register a function to be called when your plugin is deactivated. In there you can put any cleanup code to remove options, tables files, etc.
This is not without it’s problems. Often plugins require you to enter some complex config information or they may build up a history that you may not want to lose (eg. a spam filter that learns from what you mark as spam). Sometimes you need to disable plugins temporarily, in fact the WordPress update instructions say that you should deactivate all your plugins prior to upgrading.
Also, the automatic plugin updates system introduced into WordPress deactivates plugins before it installs the updated version. So if you put the cleanup tasks into the deactivation hook method, all the user’s settings would be gone after updating. This really isn’t a good option.
What would be better is if the WordPress plugin admin page had 2 buttons for each plugin: deactivate & uninstall. Deactivate would do what it does now - turn off the plugin, but leave it in place. Uninstall would completely remove the plugin, including deleting the plugin file & firing a separate uninstallation hook callback. Developers could then put all their cleanup code in there, with no fear that users were going to lose settings during an upgrade.
I think for the time being it would be best if developers included a ‘remove all data’ button on their plugin’s options page (if it has one). This button would remove all trace of the plugin (other than deleting the plugin itself) so that the user can then deactivate it. This button should probably be restricted to admin users and have some form of confirmation on it. I’ve added a button to do this in the latest release of the FriendFeed Comments Plugin.
There’s already a post about this ideas section of WordPress.org, and a discussion about it on Weblog Tools Collection. I’m hoping that this gets noticed, because it would be great if developers had a simple way of tidying up after themselves.
If this is something that matters to you, please go vote up this idea on WordPress.org.
8 Apr
Jayne: Little Kaylee here just wishes you was a gynaecologist.
Mal: Jayne, you will keep a civil tongue in that mouth, or I will sew it shut. Is there an understanding between us?
Jayne: You don’t pay me to talk pretty. Just because Kaylee gets lubed up over some big-city dandy doesn’t mean…
Mal: Walk away from this table. Right now.Simon: What do you pay him for?
Mal: What?
Simon: I was just wondering what his job is - on the ship.
Mal: Public relations.
The ‘social web‘ has brought many things to us, but possibly the most pervasive thing it’s brought is the ability to (and the general assumption that you should) comment on just about any piece of information published. Blogs offer this as a matter of course, but many news organisations are introducing the ability to comment on their articles.
By and large this is a good thing, people want to have their say. Also, for companies, engaging with your customers can be a sure-fire way of getting repeat business. The wide-ranging discussions on the web, as they flow from site to site (see TechMeme) can be a great way to get a lot of different perspectives on a topic.
However, there can be a downside to allowing comments on your site & I’m not just talking about the usual gripes of spam & trolls.
2 Apr
I bit the bullet & updated the FriendFeed Comments plugin to version 1.0. I then noticed a couple of other things I needed to do, so I immediately updated it to 1.1. So lets just say we skipped 1.0 Ok?
No real functionality changes, just a bit of housekeeping and admin tweaks. The plugin will now warn you if you haven’t entered a FriendFeed nickname in after activating the plugin. Also, after saving your nickname on the options page, it puts up a reminder to put the <?php wp_ffcomments(); ?> tag in your single post template.
So get it running & let me know what you think!