Integration Hooks skeleton file

Started by Andre N, September 16, 2011, 01:57:44 PM

Previous topic - Next topic

Andre N

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 :)
"Every generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?"

Advertisement: