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

Allow user to choose features

Discussion in 'Styling and Customization Questions' started by Dynamic, Dec 13, 2011.

  1. Dynamic

    Dynamic Well-Known Member

    Hi everyone,

    I just installed this hack http://xenforo.com/community/threads/floating-navigation-bar.19295/

    The problem is, it does not work on older browsers or some mobile phones.

    I would like to add in a preference to turn it on or off in the users control panel. I would like it to be off by default. You need to include a template in order for it to work, so I was just thinking based on the choice it either loads the template or it does not.

    Any help please?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can create a custom profile field as a user preference:

    Admin CP -> Users -> Custom User Fields

    Then you can surround your template code with this condition:

    <xen:if is="{$visitor.customFields.field_id}">
    You need to enter the field_id of the profile field.
    Dynamic likes this.
  3. Dynamic

    Dynamic Well-Known Member

    That worked perfectly. Thank you so, so much :)

Share This Page