Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Simple Code Question

  • 20-03-2013 10:17pm
    #1
    Registered Users, Registered Users 2 Posts: 158 ✭✭


    I've been re-writing code all day and I reckon I've just hit the wall and my brain has given up. I just need help with one line of code regarding an image.

    Basically, it's the PM option

    I've re-written it about 30 times and just cannot get it to work.
    At present, I have two "pm" images. One for new pms and one for when there are no new pms which should be visible at all times unless a new pm arrives (which would then be replaced by the "new pm" image).
    This is the only version of code that seems to get the new image to replace the original one... only problem is the original image will not show up now either before the new pm or after it has been read. I know it's probably something simple but it would be great if someone could show me where I have gone wrong please.
    <!-- IF PRIVATE_MESSAGE_INFO_READ --><a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/pm.gif" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" /></a><!-- ENDIF --><!-- IF PRIVATE_MESSAGE_INFO_UNREAD --><a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/new_pm.gif" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" /></a><!-- ENDIF -->
    


Comments

  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    Should you not have an else instead of 2 if statements? And simplify it to something like this using css classes?

    <a href="{U_PRIVATEMSGS}" title="{PRIVATE_MESSAGE_INFO}" <!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->class="unread"<!-- ELSE -->class="read"<!-- ENDIF -->></a>


  • Registered Users, Registered Users 2 Posts: 158 ✭✭Denise90


    Didn't enter my scrambled head to use ELSE, thank you!


Advertisement