Looking at Notifier Subscribers

I found myself becoming curious regarding the email notification feature, provided by MT-Notifier. Who was subscribing to receive comment notifications? Was it working at all? Therefore, I made use of the MTSQL plugin to find out.

The first step was to create a subdirectory which I could use to hold the results, but which wasn't visible to the outside world. I created the directory, then used cpanel to password protect it. I could have also used .htaccess.

Then I installed the MTSQL plugin.

Finally I made a template within movable type. This is an index template, set to save into my password protected directory.

This template relies upon the MTSQL plugin.

It also assumes several other files, these are optional. I wanted to be able to 'filter' for certain types of email, i.e. confirmed email addresses and those still pending. These pending emails could be due to spam, or simply to folks who have not confirmed yet. The additional files are placed in the directory where the webpage will be generated.

Firstly there is the CSS chooser javascript, available here.

Then there are three stylesheets, subs.css, which contains these declarations:

li.showvalid {background-color: inherit; color:inherit;} li.showpending {background-color:inherit: color:inherit;} tr.PENDING {background-color: #ffbbbb; color: inherit;}

validonly.css has these: .PENDING {display:none} li.showvalid {background-color:#ffbbbb; color:inherit;} li.showpending {background-color: inherit; color:inherit;}

and pendingonly.css has these: li.showpending {background-color:#ffbbbb; color:inherit;} li.showvalid {background-color:inherit: color:inherit;} tr.PENDING {background-color:inherit; color: inherit;}

The effect of these is that when all the notifications are shown, the pending ones are highlighted red, and when only the valid or pending are shown, the choice is highlighted.

The template can now be built, and a list is made of people who have subscribed to be notified of comments made on various posts. It should be highlighted that this is created within a password protected folder (not linked to), so it should keep the email addresses safe - it's purely for my curiousity!

A future step is to try and work out how to purge the database, i.e. delete any pending notification which has been pending for, say, 7 days. That screams 'scary perl script' to me. Heck, I don't even know if the timestamp is stored along with the notify email! The ideal would be to be able to put a button onto the generated webpage which one could click to purge an email address (with a persistant checkbox which would override 'are you sure' messages if required). If anyone knows how this might be done, I'd love to know!