Adding a simple event handling schema could help a lot
in extending and integrating the script.
The event handling could be implemented like this:
- A file with a set of well know functions acting as
- These functions will be called when specific events
- Some of these function could have default
For example. Such a function could be:
function NewLinkAdded ($title, $description, $url,
By default this could send out an email to the site
admin. If info about the submitter is collected then
such and email can be send to the submitter as well
telling him that the submittion will be reviewed shortly.
Another such function could be:
function NewLinkProcessed ($title, $description, $url,
This could send an email to the original submitter
letting him know that his site was approved/rejected.
Examples of events:
- adding a new link
- adding a new category
- editing an existing link
- processing of a new link
- processing of a new category
- processing of an existing link