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

XF 1.1 Defference style for guests and logged in users

Discussion in 'XenForo Questions and Support' started by Veer, Oct 19, 2011.

  1. Veer

    Veer Well-Known Member

    I have two styles, and i am looking for a way to force difference style for guest visitors and registered users. i.e

    Style 1 : for guests
    Style 2 : for registered users
     
    Digital Doctor likes this.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. Digital Doctor

    Digital Doctor Well-Known Member

    Interesting idea !
    What is the difference between guest and logged in member ?
     
  4. Veer

    Veer Well-Known Member

    Meaning that i wanted my guest visitors to view my site with Style 1 And when they log in with their account they browse forum with Style 2.
     
  5. Floris

    Floris Guest

    Just thinking outloud here.

    but you can try wrapping the page_container line:
    Code:
    <link rel="stylesheet" href="css.php?css=xenforo,form,public&amp;style={xen:urlencode $_styleId}&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />
    around a conditional
    force it to be 1 thing for guests, so it's something else for members.
    Code:
    <xen:if is="{$visitor.user_id}"><xen:comment>logged in user style id</xen:comment>
    <link rel="stylesheet" href="css.php?css=xenforo,form,public&amp;style=1&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />
    <xen:else /><xen:comment>guest style id</xen:comment>
    <link rel="stylesheet" href="css.php?css=xenforo,form,public&amp;style=8&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />
    </xen:if>
     
    Veer and Mikey like this.

Share This Page