vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Template hooks list in 3.7.0 and above (https://vborg.vbsupport.ru/showthread.php?t=180672)

FractalizeR 05-26-2008 10:00 PM

Template hooks list in 3.7.0 and above
 
1 Attachment(s)
A list of template hooks in VBulletin 3.7.0:

Code:

template_hook[inlinemod_post_bottom]
template_hook[inlinemod_thread_bottom]
template_hook[memberinfo_css]
template_hook[navbar_buttons_left]
template_hook[navbar_buttons_right]
template_hook[navbar_quick_links_menu_pos1]
template_hook[navbar_quick_links_menu_pos2]
template_hook[navbar_quick_links_menu_pos3]
template_hook[navbar_quick_links_menu_pos4]
template_hook[navbar_search_menu]
template_hook[postbit_controls]
template_hook[postbit_end]
template_hook[postbit_messagearea_start]
template_hook[postbit_signature_end]
template_hook[postbit_signature_start]
template_hook[postbit_start]
template_hook[postbit_user_popup]
template_hook[postbit_userinfo_left]
template_hook[postbit_userinfo_right]
template_hook[postbit_userinfo_right_after_posts]
template_hook[profile_left_first]
template_hook[profile_left_last]
template_hook[profile_ministats_list]
template_hook[profile_right_album]
template_hook[profile_right_first]
template_hook[profile_right_last]
template_hook[profile_right_mini]
template_hook[profile_stats_first]
template_hook[profile_stats_last]
template_hook[profile_stats_pregeneral]
template_hook[usercp_main_pos1]
template_hook[usercp_main_pos2]
template_hook[usercp_main_pos3]
template_hook[usercp_main_pos4]
template_hook[usercp_main_pos5]
template_hook[usercp_main_pos6]
template_hook[usercp_navbar_bottom]
template_hook[usercp_options_datetime]
template_hook[usercp_options_end]
template_hook[usercp_options_messaging]
template_hook[usercp_options_other]
template_hook[usercp_options_privacy]
template_hook[usercp_options_start]
template_hook[usercp_options_threadview]


How to get this list from any VBulletin version?
  • Take file /install/vbulletin-style.xml from VBulletin distributive.
  • Execute command: grep -o "template_hook.*\?" vbulletin-style.xml > HooksList.txt
Windows users can download grep from here: http://gnuwin32.sourceforge.net/downlinks/grep.php. It is an automatic setup package.

You can personally see where the hooks are located using the following plugin attached to specific hook:

PHP Code:

$hooksToShow = array("usercp_main_pos1""usercp_main_pos2""usercp_main_pos3""usercp_main_pos4""usercp_main_pos5""usercp_main_pos6""usercp_navbar_bottom""usercp_options_datetime""usercp_options_end""usercp_options_messaging""usercp_options_other""usercp_options_privacy""usercp_options_start""usercp_options_threadview");

foreach(
$hooksToShow as $hookToShow) {
    
$template_hook[$hookToShow] = '<div><font color="#FF0000"<b>'.$hookToShow.'</b></font></div>';


You can see where exactly hooks are located at the attached images:

Botto 05-28-2008 02:23 PM

Thank you, has helped me a great deal.
In the what hooks to show, would there be a way to get it to show all hooks?

Opserty 05-28-2008 11:46 PM

That is a nice trick to show all the template hooks :)

Jase2 05-29-2008 12:03 PM

Thanks!

FractalizeR 05-29-2008 03:39 PM

Quote:

Originally Posted by Botto (Post 1534087)
Thank you, has helped me a great deal.
In the what hooks to show, would there be a way to get it to show all hooks?

Unfortunately, there is no common hook in which you can change template_hook variable to show all possible hooks. But try this trick:
  • Enable debug mode at your Vbulletin
  • open page you want to see hooks on in browser
  • scroll down to debug info and note all the hooks, that are listed below global_setup_complete in "Hooks Called" section
  • try to execute my code at those hooks starting from top one

Bilderback 08-24-2008 08:00 PM

cool... this is what I gathered from 3.7.2 PL2 using grep

3.7.2 PL2 and 3.7.3
Code:

template_hook[footer_links]
template_hook[forumhome_wgo_pos1]
template_hook[forumhome_wgo_pos2]
template_hook[forumhome_wgo_pos3]
template_hook[forumhome_wgo_pos4]
template_hook[forumhome_wgo_pos5]
template_hook[forumhome_wgo_stats]
template_hook[inlinemod_post_bottom]
template_hook[inlinemod_thread_bottom]
template_hook[memberinfo_css]
template_hook[navbar_buttons_left]
template_hook[navbar_buttons_right]
template_hook[navbar_quick_links_menu_pos1]
template_hook[navbar_quick_links_menu_pos2]
template_hook[navbar_quick_links_menu_pos3]
template_hook[navbar_quick_links_menu_pos4]
template_hook[navbar_search_menu]
template_hook[postbit_controls]
template_hook[postbit_end]
template_hook[postbit_messagearea_start]
template_hook[postbit_signature_end]
template_hook[postbit_signature_start]
template_hook[postbit_start]
template_hook[postbit_user_popup]
template_hook[postbit_userinfo_left]
template_hook[postbit_userinfo_right]
template_hook[postbit_userinfo_right_after_posts]
template_hook[profile_left_first]
template_hook[profile_left_last]
template_hook[profile_ministats_list]
template_hook[profile_right_album]
template_hook[profile_right_first]
template_hook[profile_right_last]
template_hook[profile_right_mini]
template_hook[profile_stats_first]
template_hook[profile_stats_last]
template_hook[profile_stats_pregeneral]
template_hook[usercp_main_pos1]
template_hook[usercp_main_pos2]
template_hook[usercp_main_pos3]
template_hook[usercp_main_pos4]
template_hook[usercp_main_pos5]
template_hook[usercp_main_pos6]
template_hook[usercp_navbar_bottom]
template_hook[usercp_options_datetime]
template_hook[usercp_options_end]
template_hook[usercp_options_messaging]
template_hook[usercp_options_other]
template_hook[usercp_options_privacy]
template_hook[usercp_options_start]
template_hook[usercp_options_threadview]



All times are GMT. The time now is 03:44 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01374 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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