View Full Version : What function in vB 3.7.0 can I hack right before the page is output?
StephenKay
05-08-2008, 02:11 AM
I recently upgraded an old 2.3.0 board to the latest 3.7.0.
I am now trying to recreate some of my old hacks.
In the old code, there was a function named dooutput(...) (in admin/functions.php) that essentially was the last thing called before the php-prepared HTML was spit out to the browser page. I was using a hack inside this function to parse the finished HTML and substitute some words for other words for a specific purpose.
Can anyone tell me where the corresponding function would be in 3.7? I'm not having much success in finding it, everything is so different now....
Kirk Y
05-08-2008, 02:14 AM
Use one of the global hook locations in a plugin.
StephenKay
05-08-2008, 04:11 AM
Use one of the global hook locations in a plugin.Thanks for the reply, but that doesn't really mean anything to me. I'm coming from having programmed and hacked 2.3. Where would I find the info that would let me understand your answer?
Dismounted
05-08-2008, 05:53 AM
I'd suggest you have a look at this (http://www.vbulletin.com/docs/html/plugin_system).
StephenKay
05-09-2008, 12:00 AM
I'd suggest you have a look at this (http://www.vbulletin.com/docs/html/plugin_system).
OK, I read about plug-ins and products - that looks cool and well thought out - congrats. ;-) Much better than hacking around with the code.
So how do I find out where the hooks are - is there a list of where they appear? Do I just manually browse all of the source files (that could be quite time-consuming), and try to figure out what the functions they appear in are doing, or is there some more organized approach, like a list? As I mentioned, I'd like to find one that will allow me to search and replace the formatted HTML before it is spit out to the browser page and displayed - something sort of at the end of the whole procedure of displaying a forum page. Thanks!
Kirk Y
05-09-2008, 12:46 AM
Most hooks are logically named, so its relatively easy to guess at where they're located. ie. newpost_process, forumhome_start, global_complete, etc.
In answer to your question, I would look at the global_complete hook to run your function.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.