I'm just getting my feet wet with Plugin development for MT. One of the first plugins I wish to add is a plugin to send a JMS notification to our backend system every time someone publishes (i.e. either by publish request, page, or entry). In this case we have a restful service URI we can hit to build and post the JMS message so I really only have to figure out when to make the request with the corresponding blog id or some other metadata relating to the blog.
After evaluating what is available in MT 4.32, the ideal events to tie a callback to would be the pre_build or post_build event but in both cases they have no parameters. This first begs me to ask why have the events and second is how would I go about getting the blog_id at minimum.
I have also looked at a number of other events which have this information but they are less than ideal since they trip multiple times and I only want to produce a single notification. In addition I don't want modify the based code for MT to pass the parameter.
Comments or suggestions would be greatly appreciated.
Shane
Reported on Movable Type 4.3
Hi, Shane S.
I'm wondering that my comment is useful or not for your request, but I try to write.
I'm a Japanese web director and I struggled with the same thing. I wanted to know when and who post entries and pages.
I developed a tiny plugin - it notices a saved post to administrator - so it might be useful for your case.
http://smallworld.west-tokyo.com/200811/easyworkflow.html
The file is available in this link;
http://smallworld.west-tokyo.com/assets/EasyWorkflow.zip
Please excuse that it is not a professional system, but a easy notification system. I'm ashamed my program is so amateurish, but I think some keys for you are in this plugin.
BTW, I also looked for a callback to develop a notification system. In Movable Type, there is some callback for detecting posts before it saved, like "pre_save.foo".
I found an information about callback in wiki, so please check it out.
http://wiki.movabletype.org/Movable_Type_Callbacks_%28Deprecated%29
Hi Shane,
My HashTag plugin http://www.composing-stick.net/projects/hashtag/ may be able to give you some ideas on how to do it. The beta of 2.5 also includes support for scheduled posts.