Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-23-2014, 07:21 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 113,452
Abronsyth is on a distinguished road
Default 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)
__________________
My Mods Site (1.3.4, 2020 Mods)

Last edited by Abronsyth; 12-23-2014 at 07:33 AM.
Reply With Quote
  #2  
Old 12-23-2014, 02:02 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,390
Kyttias is on a distinguished road
Default

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; }
.sidebar ul
{
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
display: inline;
}

.sidebar ul li { display: inline; }
.sidebar p { display: inline; }

.sidebar ul li a
{
margin: 1px;
padding: 2px;	
text-decoration: none;
padding: .2em 1em;
color: #fff;
background-color: #036;
}

.sidebar ul li a:hover
{
color: #fff;
background-color: #369;
}
But if you're using the "Main" theme, for example, #menu a in your stylesheet will be modifying all the links inside your sidebar, and you'd have to get very specific with your styling. It'll actually be easier if you just go on into the "Main" theme's template.tpl and simply remove id="menu" from the <td> surrounding the {$sidebar} (keep the td there, of course). Then add a <tr> before <td id="content">.

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:
$linkTitle = new Comment("{$mysidia->user->username}'s Links:");
$linkTitle->setBold();
$this->linksBar->add($linkTitle); 
In function setMoneyBar(), modify this line to suit your needs (scrap the Welcome, remove the <br/>, etc):
PHP Code:
 $this->moneyBar->add(new Comment("Welcome, {$mysidia->user->username}. <br/> You have {$mysidia->user->money} {$mysidia->settings->cost}.")); 
*This line will automatically add in a linebreak unless you add in a comma and FALSE after the end quote. Also? I had trouble snuggling up a $ to {$mysidia->user->money}. If you have your heart set on it, I managed to make them get along by concatenating them:
PHP Code:
$this->moneyBar->add(new Comment("{$mysidia->user->username} $".$mysidia->user->money.""FALSE)); 
In the same function, you can remove or comment out this line:
PHP Code:
$donate->setText("Donate Money to Friends"); 
And finally, in function setWolBar(), you can remove or comment out this line:
PHP Code:
$this->wolBar->setText("This site has {$online} members and {$offline} guests online."); 
That should cover it, aside from getting the css spiffed up in a way you like it.

edit: I'm not as sure how the login will display, but I'm sure it's nothing some css can't spruce up.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 12-23-2014 at 03:45 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
(How to...) Add user avatar to the sidebar with Mys v1.3.3 Hall of Famer Tutorials and Tips 3 12-28-2015 10:55 PM
Spotlight Adopt in Sidebar Abronsyth Questions and Supports 2 11-18-2015 01:23 PM
Sidebar Links Yuki Night Questions and Supports 11 01-29-2013 04:49 PM
Remove Sidebar? SilverDragonTears Questions and Supports 0 06-03-2011 08:42 PM
Sidebar help wilfred888 Questions and Supports 3 05-02-2009 08:14 PM


All times are GMT -5. The time now is 09:46 AM.

Currently Active Users: 9678 (0 members and 9678 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636