It would be useful to have a publish and subscribe event system in the core. This will allow other modules to take action on events that occur.
1) A new blog is posted, and the blog module notifies the core of the event. The Twitter module is subscribed to that event, so its callback function is called. The Twitter module then posts a link to the new blog is on the user's twitter status page.
2) A user signs up to the site, and the users module notifies the core of the event. The Mailing Lists module is subscribed to the event, and can automatically add the user to the default mailing list.
The events probably should come with some data, optionally supplied by the publishing module. For example, the new blog's ID, the new user's ID.
This system will make it easier on module developers so they don't have to read the $_REQUEST and $_POST variables to determine when events occur.
Log in to post a comment.