The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Should variables contain apostrophes in templates?
Should variables contain apostrophes in templates?
What I mean by this is should they look like this: Code:
<if condition="$post['fieldx'] == 'lala'"> .... Code:
<if condition="$post[fieldx] == 'lala'"> .... Note to mods: I have accidentally posted this in the wrong forum, it should be in the vB3 General Discussions or vB3 Programming Discussions. |
#2
|
||||
|
||||
Zend uses quotes... http://framework.zend.com/manual/1.1...ing-style.html
PHP doco says use quotes... http://www.php.net/manual/en/language.types.array.php Quote:
|
Благодарность от: | ||
PinkMilk |
#3
|
|||
|
|||
So basically treat as if they where php.
|
#4
|
|||
|
|||
Right, the stuff in a condition goes pretty much directly into an if statement (although it's checked for function calls that aren't allowed). It's the same in vb4, even though the tag syntax is a little different.
And although you didn't ask about it, variables used in a template (in vb3) go in to a double quoted string, so those rules apply there. |
Благодарность от: | ||
PinkMilk |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|