PDA

View Full Version : unexpected T_ENCAPSED_AND_WHITESPACE


squishi
11-08-2009, 02:52 PM
I have this custom template

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<if condition="$show['search_noindex']"><meta name="robots" content="noindex,follow" /></if>
$headinclude
<title>$pagetitle - $vbphrase['vbulletin_message']</title>
$headinsert
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="70%" align="center">
<tr>
<td class="tcat">

$vbphrase[vbulletin_message]

</td>
</tr>
<tr>
<td class="alt2" align="center"> <!-- panelsurround -->

<form action="profile.php?do=doaddlist&amp;list=&amp;userid=$userinfo['userid']" method="post">
<input type="hidden" name="s" value="$session['sessionhash]'" />
<input type="hidden" name="securitytoken" value="$bbuserinfo['securitytoken']" />
<input type="hidden" name="do" value="doaddlist" />
<input type="hidden" name="userlist" value="friend" />

<input type="hidden" name="userid" value="$userinfo['userid']" />
<input type="hidden" name="url" value="$url" />

<div class="panel">
<div align="$stylevar[left]">

<div style="margin: 10px">

<phrase 1="$userinfo['username']">$vbphrase['privateprofile']</phrase>
<br /><br />

Add $userinfo['username'] to your contacts?
<div style="margin-top:1em"><label for="also"><input type="checkbox" name="friend" id="also" value="1" checked="checked" disabled />Send a friend request to $userinfo['username']</label></div>
<input type="hidden" name="friend" id="also" value="1" checked="checked" />
<br />
<input type="submit" class="button" value="Yes" name="confirm" accesskey="s" />
<input type="submit" class="button" value="No" name="deny" />
</div>

</div>
</div>

</form>

</td>
</tr>
</table>

<br />

<if condition="!$show['enableforumjump']">
<!-- forumjump -->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>$forumjump</td>
</tr>
</table>
<!-- /forumjump -->
</if>

<br />

$footer

</body>
</html>

...but vbulletin won't let me save it without this error message...

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /www/virtual/forum/includes/adminfunctions_template.php(3939) : eval()'d code on line 6

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

I really don't see the problem. :confused:

--------------- Added 1257699616 at 1257699616 ---------------

Okay. Solved it by adding the lines one by one.
I had to remove all the single quotes.

Never understood when you can use them or not.
Sometimes it seems okay, sometimes not.