The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[SOLVED] help : if conditional - Syntax error when saveing template [SOLVED]
Got a registered var, i get and want to check with if statment
to weither to show report link or not.. Howewer when trying to save this, i get unexspected , or unclosed tag.. so if the statment is 3 then no link is shown, how ewer any other value will show the link. Code:
<vb:if condition="({vb:raw moderated}, 3)"> <vb:else /> <a class="botton" href="EIG.php?do=reportgallery&galid={vb:raw userid}"> Report offensive gallery(NEED PHRASE) </a> </vb:if> condition=({vb:raw moderated}, 3)> didnt save at all. EDIT + UPDATE : after re-reading this article -> https://vborg.vbsupport.ru/showthrea...ht=conditional I then tryed another cconditional Code:
<vb:if condition="{vb:raw moderated} == 3"> <vb:else /> <a class="botton" href="EIG.php?do=reportgallery&galid={vb:raw userid}"> Report offensive gallery </a> </vb:if> |
#2
|
|||
|
|||
Code:
<vb:if condition="{vb:raw moderated} != 3"> <a class="botton" href="EIG.php?do=reportgallery&galid={vb:raw userid}"> Report offensive gallery </a> </vb:if> |
#3
|
||||
|
||||
Quote:
The following error occurred when attempting to evaluate this template: Parse error: syntax error, unexpected '{' in C:\xampp\xampp\htdocs\emod\includes\adminfunctions _template.php(4667) : eval()'d code on line 26 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. using { inside the "" gives this error, howewer also tryed using ' ' instead of "" the problem is not getting the data to the template, the problem is saveing the template. |
#4
|
||||
|
||||
You do not use the new syntax in conditions.
HTML Code:
<vb:if condition="$moderated == 3">
|
#5
|
||||
|
||||
ohhh.. well tx it worked.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|