Rireal
02-13-2005, 10:58 PM
After playing with this all day I've decided to ask for help.
I've used this (https://vborg.vbsupport.ru/showthread.php?t=62164) hack to create the page I'm working with. The following code is in the PHP file and I want it to execute every time the page is accessed.
if ($bbuserinfo['userid']!=0)
{
$username=$bbuserinfo['username'];
if ($bbuserinfo['usergroupid']==10 || $bbuserinfo['usergroupid']==5 || $bbuserinfo['usergroupid']==7 || $bbuserinfo['usergroupid']==6 || $bbuserinfo['usergroupid']==9)
{
include("up.php");
}
else
{
include("noup.php");
}
}
else
{
include("loginrequired.php");
}
I know that this executes before the template gets called and HTML written but it's the best way I can visualize. I basically just need help integrating the PHP file with the vB template. The script that's called when the conditions are met is an upload script that calls itself during operation and I'm just not sure how to get the seemingly two different files (php and template) to work as one with it. If there is a way to put the PHP in the template that would be ideal, but I haven't figured out how to yet.
I do realize that this is kind of vague so please ask if you're not sure what I'm asking for.
Thanks in advance
Rireal
edit: Easily put, how do I put the above code in an actual vB template.
I've used this (https://vborg.vbsupport.ru/showthread.php?t=62164) hack to create the page I'm working with. The following code is in the PHP file and I want it to execute every time the page is accessed.
if ($bbuserinfo['userid']!=0)
{
$username=$bbuserinfo['username'];
if ($bbuserinfo['usergroupid']==10 || $bbuserinfo['usergroupid']==5 || $bbuserinfo['usergroupid']==7 || $bbuserinfo['usergroupid']==6 || $bbuserinfo['usergroupid']==9)
{
include("up.php");
}
else
{
include("noup.php");
}
}
else
{
include("loginrequired.php");
}
I know that this executes before the template gets called and HTML written but it's the best way I can visualize. I basically just need help integrating the PHP file with the vB template. The script that's called when the conditions are met is an upload script that calls itself during operation and I'm just not sure how to get the seemingly two different files (php and template) to work as one with it. If there is a way to put the PHP in the template that would be ideal, but I haven't figured out how to yet.
I do realize that this is kind of vague so please ask if you're not sure what I'm asking for.
Thanks in advance
Rireal
edit: Easily put, how do I put the above code in an actual vB template.