The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I have an img being used in a template and I am trying to create an if statement to display a defined image if one doesn't exist. Currently if an image doesn't exist the img alt is displayed. I want to be able to display a preset image if one doesn't exist instead of the alt text.
What I need is the condition part of the if statement if anyone can help me on the following: Code:
<if condition=???????>
<img src="$vboptions[bburl]/quiz.php?quizid=$quiz[quizid]&image=1" alt="$quiz[title]" hspace="10" />
<else />
<img src="../forum/images/no_image.jpg" hspace="10" />
</if>
|
|
#2
|
|||
|
|||
|
You'll need a way to create/check if the image is there with PHP code. The simple HTML conditionals won't do it without having the php code check for the image first.
|
|
#3
|
||||
|
||||
|
I agree a simple <if condition> isn't going to work, but if you ever want a few more, check out this link.
|
|
#4
|
|||
|
|||
|
Thanks Guys, I thought that may be the case but have limited knowledge
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|