![]() |
If ...Else...help please!!
Hi there all.
Im new to PHP but having some troube in getting some simple bit of code to work.And I am trying... I know that the syntax for a PhP if..Else test is basically: < if(condition) dothis.... else dothat.... > But inside VBulletin when I go to edit my navbar template I see this: HTML Code:
<if condition="$bbuserinfo['pmunread']"> HTML Code:
<if condition="$bbuserinfo['pmunread']"> Many thanks, Naeem anyone??? |
<else />
|
You might also want to switch your images -- you've got the No New PMs image being displayed when there are Unread Messages and the New PMs Image being displayed when there aren't any.
|
Quote:
Dont worry it wasnt like that in the actual code as I didnt copy and paste all of it 1st time around. Below is the actual code I put in with <IF><Else/> and its still not working. Basically if there is a message then show newpm.gif otherwise show nonewpm.gif...at the moment it shows neither or both! For the life of me I really cant see why it shouldnt work....it still 'reads' good to me.:surprised: HTML Code:
<if condition="$bbuserinfo['pmunread']"> |
<else /> don't forget the space before the / and it's better if you post your code here in code tags.
|
Quote:
I always thought that the space before the > didnt matter and that the space was just insignificant! Now i know...many thanks again for your help :) |
All times are GMT. The time now is 11:16 AM. |
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:
|