The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
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:
|