• 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

Dynamic

Well-known member
#1
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?
 

Jake Bunce

XenForo moderator
Staff member
#2
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:

Code:
<xen:if is="{$visitor.customFields.field_id}">

</xen:if>
You need to enter the field_id of the profile field.