Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Template hooks list in 3.7.0 and above
FractalizeR's Avatar
FractalizeR
Join Date: Oct 2005
Posts: 368

 

Russia, Moscow
Show Printable Version Email this Page Subscription
FractalizeR FractalizeR is offline 05-26-2008, 10:00 PM

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:
Attached Images
File Type: jpg UserCP_Main_Hooks.jpg (76.5 KB, 0 views)
File Type: jpg UserCP_Options_Hooks.jpg (90.8 KB, 0 views)
File Type: jpg MemberInfo_Main.jpg (47.0 KB, 0 views)
File Type: jpg PostBit.jpg (19.7 KB, 0 views)
Reply With Quote
  #2  
Old 05-28-2008, 02:23 PM
Botto Botto is offline
 
Join Date: Sep 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 05-28-2008, 11:46 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is a nice trick to show all the template hooks
Reply With Quote
  #4  
Old 05-29-2008, 12:03 PM
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Location: USA
Posts: 1,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #5  
Old 05-29-2008, 03:39 PM
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Location: Russia, Moscow
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Botto View Post
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
Reply With Quote
  #6  
Old 08-24-2008, 08:00 PM
Bilderback's Avatar
Bilderback Bilderback is offline
 
Join Date: Sep 2007
Location: Illinois
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:10 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.04209 seconds
  • Memory Usage 2,276KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (4)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete