The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using existing template hooks
Today I have started working with VB4 for the first time and I seem to be having a blonde moment.
I would like to add an additional item to the navbar in the items listed below "Forum" inbetween "New Posts" and "Private Messages". Fortunately for me there is a template hook for this in the navbar template. Quote:
Code:
<li> <a href="somewhere.php">Somewhere</a> </li> Code:
$templater = vB_Template::create('mymod_navbar_link'); $template_hook['navbar_after_getnew'] .= $templater->render(); I know the code above is working as if I change this to: Code:
$templater = vB_Template::create('mymod_navbar_link'); $template_hook['navbar_after_getnew'] .= $templater->render(); echo $template_hook['navbar_after_getnew']; exit; So what obvious thing have I missed? --------------- Added [DATE]1264430546[/DATE] at [TIME]1264430546[/TIME] --------------- The obvious thing was that I was running that code in a included php file and was not using the global $template_hook variable. |
#2
|
||||
|
||||
Take a peek at https://vborg.vbsupport.ru/showthread.php?t=232579
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|