PDA

View Full Version : Simple If and Else functions, How do I do?


BrotherX
09-22-2007, 09:30 AM
Hello, I am new in vbulletin community, so I have one small problem. I made something and I want that my forum guests when they enter one side see one thing and members and all other other thing.

Usuall in other script I use option if and else. But it seems that here that don't work. anybody have idea how i made this?

So here is code for guests

<if condition="$show['guest']">

<!-- guest welcome message -->

GUEST OPTION

<!-- / guest welcome message -->
</if>


Members and rest, code

<if condition="$show['loggedinusers']">
<!-- logged-in users -->

OPTION MEMBERS

<!-- end logged-in users -->
</if>


When I put those codes one to other, for guests I see both of the options, for members just members option. How to made this, that guests only see guests options, and members only members option?

Thanx

Dismounted
09-22-2007, 09:55 AM
<if condition="$show['guest']">
GUESTS STUFF
<else />
MEMBERS STUFF
</if>

BrotherX
09-22-2007, 12:38 PM
<if condition="$show['guest']">
GUESTS STUFF
<else />
MEMBERS STUFF
</if>Thanx, I know about if and else code in php, but didn't know how to implement that in vbulletin.

I will try that now.