Okay, so I’m using PHP Version 4.3.8 and I’m happily coding along until I get to this:
$PICS_IMG = 0;
// Special icon
if ($forum_id == 14)
$PICS_IMG = ( $unread_topics ) ? "http://www.googlecommunity.com/f/14n.gif" : "http://www.googlecommunity.com/f/14.gif";
// Default icon
if ($PICS_IMG == 0)
$PICS_IMG = ( $unread_topics ) ? "http://www.googlecommunity.com/f/1n.gif" : "http://www.googlecommunity.com/f/1.gif";
What do you expect to happen if $forum_id is 14? I would expect either 14n.gif or 14.gif, because once that is set, $PICS_IMG will not be 0.
But no! That’s not the case!
The expected behavior (to me) only occurs if I use if ($PICS_IMG === 0) — that is, I add an extra = sign. More info at PHP language comparison operators.
- Big problems in the search engine world
- Installed MRTG
- AIM Mail Icon
- How to Install Bad Behavior on WordPress
- Mac Mini in comparison to Dell
- RPC Services to Ping
- First entry in the AS Journal
- Scammer Steals Moderator Account
- My Jam Band
- I’m the Boss - a Joke



i tried it for my forums http://www.talklifeforums.com and its not working
if ($forum_id == 14)
{ // Bracket.
$PICS_IMG = ( $unread_topics ) ? “http://www.googlecommunity.com/f/14n.gif” : “http://www.googlecommunity.com/f/14.gif”;
} // Another one.
Is your coding the reason why the Cybiko forums are down?