Wednesday, November 15, 2006

MovableType Notifications

Perhaps it is a bit strange to post notes about a blogging software on a different blogging site, but I spent a couple of hours struggling with a problem on a private blog yesterday, and wanted to make sure the solution is posted in a public place.

I maintain a couple of Blogs for the XENON Dark Matter Experiment, and they are both served with MovableType. The Blogs are private, for use by XENON collaboration only, and are password protected, so I won't link them here.

The problem I had is that I wanted MovableType (MT, v3.2) to email users automatically whenever an entry was created. MT allows me to send email notifications manually after an entry is created (it requires a few clicks), but since many people post to the Blog, someone might forget or be too lazy to send, so I wanted the Blog to send the notifications automatically.

After googling for a while, I found the plugin MT-Notifier, which does exactly what I wanted. I downloaded MT-Notifier v3.4.4 (the version compatile with MT v3.2), and unzipped it to the plugins folder. The instructions were lacking a crucial step, which is no longer necessary for the newest version of the plugin, but still needed for v3.4.4: the initialization of the MT-Notifier database. It is done by simply entering the following address in any browser:

http://my.website.com/mt/plugins/Notifier/mt-notifier.cgi?__mode=loader

And it works! Really simple, just unzip, enter the address above on a browser, and it's done! Well, not quite. Now you have to create subscriptions - MT-Notifier has nothing to do with the "Notifications" feature native in MovableType. Thus, you have to create new subscriptions. The MT-Notifier suggests way to do that, but I found that the easiest was to use another plugin that lets the user administer the subscriptions (view, add, delete) from the Notifications menu. I found the plugin - rather, the Perl script code - at a forum (here) and saved it as MT-Notifier-Admin.pl. Then you just save the script, along with BigAPI.pl (Perl script with generic functions for MT) in the plugin folder, and you can manage the Automatic Notifications from the Notifications menu (under the heading "Subscription").

All the plugins and scripts mentioned are in a zip file: MT-Notifier_for_MT_v3.2.zip

No comments: