![]() |
Invoking custom templates
I created a new template called "forums_menu".
Then in the FORUMHOME template, I added $forums_menu, between the $header and $navbar templates: HTML Code:
$header But it doesn't seem to work. Am I missing a step? |
Have you added some php somewhere to fetch the template into $forums_menu ?
|
Add the following as a plugin using the forumhome_complete hook:
Code:
eval('$forums_menu = "' . fetch_template('forums_menu') . '";'); |
Got it working now. Thank you.
So basically the hooks are places in the vB PHP script where you can add custom PHP code? |
Yep, exactly. :)
|
Let's say I have a new template, and I want to call the contents of the template directly from a PHP file.
For example, I have myscript.php, and I want to be able to see the contents of 'my_template' when I go to 'www.mysite.com/myscript.php How would you go about doing that? I tried: PHP Code:
Code:
Fatal error: Call to undefined function: fetch_template() in /home/.sites/22/site13/web/livexchange/vbheader.php on line 68 |
All times are GMT. The time now is 10:32 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|