PDA

View Full Version : Template Hook


Atakan KOC
17 May 2007, 12:45
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
$template_hook['navbar_buttons_left'] .= '<td class="vbmenu_control"><a href="index.php">Home Page</a></td>';

Milad
18 May 2007, 15:08
Thanks for gathering them. I was waiting for someone to do so. are they the whole matter?

Antivirus
20 May 2007, 16:12
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:


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>

Michael Biddle
20 May 2007, 18:50
Thanks for this Atakan, wil,l help us coders :D

Atakan KOC
27 Jul 2007, 11:53
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]

King Kovifor
28 Jul 2007, 22:13
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?

Atakan KOC
30 Jul 2007, 13:53
Are you sure ? :)

raztrip
24 May 2008, 20:27
How come this worked with all template hooks except for those in the posbit template?

I have vB 3.6.8, build 2.

tazzarkin
06 Jul 2008, 04:44
Anyone know how to put a $vbphrase within a hook?

TheInsaneManiac
07 Jul 2008, 01:03
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.