Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Plugin Hooks for a PHP application
blueparukia Offline
Junior Member
**
Posts: 35
Joined: Jan 2008
Post: #3
RE: Plugin Hooks for a PHP application
I do like the MyBB approach...Wink

Ok, so I am still going to be confused about how to go about it, but an array is a good idea. So lets say I'll use an array, here is what I'd have in my class:

PHP Code:
function add_hook($hook,$function){
$var = array(
hook_name => $hook,
function_name => $function
}


For run hooks, I do not how I'd loop through it, as both for and while loops would not work here, nor do I knw how I would execute the $var_function_name as a variable. I know there is a function for something similar, (call_user_func_array)- but I highly doubt I'd be able to use it on something like this until after a few weeks/months of practice, and I need this ASAP,

Cheers and thanks,

Josh

(This post was last modified: 02-14-2008 09:18 PM by blueparukia.)
02-14-2008 09:13 PM
Find all posts by this user

« Next Oldest | Next Newest »

Messages In This Thread
RE: Plugin Hooks for a PHP application - blueparukia - 02-14-2008 09:13 PM

 Standard Tools
Forum Jump: