The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How put PHP into templates or work around?
After playing with this all day I've decided to ask for help.
I've used this 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. Code:
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 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. |
#2
|
||||
|
||||
You can't, but take a look in the modifications hints & tips forum on how to do it in a different way You should be looking for a phpinclude tutorial. phpinclude_start and phpinclude_end are the only templates where you can place raw PHP into. So do so with care
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|