Page 1 of 11
Forum moderator: bigblog 
uCoz Community » For Webmasters » Design Customization » Why wont this markup work? ( if/else, images, forum) (Please help me, need help quick!)
Why wont this markup work? ( if/else, images, forum)
Verum
Posts: 27
Reputation: 0

Message # 1 | 6:00 PM
So because we cant use PNGs as rank images, and only gifs, I resorted to changing what is displayed instead. But why is it only my first rank displays the correct image and all the other ranks only display a box and the alt text? I put the code below. Please help me find why this may not be working correctly!

Code
<?if($GROUP_ICON$)?><br><div class="postRankIco">$GROUP_ICON$</div><?else?>
      <?if($USER_RANK_NAME$='Level 1')?><div class="postRankIco"><img src="http://cypris.ucoz.com/avatar/userRanks/rank1.png" alt="Less then 10 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Level 2')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank2.png" alt="More then 10 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Level 3')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank3.png" alt="More then 20 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Level 4')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank4.png" alt="More then 35 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Level 5')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank5.png" alt="More then 50 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Level 6')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank6.png" alt="More then 75 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Level 7')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank7.png" alt="More then 100 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Experienced')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank8.png" alt="More then 150 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Addicted')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank9.png" alt="More then 225 posts" width="220" height="56"></div><?endif?>
      <?if($USER_RANK_NAME$='Elite')?><div class="postRankIco"><img scr="http://cypris.ucoz.com/avatar/userRanks/rank10.png" alt="More then 300 posts" width="220" height="56"></div><?endif?>
      <?endif?>


Keep in mind Level 1 DOES work correctly but the others only do the alt text.

Added (2015-05-10, 6:00 PM)
---------------------------------------------
Okay, I skimmed the code numerous times and could not figure it out but I just copied and pasted the first line and updated it with proper parameters so it was exactly the same, and it works now.

Even though it works now, I'm still confused on wtf caused this. Unless somehow I missed something like a typo this many times, only thing I can think of is an invisible character inside the lines that I copied and pasted originally. No need for replies! smile


Using uCoz for years.
NTP
Posts: 292
Reputation: 10

Message # 2 | 11:37 PM
Quote Verum ()
<img scr

You wrote "scr" instead of "src". Simple mistake. Minutes of frustration. I simply focused on the fact that you said the alt shows instead, and assumed there was a problem with the image, and then bam!

Web design and film == my 2 passions.

Genesis Inc. ~ New Horizons, New Beginnings
Verum
Posts: 27
Reputation: 0

Message # 3 | 2:23 AM
Well then, thanks for clearing that up

If only this was like righting an essay, where you can put it into google translate and have it read it back to find errors. Too bad it doesn't read html.

Using uCoz for years.
Paradox
Posts: 3275
Reputation: 145

Message # 4 | 1:52 PM
Verum, conveniently we do have the HTML & CSS equivalents! If you check out the W3 validator service you'll be able to get feedback regarding HTML code fragments/pages. It's designed to validate HTML files, but if you ignore the file-relevant errors, you can identify any legitimate errors on your code fragments.

Alternatively, you can look at investing in an IDE such as Adobe Dreamweaver, Komodo IDE, Codeanywhere, etc. All these services provide code error checking. smile

Developer, Designer, Communicator.
Been here for 6 years and counting.
Visit me at alexmoloney.me.
uCoz Community » For Webmasters » Design Customization » Why wont this markup work? ( if/else, images, forum) (Please help me, need help quick!)
Page 1 of 11
Search: