The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
elseif in templates
I have a special form for posting that I have used for a single forum and everything has worked well. Now that I'm adding a separate form with "elseif" it doesn't work. What have I done wrong?
Working code: Code:
<if condition="$forumid == 14"> <a href="form3.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]"> <img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /> <b>Ask a Question</b></a> <else /> <a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /> <b>Ask a Question</b></a> </if> Code:
<if condition="$forumid == 14"> <a href="form3.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]"> <img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /> <b>Ask a Question</b></a> <elseif condition="$forumid == 35" /> <a href="form35.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]"> <img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /> <b>Ask a Question</b></a> <else /> <a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /> <b>Ask a Question</b></a> </if> Thanks. I appreciate the help. |
#2
|
||||
|
||||
template conditionals dont support elseif statements so you have to nest it.
This is the part thats messing you up. Code:
<elseif condition="$forumid == 35" /> Code:
<else /> <if condition="$forumid == 35" /> yadda <else /> </if> </if> |
#3
|
|||
|
|||
Thanks Reeve,
I now understand - this isn't PHP in the templates, just template "code". |
#4
|
||||
|
||||
Exactly.
Have a look at the vBulletin Documentation for some more info about template conditionals: http://www.vbulletin.com/docs/html |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|