XF 1.x Adding Other XB Features as User Options??

r3v0lution

Active Member
I noticed there was not a discussion made for the Sticky Nav User Option and I had a question "similar" to this....

I would like to add a user option for the "Sticky Sidebar" as well, but I wasn't sure if it was even possible.

But how far could this be taken in the XB framework?? User Panel Option? Top Bar Option? Etc....

Could this guide be followed to achieve any of these other features?
 

Russ

Pixel Exit Staff
It's possible but it could be tricky depending on what you want to do. The user navigation has so many conditionals built into it already due to the various locations/setups possible, but if you had something specific in mind I could probably guide you on it.
 

r3v0lution

Active Member
Ok, well there nothing in particular, I just thought I would ask.. I will play around and see what I can come up with. I just figure since people like option, why not try.
 

r3v0lution

Active Member
Made a "Floating Sidebar" user option with the same method, and it works like a charm! Followed the same instructions as the floating nav..
Changed:
Code:
<xen:if is="{$sidebar} AND @xb_stickySidebar">
<script src="@xb_stickySidebarpath"></script>
to:
Code:
<xen:if is="{$sidebar} AND @xb_stickySidebar AND {$visitor.customFields.stickySidebar.on} == 'on'">
<script src="@xb_stickySidebarpath"></script>
 

Russ

Pixel Exit Staff
Made a "Floating Sidebar" user option with the same method, and it works like a charm! Followed the same instructions as the floating nav..
Changed:
Code:
<xen:if is="{$sidebar} AND @xb_stickySidebar">
<script src="@xb_stickySidebarpath"></script>
to:
Code:
<xen:if is="{$sidebar} AND @xb_stickySidebar AND {$visitor.customFields.stickySidebar.on} == 'on'">
<script src="@xb_stickySidebarpath"></script>
Awesome :D, power of XenForo and XenBase combined (y)
 

r3v0lution

Active Member
Wanted to try another custom field using this method, but I can't find the correct way to do it... I have a nav tab enabled for a full page chat. But in order to keep the nav bar tidy I would like to let the user choose to display it. In the "navigation" template there is no way to target the "Chat" tab, that I have found at least. I can only target <!-- extra tabs: middle --> and <!-- extra tabs: end -->. So it removes all tabs in that section.

I know this isn't really something that involves PE, but do you know of an easy way to target only the chat tab? Or should I seek assistance on the devs discussion?
 

Russ

Pixel Exit Staff
You could do some simple css behind the conditional:

Code:
<xen:if is="{$visitor.customFields.disableChat.on} == 'on'">
.navTab.chat .navLink, .navTab.chat .SplitCtrl {
display: none;
}
</xen:if>
Place that inside like xb_custom_style.css

Then create the user field, "Disable Chat", it should work.
 

r3v0lution

Active Member
I never could get this to work. Not really sure why. But I ended up just moving any tabs from the "end" position to the "middle". So now the Chat tab is the only one that is in the "End" position. Thx @Russ
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.