View Full Version : include template
John3971
11-06-2007, 03:35 PM
hey i was thinking of adding a sidebar to my forum and i wanted to have it in a own template like sidebar and i wonder how i can fix so i put $sidebar and the content in the template sidebar will be shown??
Hope you understand what i mean, its like $header and thoose.
Opserty
11-06-2007, 05:21 PM
Create a new plugin using something like global_start as the hook location. Then you need a code like:
eval('$sidebar ="'. fetch_template('mysidebar_template') ."';');
Then in your template for example the footer template you can use the $sidebar variable to get your template.
John3971
11-07-2007, 10:26 AM
i will need the whole plugin code because i don“t know how i do this.
Opserty
11-07-2007, 11:21 AM
Just add your code to the footer/header template then, its far easier way of doing it.
(If you want to try anyway, that should be all the code you need, I haven't tested it though but I'm pretty sure it works)
rpainter
11-07-2007, 12:26 PM
Why don't you just use one that is already created:
https://vborg.vbsupport.ru/showthread.php?t=141870
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.