![]() |
Horizontal Sidebar
I used to be able to do this without much pain, but since some of the more recent Mys versions, I am no longer sure how to do this!
Trying to set it up like so: Logged In User sees: Username $000000 Messages Inventory Pets Logout (Link to account, link to donate page, link to messages, inventory, etc.) Logged In Staff sees: Username $000000 Messages Inventory Pets Logout ACP Guest sees: Username: [input box here] Password: [input box here] Login or Register I am looking through class_sidebar right now, and I am quite sure this is where I need to do the editing, but as I said I no longer actually know how. If someone could help out a bit, it would be greatly appreciated (and would help me to be able to start releasing some themes XD) |
The links that appear there are done in the AdminCP (Links -> Edit a link, down past the navlinks are the sidelinks), or, you can modify the database table _links (which might even be a little faster - you can double click any of the fields in phpMyAdmin to edit them in place).
As for making the bar horizontal rather than vertical, this depends a bit on your theme and a bit of css. This should work if you're building a theme from scratch (it has some extra styling, for example purposes): HTML Code:
.sidebar { text-align: center; } If you're using "Bootstrap" then you'll need to change the class on the ul element in the sidebar to btn-group-horizontal. To do this, you'll need to open up js-kyt.js, scroll down to the section of codes that are modifying the sidebar, and observe how the class name is being changed based on the screen width. Just change any instance of .addClass("btn-group-vertical"); to .addClass("btn-group-horizontal"); (PS: I apologize ahead of time if this has complicated anything.) Custom theme? You'll need to give that sidebar room to exist horizontally across the page. I'll leave this to you, as I'm sure you've figured it out? There is a css class of "sidebar" actually attached to the sidebar contents deep in the PHP somewhere, so the sidebar will always have it, so there's no need to put {$sidebar} inside a div of it's own with class or id. The first two things on this horizontal sidebar, the username and their cash amount, are not in the list itself, but actually rendered in paragraph elements. They exist entirely in class_sidebar. I'd remove or comment out these from function setLinksBar(): PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
edit: I'm not as sure how the login will display, but I'm sure it's nothing some css can't spruce up. |
All times are GMT -5. The time now is 08:06 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.