PDA

View Full Version : Setting a Condition in Vbulletin


RVSmarter
09-23-2006, 07:51 PM
I have a conditional statement as follows:

<if condition="$show['custom']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/custom.gif" alt="$vbphrase[custom]" /> </if>

Where and how do I set the condition "$show['custom']" ?

Do I just put the code

$show['custom'] somewhere in the post that this is a condition for?

is there a Set condition command?

Thank you for the help.

RVSmarter
09-27-2006, 09:28 PM
Thanks again to all who helped.

993ti
10-22-2006, 11:58 PM
I'd like to know this too.
I already posted something similar like this on vbulletin.com, i'll let you know if it comes up with something useful.

Adrian Schneider
10-23-2006, 12:17 AM
Set it in a plugin. You'll have to use the right plugin, but in most basic cases, "global_start" is the one you want.$show['custom'] = true;You can also do it in templates, but it's not really a good idea because it can be extremely confusing to debug. <if condition="$show['custom'] = true">would set it to true.

Paul M
10-23-2006, 01:22 AM
You can also do it in templates, but it's not really a good idea because it can be extremely confusing to debug. <if condition="$show['custom'] = true">would set it to true.Ooh, that's a very bad thing to do, avoid like the plague.

Adrian Schneider
10-23-2006, 01:30 AM
Ooh, that's a very bad thing to do, avoid like the plague.
lol agreed

993ti
10-23-2006, 05:19 PM
Thx guys.
How should i create a plugin if i want to do this?
I'm trying to create a new condition so i can show an image when the img tag is used on forumdisplay similar like the trashcan (when a post is soft deleted) and paperclip (attachments).
I know that i need to edit the threadbit template but i don't know how to use a condition or how to create a custom one to show a small image when the img tag is used.

See this (http://www.aibo-forum.nl/viewforum.php?f=13) for an example of what i wrote for my phpBB forum.
Notice the camera's, they only show when the img tag is used in the topic.

Any ideas?
Thx in advance.