View Full Version : Need a little help here...
ja5es
Mon 3rd Dec '01, 7:05am
I wasn't sure if I should have posted this in the vBulletin Templates forum or the PHP forum, but I'm going to post it here, and if it needs to be moved, then so be it.
I have created a new template. Now, I want to use this template in my website, but I don't know what to do with it.
What I want to do is make a new .php document which will use the templates found in vBulletin, but, the problem is I don't know how to call upon them. Do I use a function, include or what?
I'm confused. If you think that you can help then please do! Thanks!
eva2000
Mon 3rd Dec '01, 9:48am
should do a search on this forum ;)
just in your new .php file
place
<?php
require("global.php");
eval("echo dovars(\"".gettemplate("templatename")."\");");
?>
then add new template called templatename and place the pages html code in templatename
Chen
Mon 3rd Dec '01, 10:09am
eval("dooutput(\"".gettemplate("templatename")."\");");
is more like it Eva. :)
ja5es
Mon 3rd Dec '01, 12:50pm
Thanks a lot you guys! I'll let you know how it works out!
eva2000
Mon 3rd Dec '01, 2:02pm
Originally posted by FireFly
eval("dooutput(\"".gettemplate("templatename")."\");");
is more like it Eva. :) i see.. hmm i'm still using the old method for my rules page :o
ja5es
Mon 3rd Dec '01, 8:13pm
Uh, well both of these methods worked, but I still get errors concerning the global.php and it says that the header is already included, when all I'm trying to do is make it display the header and footer template on an otherwise blank page.
It will show the templates, but also with some error reports on the top of the page.
Any ideas?
Goldfinger
Mon 3rd Dec '01, 8:29pm
did you include the global.php on your the page you are trying to call the templates from?
include("forum/admin/global.php")
ja5es
Mon 3rd Dec '01, 8:38pm
Awwww! That might help... Thanks! I'll let you guys know if it's still giving me problmes...
ja5es
Tue 4th Dec '01, 3:17am
Well, armed with your latest advice, I tried to make a page which would display the header, navbar and footer templates on an otherwise balnk page. Well, the three things show up, but with these errors above them:
Warning: Undefined index: HTTP_POST_VARS in c:\apache\apache\htdocs\vb221\global.php on line 85
Warning: Undefined index: action in c:\apache\apache\htdocs\vb221\global.php on line 85
Warning: Undefined index: action in c:\apache\apache\htdocs\vb221\global.php on line 88
This is the php I am using:
<?php
require("./global.php");
eval("dooutput(\"".gettemplate("header")."\");");
eval("dooutput(\"".gettemplate("navbar")."\");");
eval("dooutput(\"".gettemplate("footer")."\");");
?>
Any ideas?
eva2000
Tue 4th Dec '01, 3:29am
Originally posted by ja5es
Uh, well both of these methods worked, but I still get errors concerning the global.php and it says that the header is already included, when all I'm trying to do is make it display the header and footer template on an otherwise blank page.
It will show the templates, but also with some error reports on the top of the page.
Any ideas? header already included error to fix make sure you do not have whitespace/linebreaks after the opening and closing php tags <? and ?>
in global.php and config.php
ja5es
Wed 5th Dec '01, 3:20am
That didn't do anything...
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights