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

XF 1.2 Postbit styling per usergroup issues

Discussion in 'Styling and Customization Questions' started by Autonamus, Oct 13, 2013.

  1. Autonamus

    Autonamus Active Member

    Hey all,

    Excuse any mistakes made in this as I am tired which as it happens is the main reason for my issue I believe.

    I am trying to style the postbit depending on the usergroup using <xen:if is="{xen:helper ismemberof, $user, x}" > with a <style type="text/css"> in it.

    I have this code in a template I have made which I am then linking with <link rel="xenforo_template" type="text/html" href="template.html" /> but keep getting met with errors like (depending what template I try and link into (Page_container for this example))


    NOW, I am sure (well it's kinda obvious) that I am doing something wrong, and most likely doing it completely backasswards and longwinded but any advice would be great.

    I am effectively editing these elements of css for a few different usergroups using the following code as an example.

    HTML:
    <xen:if is="{xen:helper ismemberof, $user, 6}" >
        <style type="text/css">
            .messageUserBlock div.avatarHolder {
            background-color: rgb(240, 247, 252)!important;
            }
            .messageUserBlock {
            background-color: rgb(217, 237, 247)!important;
            border: 1px solid rgb(188, 232, 241)!important;
            }
            .messageUserBlock h3.userText {
            color: rgb(58, 135, 173)!important;
            text-align: center!important;
            }
            .messageUserBlock a.username {
            color: rgb(58, 135, 173)!important;
            }
        </style>
    </xen:if>
     
  2. Autonamus

    Autonamus Active Member

  3. Autonamus

    Autonamus Active Member

    Nevermind solved it, I just applied a css class to the postbit depending on usergroup.
     

Share This Page