MyBB Community Forums

Full Version: Query Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Actually it's not hooking. Hooking is a technique. *_activate and *_deactivate are functions which are executed by other functions directly.
(2009-07-17, 07:51 PM)Pirata Nervo Wrote: [ -> ]Actually it's not hooking. Hooking is a technique. *_activate and *_deactivate are functions which are executed by other functions directly.

I think it is a matter of opinion.
It's not a matter of opinion, it's the way it is.
In PHP, direct hooking is not allowed / available. You must create your own hooking system like MyBB did.
In C/C++ you don't need a hooking system in order to do it.
Here's an example of Direct3D hooking:
http://www.gamedev.net/community/forums/..._id=359794

What's hooking:
http://en.wikipedia.org/wiki/Hooking

*_activate, *_deactivate, *_info are functions which are executed by other functions
(2009-07-17, 08:00 PM)Pirata Nervo Wrote: [ -> ]It's not a matter of opinion, it's the way it is.
In PHP, direct hooking is not allowed / available. You must create your own hooking system like MyBB did.
In C/C++ you don't need a hooking system in order to do it.
Here's an example of Direct3D hooking:
http://www.gamedev.net/community/forums/..._id=359794

What's hooking:
http://en.wikipedia.org/wiki/Hooking

*_activate, *_deactivate, *_info are functions which are executed by other functions

They are hooks for mybb to know what to run when you click the activate link.
No..those functions are not run as hooks.
if(function_exists("{$codename}_activate"))
{
	call_user_func("{$codename}_activate");
}
Pages: 1 2