30 Apr
Despite Microsoft Senior VP Chris Capossela saying that a search interface for the new Office ribbon device was unnecessary, Microsoft Office Labs yesterday released the internal project called ‘Scout’, now given the far less interesting title ‘Search Commands’. What is it with Microsoft having cool development names and then giving the products really boring release titles?
Anyway, the plugin adds another tab to Word, Powerpoint & Excel. It’s added as the last tab, but helpfully, you can just click ‘Windows Key + Y’ and it will jump to the search box from the application.
All it really is is a search box, a bunch of suggestions plus a gigantic help button. It is very useful though. Just start typing in the box and it will come up with a list of commands related to what you’ve typed in. It starts with partial matches and narrows down as you type. What is particularly handy is that it isn’t just doing a text match on the name of the commands, it’s doing a contextual match too. The example given in the help tutorial is that if you enter ‘background’ it comes up with a bunch of commands related to document backgrounds (in Word). This includes things like Watermarks, changing themes and shading. I’m not sure how this is done, there must be some sort of categorisation for the application’s commands behind the scenes.
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.
28 Mar
Thank you to everyone who’s installed the FriendFeed plugin. The feedback has been very helpful. I got svn access for the WordPress Plugin hosting, so the plugin now exists on the WordPress plugins site. The upshot of this is that it will now be included in the WordPress automatic updates, so if your version of WordPress supports that, you should start seeing updates for it on your plugin pages.
Speaking of updates, I’ve just checked in an update that shows the likes as well as the comments. So you will now get a list of the people who ‘liked’ your post as well as the comments. I’ve also tweaked the HTML it generates a bit, so if you’d setup some CSS rules around the plugin, you might want to check they all still work after updating.
I’ve got some default styling rules that you can apply to get started, otherwise the plugin is just going to give you two vertical lists, which probably isn’t what you want
#togglefriendfeedcommentslink { color: #333; font-size: 10px; font-weight: bold; }
#friendfeedicon { float: left; border: none; padding: 0 4px 0 0; }
#friendfeedlikeslist ul, #friendfeedlikeslist ul li { display: inline; }
#friendfeeddiscussions { margin: 10px 0 0 0; clear: both; }
Can I recommend the Cross-theme Stylesheets plugin to make this simpler. You can create a stylesheet just for this plugin that can be edited inside the WordPress admin section, independent of the theme’s styles.
Update: Just got my first TechCrunch link!