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

Disallow guests from selecting styles?

Discussion in 'XenForo Questions and Support' started by Vicros, Sep 21, 2011.

  1. Vicros

    Vicros Active Member

    I am looking for a way to not allow guests to select any other style but the default. Can anyone help me?
     
  2. Cezz

    Cezz Well-Known Member

    I think currently your only options are

    #1 disable all but default style for selection by anyone!
    #2 use template conditionals to hide the chooser if guest (though they could still change style with direct link)
     
    Vicros likes this.
  3. Vicros

    Vicros Active Member

    Thank you, can you direct me where i might find that code edit?
     
  4. Digital Doctor

    Digital Doctor Well-Known Member

  5. Cezz

    Cezz Well-Known Member

    As a direct template edit you can edit the footer template in admincp

    FIND
    Code:
                    <xen:if is="{$canChangeStyle}">
                        <dt>{xen:phrase style}</dt>
                        <dd><a href="{xen:link 'misc/style', '', 'redirect={$requestPaths.requestUri}'}" class="OverlayTrigger Tooltip" title="{xen:phrase style_chooser}">{$visitorStyle.title}</a></dd>
                    </xen:if>
    REPLACE WITH
    Code:
                    <xen:if is="{$canChangeStyle} AND {$visitor.user_id}">
                        <dt>{xen:phrase style}</dt>
                        <dd><a href="{xen:link 'misc/style', '', 'redirect={$requestPaths.requestUri}'}" class="OverlayTrigger Tooltip" title="{xen:phrase style_chooser}">{$visitorStyle.title}</a></dd>
                    </xen:if>
     
    Vicros likes this.
  6. Digital Doctor

    Digital Doctor Well-Known Member

    While on the topic ... why would you want that ?
     
  7. Vicros

    Vicros Active Member

    Helps with rippers, among other things lol

    And thank you so much Cezz.
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    ^this^

    That is all that is required:

    Admin CP -> Appearance -> Styles -> [click a style] -> Allow user selection
     
  9. Cezz

    Cezz Well-Known Member

    Well they specified to disable style for guests, so I assumed that they didn't want to disable it for all users which this would do!
     
    Vicros likes this.
  10. Vicros

    Vicros Active Member

    Exactly Cezz, it worked perfect.
     

Share This Page