MyBB Community Forums

Full Version: Display a different image for guests and members
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm editing my HEADER template and am including an image on top of my logo area. How can I make it so one image displays for GUESTS and another one displays for MEMBERS?

Help would be greatly appreciated!

Tx in advance.
You can't be default, it needs PHP but PHP isn't enabled in templates by default... you could use this: http://community.mybboard.net/thread-318...=templates
Ok, I've installed it. But I am having trouble doing the code for a logged in user vs an unregistered user...*hits forehead*
Should only be a simple if statement.

I don't know the exact code but just check if the uid == 0 and if so display the guest images else display the other images. Wink
Yea, I know how to do the if statement. I just need the lil' code niblet for a user being logged in. I don't know that part.
You don't need to just do else and put the images in there like they are for the guests(different location of course).
<if *USERRR LOGGEDDD IN NIBLLEETT* then>

<img src="images/user.gif">

<else /><img src="images/guest.gif"></if>

So I shouldn't do it this way?
Basically(as far as I know I lack a lot of php knowledge).

I would also switch them as it's easier to check if their a guest than it is to see if they're a user.
Okay, I got it. I added your id == 0 and it works

<if id == 00 then>

<img src="images/user.gif">

<else /><img src="images/guest.gif"></if>

Thanks for your help :}