1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Edit Colour Based on Usergroup

Discussion in 'Styling and Customization Questions' started by JordanH, Sep 24, 2016.

  1. JordanH

    JordanH Well-Known Member

    So I know all about Conditional statements. However, I have yet to find one for what I want.
    What I am trying to achieve is changing a border colour on someone's profile based on what usergroup they are in. (Not the person browsing the profile, but the user of the profile)

    Example of what I mean
    Usergroup One: https://snaap.me/kiqfgn
    Usergroup Two: https://snaap.me/ERsU3Q
    Usergroup Three: https://snaap.me/Kx5oGk
    Usergroup Four: https://snaap.me/4m84Bj

    Etc etc etc....

    So basically the top colour is based on the usergroup of the profile you are visiting. how can this be achieved?
  2. JordanH

    JordanH Well-Known Member

    An example of this is for messages, I did something similar. I did this:
    {xen:helper ismemberof, $message, 3}
    <div class="messageHeading <xen:if is="{xen:helper ismemberof, $message, 3}">messageHeadingAdmin</xen:if>">
    This says if the user of the message is an admin, add the "messageHeadingAdmin" class to it. I want something similar but instead of messages, for profiles.

Share This Page