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 Hook
Atakan KOC's Avatar
Atakan KOC
Join Date: Feb 2006
Posts: 710

 

Istanbul
Show Printable Version Email this Page Subscription
Atakan KOC Atakan KOC is offline 05-16-2007, 10:00 PM

MEMBERINFO

$template_hook[memberinfo_pos1]
$template_hook[memberinfo_pos2]
$template_hook[memberinfo_pos3]
$template_hook[memberinfo_pos4]
$template_hook[memberinfo_foruminfo]
$template_hook[memberinfo_iminfo]
$template_hook[memberinfo_contactinfo]
$template_hook[memberinfo_additionalinfo]
$template_hook[memberinfo_groups]

navbar


$template_hook[navbar_buttons_left]
$template_hook[navbar_buttons_right]
$template_hook[navbar_search_menu]
$template_hook[navbar_quick_links_menu_pos1]
$template_hook[navbar_quick_links_menu_pos2]
$template_hook[navbar_quick_links_menu_pos3]

postbit & postbit_legacy

$template_hook[postbit_start]
$template_hook[postbit_userinfo_left]
$template_hook[postbit_userinfo_right]
$template_hook[postbit_userinfo_right_after_posts]
$template_hook[postbit_messagearea_start]
$template_hook[postbit_signature_start]
$template_hook[postbit_signature_end]
$template_hook[postbit_controls]
$template_hook[postbit_end]
$template_hook[postbit_user_popup]

USERCP

$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]

USERCP_SHELL

$template_hook[usercp_navbar_bottom]

modifyoptions

$template_hook[usercp_options_start]
$template_hook[usercp_options_privacy]
$template_hook[usercp_options_messaging]
$template_hook[usercp_options_threadview]
$template_hook[usercp_options_datetime]
$template_hook[usercp_options_other]
$template_hook[usercp_options_end]


Simple Usage

Hook Location : global_start
Title : Navbar Template Hook

Plugin PHP Code
PHP Code:
$template_hook['navbar_buttons_left'] .= '<td class="vbmenu_control"><a href="index.php">Home Page</a></td>'
Reply With Quote
  #2  
Old 05-18-2007, 01:08 PM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for gathering them. I was waiting for someone to do so. are they the whole matter?
Reply With Quote
  #3  
Old 05-20-2007, 02:12 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work atakan, you could also place the html that will be inserted into the hook, within the Template System and call it in a plugin like this:

PHP Code:
eval('$template_hook[navbar_buttons_left] .= "' fetch_template('new_navbar_item') . '";'); 
Where new_navbar_item is the html (template) to be inserted, such as:

<td class="vbmenu_control"><a href="myscript.php">My Script</a></td>
Reply With Quote
  #4  
Old 05-20-2007, 04:50 PM
Michael Biddle Michael Biddle is offline
 
Join Date: Apr 2004
Location: Anaheim, CA
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this Atakan, wil,l help us coders
Reply With Quote
  #5  
Old 07-27-2007, 09:53 AM
Atakan KOC's Avatar
Atakan KOC Atakan KOC is offline
 
Join Date: Feb 2006
Location: Istanbul
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="Red">New Template Hook (3.6.8)</font>
$template_hook[postbit_userinfo_right_after_posts]
$template_hook[usercp_options_start]
$template_hook[usercp_options_privacy]
$template_hook[usercp_options_messaging]
$template_hook[usercp_options_threadview]
$template_hook[usercp_options_datetime]
$template_hook[usercp_options_other]
$template_hook[usercp_options_end]
Reply With Quote
  #6  
Old 07-28-2007, 08:13 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Atakan KOC View Post
New Template Hook (3.6.8)
$template_hook[postbit_userinfo_right_after_posts]
$template_hook[usercp_options_start]
$template_hook[usercp_options_privacy]
$template_hook[usercp_options_messaging]
$template_hook[usercp_options_threadview]
$template_hook[usercp_options_datetime]
$template_hook[usercp_options_other]
$template_hook[usercp_options_end]
Why not put those in the first post?
Reply With Quote
  #7  
Old 07-30-2007, 11:53 AM
Atakan KOC's Avatar
Atakan KOC Atakan KOC is offline
 
Join Date: Feb 2006
Location: Istanbul
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you sure ?
Reply With Quote
  #8  
Old 05-24-2008, 06:27 PM
raztrip raztrip is offline
 
Join Date: Nov 2007
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How come this worked with all template hooks except for those in the posbit template?

I have vB 3.6.8, build 2.
Reply With Quote
  #9  
Old 07-06-2008, 02:44 AM
tazzarkin tazzarkin is offline
 
Join Date: Nov 2007
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know how to put a $vbphrase within a hook?
Reply With Quote
  #10  
Old 07-06-2008, 11:03 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tazzarkin View Post
Anyone know how to put a $vbphrase within a hook?
If I am not mistaken, you can do AntiVirus's way and include a template. That should allow the $vbphrase to work.
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 04:54 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.04715 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
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_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete