Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Individual CSS for Comments from individual Groups

edited August 2008 in Vanilla 1.0 Help
Hi there.
Is there any chance to assign an individuall css to the comments from members of a certain group?

Would be great, i.e. to highlight posts by admins or mods.

cheers,
stahl.

Comments

  • edited August 2008
    I'm pretty sure that the CommentNotice (Role tagline) class could be utilized in such a way.

    One would define the color (e.g. #f7f7f7) of a role's comment background instead of it's description (e.g. Administrator). But that would require some theme-tweaking.

    -[ edit ] ----------

    Just tested it - works like a charm :] If you're willing to sacrifice the Role tagline, I can post the changes that need to be done to the theme. Just tell me which theme you're using.
  • Oh. Thanks! I'm using the standard theme! :)
  • edited August 2008
    In /themes/vanilla/styles/default/vanilla.css find this:

    #Comments .CommentNotice { padding: 6px; font-size:13px; text-align: center; border-top: 1px solid #D9999A; border-bottom: 1px solid #D9999A; background: #FEE1E1; color: #850406 !important; margin: 10px 0px 10px 0px; }
    and replace it with:

    #Comments .CommentNotice { margin: 0; padding: 10px 0; }
    Then replace comments.php in /themes/ with » this file «.

    Now in Roles & Permissions settings you can put whatever CSS styling you wish for a role. Just put it in the Role tagline field.

    For example:

    border-left: 5px solid #ccc; background: #f7f7f7
    Whatever you put in that field gets wrapped in style="/role-tagline/".
  • Thanks! I'll try that asap. :)
This discussion has been closed.