tags:

views:

31

answers:

0

This question isn't really limited to PHP but more of a "best way to do this..." kind of thing.

I was hoping to include some kind of user-created addon manager to my next PHP application (without users having to manually edit files, and without the the addons becoming all mixed up), but I'm pretty stumped as to how it could best be done (being single-threaded and all).

SMF has managed it using functions for displaying pretty much every component of a page.

I was thinking of calling a "checkpoint" function at lots of key stages and allowing the addons to run whatever code from it, eg. checkpoint(46); /* more code */ checkpoint(47);

How would you go about doing it?