irn-bru
11-22-2003, 09:47 AM
Calling a Template From A Php Page.
Hi
I have made a custom php page useing this code in vbulletin.
<?
require("./global.php");
eval("dooutput(\"" . gettemplate("template_1") . "\");");
?>
Now on custompage_1.php I have the htm from template_1.
In custompage_1.php I have links to other pages custompage_2.php custompage_3.php ect ect
and the templates that are called from each php page template_2 template_3 ect ect.
Now by looking at code from hacks and general php codeing I know I can use a action var
so I dont have to make more php pages just templates. So if I am on custompage_1.php
what code would I use to go to a new template via a link on the custom page to an other
template without the need to make a new php page.
Also I would like to limit viewing to guest on all but the main first template.
if ($bbuserinfo[userid]==0) {
show_nopermission();
}
This would be fine useing the extra pages but how would I use it to limit template access.
If you could amend the code or explian.
<?
require("./global.php");
eval("dooutput(\"" . gettemplate("template_1") . "\");");
?>
Its not really important I can do it either way but I would like to be a bit smarter :)
Hi
I have made a custom php page useing this code in vbulletin.
<?
require("./global.php");
eval("dooutput(\"" . gettemplate("template_1") . "\");");
?>
Now on custompage_1.php I have the htm from template_1.
In custompage_1.php I have links to other pages custompage_2.php custompage_3.php ect ect
and the templates that are called from each php page template_2 template_3 ect ect.
Now by looking at code from hacks and general php codeing I know I can use a action var
so I dont have to make more php pages just templates. So if I am on custompage_1.php
what code would I use to go to a new template via a link on the custom page to an other
template without the need to make a new php page.
Also I would like to limit viewing to guest on all but the main first template.
if ($bbuserinfo[userid]==0) {
show_nopermission();
}
This would be fine useing the extra pages but how would I use it to limit template access.
If you could amend the code or explian.
<?
require("./global.php");
eval("dooutput(\"" . gettemplate("template_1") . "\");");
?>
Its not really important I can do it either way but I would like to be a bit smarter :)