PDA

View Full Version : Template hooks list in 3.7.0 and above


FractalizeR
27 May 2008, 13:41
A list of template hooks in VBulletin 3.7.0:

template_hook
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 [I]/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:

$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
28 May 2008, 16:23
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
29 May 2008, 01:46
That is a nice trick to show all the template hooks :)

Jase2
29 May 2008, 14:03
Thanks!

FractalizeR
29 May 2008, 17:39
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 (http://www.vbulletin.org/forum/showthread.php?t=82835&highlight=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
24 Aug 2008, 22:00
cool... this is what I gathered from 3.7.2 PL2 using grep

3.7.2 PL2 and 3.7.3

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]