View Full Version : Multiple use of hooks
Paul M
06-09-2005, 10:34 PM
If two (or more) "plugins" use the same hook - how does this work ?
Will they all run, if so will the order they get run be random ?
Gary King
06-09-2005, 10:37 PM
Wrong forum for this, isn't it?
Should be posted in vbulletin.com I think, in the 3.5 forum.
Wayne Luke
06-09-2005, 10:38 PM
Not sure, but I think that code will have to be developed to handle this in the long run to prevent conflicts, preserve necessary order and make it easier for people to install/develop these plugins. This is one of the reasons the Jelsoft developers are looking for your feedback on this functionality within the beta process. They can't think of everything and need ideas on how to make this a rock-solid system that allows people to easily expand vBulletin in a multitude of ways.
Andreas
06-09-2005, 10:40 PM
All code will be run.
Order = Added
They can't think of everything and need ideas on how to make this a rock-solid system that allows people to easily expand vBulletin in a multitude of ways.
Right. IMHO the most important thing is the ability to modify queries with plugin code.
Otherwise most hacks will rely on file modifications.
Paul M
06-09-2005, 10:42 PM
All code will be run.Okay, that's good.
Order = AddedPlease clarify what you mean.
Gary King
06-09-2005, 10:45 PM
Okay, that's good.
Please clarify what you mean.
He means the plugins will be executed in the order that they were installed on the forums.
Andreas
06-09-2005, 10:45 PM
Please clarify what you mean.
Example (all plugins using the same hook)
You add Plugin 1
You add Plugin 2
You add Plugin 3
Execution Order: 1-2-3
You delete (not deactivate) Plugin 1 and add Plugin 4.
Execution Order: 2-3-4
Now you add Plugin 1 again
Execution Order: 2-3-4-1
Now clear?
Paul M
06-09-2005, 10:49 PM
Example (all plugins using the same hook)
You add Plugin 1
You add Plugin 2
You add Plugin 3
Execution Order: 1-2-3
You delete (not deactivate) Plugin 1 and add Plugin 4.
Execution Order: 2-3-4
Now you add Plugin 1 again
Execution Order: 2-3-4-1
Now clear?Clear - yes.
However IMO a system is needed to preset the order - a bit like the display order for forums. :)
dsboyce8624
06-09-2005, 10:55 PM
Clear - yes.
However IMO a system is needed to preset the order - a bit like the display order for forums. :)
Sounds like a good suggestion for over at vb.com
Paul M
06-09-2005, 11:20 PM
<sighs> I suppose so ....... I don't tend to visit there very often.
Still > http://www.vbulletin.com/forum/showthread.php?t=142120
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.