vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   [HOW-TO] Easy way of finding executed hook locations (https://vborg.vbsupport.ru/showthread.php?t=94338)

Marco van Herwaarden 08-14-2005 10:00 PM

[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:
PHP Code:

 function &fetch_hook($hookname)
 { 

Below it add:
PHP Code:

  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.

Marco van Herwaarden 08-15-2005 12:35 PM

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.

fly 09-07-2005 12:08 AM

Quote:

Originally Posted by MarcoH64
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?

Marco van Herwaarden 09-07-2005 04:02 AM

Just surrounded the JavaScript part of the STANDARD_REDIRECT template with:
HTML Code:

<if condition="!$vbulletin->debug">
</if>

i think

fly 09-13-2005 10:37 PM

Quote:

Originally Posted by MarcoH64
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:
PHP Code:

 function &fetch_hook($hookname)
 { 

Below it add:
PHP Code:

  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...

Andreas 09-13-2005 10:41 PM

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

fly 09-14-2005 11:29 AM

Quote:

Originally Posted by KirbyDE
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?

Andreas 09-14-2005 11:32 AM

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

bigtime 07-25-2006 06:52 PM

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

Thanks,

Tim


All times are GMT. The time now is 07:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01433 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete