The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
anyone know why it keeps saying parse error expecting `']''
HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle] - vB Journal: <if condition="$journalinfo[journalname]">$journalinfo[journalname] Journal<else />$journalinfo[journalist]'s Journal</if></title> $headinclude <script type="text/javascript"> function validate() { form=document.comment ctitle=form.title.value cmessage=form.comment.value submitOK="true" if(ctitle.length<3) { alert("The title for your comment must be at least 3 characters.") submitOK="false" } if(cmessage.length<5) { alert("Your comment must be at least 5 characters.") submitOK="false" } if(submitOK=="false") { return false } } </script> </head> <body> $header $navbar <table align="center" width="100%" border="0"> <tr> <td> <table class="tborder" align="center" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0"> <tr> <td class="tcat" colspan="2">Journal Info</td> </tr> <tr> <td class="alt2"><if conditon="$avatar[avatarpath]"><img src="$avatar[avatarpath]" border="0" /></if><if condition="$avatar[userid]"><img src="image.php?u=$avatar[userid]" border="0" /></if></td><td class="alt1">Journalist:<a href="member.php?userid=$journalinfo[journalist_id]">$journalinfo[journalist]</a><br /> # of Entries: $journalinfo[entries](Private: $journalinfo[priventries])</br> Start Date: </td> </tr> </table> </td> </tr> <tr> <td align="center"><if condition="$bbuserinfo['userid']==$journalinfo['journalist_id']">:<a href="journal.php?do=addentry&j=$j">Add Entry</a>:-</if>:<a href="#adcom">Add Comment</a>:</td> </tr> <tr> <td align="center"> $entrybits </td> </tr> </table> <br /> <a name="adcom"> <form action="journal.php?do=insertcomment&j=$j" method="post" name="comment" onsubmit="return validate()"> <input type="hidden" name="commenter" value="$bbuserinfo[username]" /> <input type="hidden" name="commenterid" value="$bbuserinfo[userid]" /> <input type="hidden" name="j" value="$j" /> <table class="tborder" align="center" cellspacing="$styelvar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0"> <tr> <td class="tcat">Add Comment to <if condition="$journalinfo[journalname]">$journalinfo[journalname] Journal<else />$journalinfo[journalist]'s Journal</if></td> </tr> <tr> <td class="alt1">Title: <input type="text" name="title" <if condition="!empty($e)">value="Re: $entryinfo[entrytitle]"<else />value=""</if> maxlength="100" size="70" /></td> </tr> <tr> <td class="alt2" align="center"><fieldset><legend>Comment:</legend><table><tr><td><textarea name="comment" cols="60" rows="4"></textarea></td></tr></table></fieldset></td> </tr> <tr> <td class="alt1" align="center"><input type="submit" value="Add Comment!" class="button" /></td> </tr> </table> </form> </a> <br /> <table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" align="center" width="100%"> <tr> <td class="tcat">Recent Comments</td> </tr> $reccombits </table> <br /> <center> <if condition="$bbuserinfo[userid]==$journalinfo[journalist_id]">:<a href="journal.php?do=addentry&j=$j">Add Entry</a>:-</if>:<a href="#adcom">Add Comment</a>:</center> <br /> $footer </body> </html> |
#2
|
||||
|
||||
![]()
In every conditional you have, it should contain the single quotes within the brackets of an array.
e.g. PHP Code:
PHP Code:
|
#3
|
||||
|
||||
![]()
i removed them and i still receive the error
here is my updated code: HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle] - vB Journal: <if condition="$journalinfo[journalname]">$journalinfo[journalname] Journal<else />$journalinfo[journalist]'s Journal</if></title> $headinclude <script type="text/javascript"> function validate() { form=document.comment ctitle=form.title.value cmessage=form.comment.value submitOK="true" if(ctitle.length<3) { alert("The title for your comment must be at least 3 characters.") submitOK="false" } if(cmessage.length<5) { alert("Your comment must be at least 5 characters.") submitOK="false" } if(submitOK=="false") { return false } } </script> </head> <body> $header $navbar <table align="center" width="100%" border="0"> <tr> <td> <table class="tborder" align="center" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0"> <tr> <td class="tcat" colspan="2">Journal Info</td> </tr> <tr> <td class="alt2"><if conditon="$avatar[avatarpath]"><img src="$avatar[avatarpath]" border="0" /></if><if condition="$avatar[userid]"><img src="image.php?u=$avatar[userid]" border="0" /></if></td><td class="alt1">Journalist:<a href="member.php?userid=$journalinfo[journalist_id]">$journalinfo[journalist]</a><br /> # of Entries: $journalinfo[entries](Private: $journalinfo[priventries])</br> Start Date: </td> </tr> </table> </td> </tr> <tr> <td align="center"><if condition="$bbuserinfo[userid]==$journalinfo[journalist_id]">:<a href="journal.php?do=addentry&j=$j">Add Entry</a>:-</if>:<a href="#adcom">Add Comment</a>:</td> </tr> <tr> <td align="center"> $entrybits </td> </tr> </table> <br /> <a name="adcom"> <form action="journal.php?do=insertcomment&j=$j" method="post" name="comment" onsubmit="return validate()"> <input type="hidden" name="commenter" value="$bbuserinfo[username]" /> <input type="hidden" name="commenterid" value="$bbuserinfo[userid]" /> <input type="hidden" name="j" value="$j" /> <table class="tborder" align="center" cellspacing="$styelvar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0"> <tr> <td class="tcat">Add Comment to <if condition="$journalinfo[journalname]">$journalinfo[journalname] Journal<else />$journalinfo[journalist] 's Journal</if></td> </tr> <tr> <td class="alt1">Title: <input type="text" name="title" <if condition="!empty($e)">value="Re: $entryinfo[entrytitle]"<else />value=""</if> maxlength="100" size="70" /></td> </tr> <tr> <td class="alt2" align="center"><fieldset><legend>Comment:</legend><table><tr><td><textarea name="comment" cols="60" rows="4"></textarea></td></tr></table></fieldset></td> </tr> <tr> <td class="alt1" align="center"><input type="submit" value="Add Comment!" class="button" /></td> </tr> </table> </form> </a> <br /> <table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" align="center" width="100%"> <tr> <td class="tcat">Recent Comments</td> </tr> $reccombits </table> <br /> <center> <if condition="$bbuserinfo[userid]==$journalinfo[journalist_id]">:<a href="journal.php?do=addentry&j=$j">Add Entry</a>:-</if>:<a href="#adcom">Add Comment</a>:</center> <br /> $footer </body> </html> |
#4
|
||||
|
||||
![]()
Updated code? It still looks the same.
It should have the single quotes around array elements, in conditionals. $avatar['avatarpath'] is good, whereas $avatar[avatarpath] isn't. Again, I don't know if this is why it's not working, but you must try it. |
#5
|
||||
|
||||
![]()
now i get parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle] - vB Journal: <if condition="$journalinfo['journalname']">$journalinfo[journalname] Journal<else />$journalinfo[journalist]'s Journal</if></title> $headinclude <script type="text/javascript"> function validate() { form=document.comment ctitle=form.title.value cmessage=form.comment.value submitOK="true" if(ctitle.length<3) { alert("The title for your comment must be at least 3 characters.") submitOK="false" } if(cmessage.length<5) { alert("Your comment must be at least 5 characters.") submitOK="false" } if(submitOK=="false") { return false } } </script> </head> <body> $header $navbar <table align="center" width="100%" border="0"> <!-- <tr> <td> <table class="tborder" align="center" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0"> <tr> <td class="tcat" colspan="2">Journal Info</td> </tr> <tr> <td class="alt2"><if conditon="$avatar['avatarpath']"><img src="$avatar[avatarpath]" border="0" /></if><if condition="$avatar['userid']"><img src="image.php?u=$avatar[userid]" border="0" /></if></td><td class="alt1">Journalist:<a href="member.php?userid=$journalinfo[journalist_id]">$journalinfo[journalist]</a><br /> # of Entries: $journalinfo[entries](Private: $journalinfo[priventries])</br> Start Date: </td> </tr> </table> </td> </tr> --> <tr> <td align="center"><if condition="$bbuserinfo['userid']==$journalinfo['journalist_id']">:<a href="journal.php?do=addentry&j=$j">Add Entry</a>:-</if>:<a href="#adcom">Add Comment</a>:</td> </tr> <tr> <td align="center"> $entrybits </td> </tr> </table> <br /> <a name="adcom"> <form action="journal.php?do=insertcomment&j=$j" method="post" name="comment" onsubmit="return validate()"> <input type="hidden" name="commenter" value="$bbuserinfo[username]" /> <input type="hidden" name="commenterid" value="$bbuserinfo[userid]" /> <input type="hidden" name="j" value="$j" /> <table class="tborder" align="center" cellspacing="$styelvar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0"> <tr> <td class="tcat">Add Comment to <if condition="$journalinfo['journalname']">$journalinfo[journalname] Journal<else />$journalinfo[journalist] 's Journal</if></td> </tr> <tr> <td class="alt1">Title: <input type="text" name="title" <if condition="!empty($e)">value="Re: $entryinfo[entrytitle]"<else />value=""</if> maxlength="100" size="70" /></td> </tr> <tr> <td class="alt2" align="center"><fieldset><legend>Comment:</legend><table><tr><td><textarea name="comment" cols="60" rows="4"></textarea></td></tr></table></fieldset></td> </tr> <tr> <td class="alt1" align="center"><input type="submit" value="Add Comment!" class="button" /></td> </tr> </table> </form> </a> <br /> <table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0" align="center" width="100%"> <tr> <td class="tcat">Recent Comments</td> </tr> $reccombits </table> <br /> <center> <if condition="$bbuserinfo['userid']==$journalinfo['journalist_id']">:<a href="journal.php?do=addentry&j=$j">Add Entry</a>:-</if>:<a href="#adcom">Add Comment</a>:</center> <br /> $footer </body> </html> |
#6
|
|||
|
|||
![]() Quote:
Otherwise, paste the code into your main script and run it instead of calling eval, then the error message will tell you which line it failed. Naturally get the raw template code from the other field of the template table instead these <if condition=()>... |
#7
|
||||
|
||||
![]()
try removing the jscript and then see if it parses.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|