![]() |
if conditions inside of an else statement
EDIT I FIXED IT FORGOT MY END " (FIXED IN RED)
But now for users not logged in it's showing 2 avatars =/ so ill leave this see if anyone can help me fix it =) EDIT 2 this is solved request closed =) im trying to use this code to show a different default avatar depending on if the user is registered/ male or female. i set it up to be if user has an avatar display that users avatar, if user doesnt but is registered (i have a required userfield at reg, to get the male/female) display male or female default accordingly, but if user is not registered it will just display a ? avatar. Code:
<if condition="$navbaravatarurl"> When i use the code like this it works fine... but kind of kills the way i want to set it up. Code:
<if condition="$navbaravatarurl"> |
I don't think those conditions will work how you want it to anyway. You will end up with two images. Also, is this in the postbit template? $bbuserinfo is the user *viewing* the site, not the poster.
I think you need to do... if field isn't Male or Female - no.png else - if field is Male - - nom.png - else - - nof.png - end if end if |
i actually been playing with it the whole time not just sitting waiting for some one to spoon me lol, i was just coming back to say i got it =)
but to answer your question, no it's not for the postbit but i might do something similar with the postbit(s) =) this is a sidebar addon im working on you can check out here (toggles on the right side) i had to take a plugin already made (navbar avatar or something) and ive re-wrote it a little, not quite to where i want it yet plus id rather be able to change the images and things in the CP if i do publicly release it, but its coming along =) FINAL CODE I ENDED UP USING: Code:
<if condition="$navbaravatarurl"> |
I'm glad you got it.
|
1 Attachment(s)
thanks =)
and some spoilers =P |
All times are GMT. The time now is 08:59 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|