Highlighting Admins' Comments

edited July 2008 in Vanilla 1.0 Help
Here is what I'd like to do:

On comments.php

if AuthUserRole = ['Administrator'] comments.style.backgroundColor = "#1874CD"; if AuthUserRole = ['Guest'], ['Member'] comments.style.backgroundColor = "transparent"

This should highlight the Administrator comments as Blue, but doesn't! -- and leave the Guest and Member comments as White. If anyone could give me a hand.

Thanks!

Comments

  • edited July 2008
    you should create a new theme for that, in short:
    1- create a new folder inside the Themes folder, name it as you want
    2- copy comments.php from the Themes folder and paste it inside the new folder created in 1
    3- edit that themes/new_folder/comments.php , line 69 (approx):
    if ($Comment->AuthUserRole == 'Administrator') $CommentClass .= 'AdminHighlighted';4- add the css needed in vanilla.css (i don't know if need to add in the default one ore also create a new style inside the newly created theme folder)#Comments li.AdminHighlighted { background-color:#1874CD; }
    edit: I hope I haven't forget anything!

    if the color doesn't show up in the background, add !importantjust between the color code and the ; in the css
  • An excellent feature that could be added to the core with a single checkbox! :)
  • An excellent feature that could be added to the core with a single checkbox! :)
    Yes, a Text Box to Type the HEX Color Code for the Color of the Comment Background. Maybe I can mess with it and add this.

    btw, Miquel - Thanks for that!
This discussion has been closed.