Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Andre N on September 16, 2011, 01:57:44 PM

Title: Integration Hooks skeleton file
Post by: Andre N on September 16, 2011, 01:57:44 PM
If you need to use the integration hooks and don't feel like writing all the boring boilerplate code, or you aren't really sure how to begin, here's a skeleton file I made up just for you. Actually I made it for me, but I copied in most of the documentation as comments for the functions and made it as easy to figure out as I could.

How do you use it?
You upload it somewhere, then open your index.php file located in your SMF root directory and include this file that you just uploaded (require_once whatever). Then whenever your SMF installation encounters these events...
it will do nothing because you still need to write some code in the functions to make it do something when the events are triggered :)

There are lots of other events too, but these are the ones Orstio covered and they are the ones you'll need mostly for integration.

Questions? Comments? Suggestions? Discussion about the integration hooks or this script below.
Even though it says SMF 2.0 you can use it for 1.x if you remove the 2.0 event hooks :)