The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
A PHP if statement that works outside of vbulletin but not in my header
I have this statement
Code:
<?php if (strpos ($_SERVER["PHP_SELF"],'showthread.php')!==false) { echo "Thread"; } else { echo "Something else"; } ?> This is the error I'm getting Code:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in XXXX/forum/includes/adminfunctions_template.php(3939) : eval()'d code on line 16 Thanks. |
#2
|
||||
|
||||
You cannot put php code in templates.
|
#3
|
||||
|
||||
Use this,
Code:
<if condition="THIS_SCRIPT == 'showthread'"> Thread <else /> Something Else </if> |
#4
|
|||
|
|||
Thanks guys that worked perfectly. I didn't realise I couldn't put PHP code into the templates.
Thanks again. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|