View Full Version : Creating a include template?
GlitterKill
11-17-2002, 07:31 PM
On my site I have several ads that are changed occasionally as my site sponsors change. The site is run on vbportal so there are a few different places that I have to change the banner code in order for the changes to be uniformed throughout the site.
What I am wanting to know is if it is possible to create a template that has the banner code and then include that code in the proper sections by using the $file type include that vbulletin uses for its themes. This would allow me to just change the template instead of including the code in each place.
How would I go about this?
NTLDR
11-17-2002, 07:42 PM
Use the phpinclude template ;)
GlitterKill
11-17-2002, 08:29 PM
I have tried that but it never seems to work right. Is there not a way to do it liek I described? When I used to use myphpnuke I was able to use regular php includes. They do not work right in vbulletin when I tried.
NTLDR
11-17-2002, 08:32 PM
If you place the full code in the template or use the include statment there is no reason why it shouldn't work for every file that requires global.php
The phpinclude template is the only one you can add PHP to.
GlitterKill
11-18-2002, 12:12 PM
Maybe I am not understanding... If I want this code included in a few different pages then what is the procedure?
<center><smallfont color="FFFFFF"><b>Be sure to check out our sponsors</b></smallfont></center>
<center><script language="javascript" src="http://www.pimprig.com/banners/adjs.php?what=22&target=_blank"></script></center>
What goes in the phpinclude template and what code pulls that info into a specific part of the page?
Sorry for the trouble.
filburt1
11-18-2002, 01:27 PM
Just put that in the header or footer, that is on every page except for show_nopermission and the standarderror and standardredirect pages.
GlitterKill
11-18-2002, 01:42 PM
But the code needs to go in specific locations. Like in certain table cells, etc.
filburt1
11-18-2002, 01:46 PM
Then put this in phpinclude:
$somevariablename = '<center><smallfont color="FFFFFF"><b>Be sure to check out our sponsors</b></smallfont></center>
<center><script language="javascript" src="http://www.pimprig.com/banners/adjs.php?what=22&target=_blank"></script></center>';
...and put $somevariablename wherever you want that HTML to appear.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.