Helpful Information
 
 
Category: vBulletin 3 Articles
[HOW-TO] Easy way of finding executed hook locations

If you are developing a new hack, you are sometimes lost on which hooks are executed and in which order. You could ofcourse go check teh source files, but there is also another way:

open your includes/class_hook.php, and find:
function &fetch_hook($hookname)
{
Below it add:
DEVDEBUG("Fetched hook: $hookname");


While you are in debug mode, it will show you the list of all hooks executed. When you are saving data and are returned to another page, this will ofcourse not work, since you will not be able to see the information.

PS on my Dev-Board, i have redirection message enabled, and i edited the STANDARD_REDIRECT template. I added a condition to disable the redirect script from being executed if running in debug mode, so i have all time to look at the DEVDEBUG information. To proceed to the next (redirected) page, simply click on proceed.

PS on my Dev-Board, i have redirection message enabled, and i edited the STANDARD_REDIRECT template. I added a condition to disable the redirect script from being executed if running in debug mode, so i have all time to look at the DEVDEBUG information. To proceed to the next (redirected) page, simply click on proceed.
Can you post how you did that?

Just surrounded the JavaScript part of the STANDARD_REDIRECT template with:
<if condition="!$vbulletin->debug">
</if> i think

If you are developing a new hack, you are sometimes lost on which hooks are executed and in which order. You could ofcourse go check teh source files, but there is also another way:

open your includes/class_hook.php, and find:
function &fetch_hook($hookname)
{
Below it add:
DEVDEBUG("Fetched hook: $hookname");


While you are in debug mode, it will show you the list of all hooks executed. When you are saving data and are returned to another page, this will ofcourse not work, since you will not be able to see the information.

Hmmm. This doesn't seem to be working for me. Im not seeing any of the hooks show up...

It does work for sure.
Do you have Debug Mode enabled?

It does work for sure.
Do you have Debug Mode enabled?
Yeah, I do. Where would I see these hooks then? It's obviously a simple change, what am I missing?

It's in the Debug-Dropdown at the Bottom of the Page, right above the Template Usage Table.

I couldn't get my admin panel redirect to not redirect. Any other ideas?

Thanks,

Tim










privacy (GDPR)