The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm writing a few custom pages for my site, one of which is an email form. I have a varaible in the PHP called $sendfail which is set to 0 or 1 depending if the email sent correctly. How can i check this value using <if> in the template so i can display the relevant message? I presumed it would have been <if $sendfail == "0"> but this doesnt seem to work.
Any help would be great, thanks |
#2
|
|||
|
|||
![]() HTML Code:
<if condition="$sendfail"> ...... </if> |
#3
|
|||
|
|||
![]()
so can i test that for a matching value like
HTML Code:
<if condition $sendfail == "0"> Do something if it was equal to zero </if> <if condition $sendfail =="1"> Do something else here if it was equal to 1 </if> HTML Code:
<if $sentto == "The Admin Team"> do something </if> |
#4
|
|||
|
|||
![]()
Yes both are correct. Since the $sendfail is a boolean, you could also just perform the test like i gave in my example above.
|
#5
|
|||
|
|||
![]()
For some reason this just will not work, here's a bit of my template:
HTML Code:
<tr> <td class="alt1">Here we have added all the websites of interest for everything from Engine tuners and performance parts retailers to buying those hard to find cables for you ICE install. This is what the var contains: $showcategory <if $showcategory == "Display body retailers"> Some test text here</if> </td></tr> |
#6
|
||||
|
||||
![]()
The format is <if condition="xxxxxxx"> ....... </if>
Where xxxxxx is what you want to test - so in your example above you need ; <if condition=" $showcategory == 'Display body retailers' "> |
#7
|
|||
|
|||
![]()
Nice one
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|