View Full Version : How to edit sidebar?
tahbikat
12-29-2015, 03:59 AM
Sooo I'm a little confused on how to edit the sidebar's structure I guess you could call it.
On my site when I first made it, I edited the sidebar to display as a horizontal bar under the menu bar instead of a sidebar. However, I don't exactly know where to go to pretty it up.
I know how to input the php code for it, but where do I do this? I only want a user's name, money, messages, and users online to display horizontally.
See mysgardia.com to see what I'm talking about. Right now the bar is big and bulky. I want to make it thinner and have the fields currently there to only be shown. Can anyone help? :c
EDIT: I've looked in the template.tpl file and see that the code for it is <tr><td>{$sidebar}</td></tr>. Uhh what's that? Haha.
Hwona
12-29-2015, 04:21 AM
Sooo I'm a little confused on how to edit the sidebar's structure I guess you could call it.
On my site when I first made it, I edited the sidebar to display as a horizontal bar under the menu bar instead of a sidebar. However, I don't exactly know where to go to pretty it up.
I know how to input the php code for it, but where do I do this? I only want a user's name, money, messages, and users online to display horizontally.
See mysgardia.com to see what I'm talking about. Right now the bar is big and bulky. I want to make it thinner and have the fields currently there to only be shown. Can anyone help? :c
EDIT: I've looked in the template.tpl file and see that the code for it is <tr><td>{$sidebar}</td></tr>. Uhh what's that? Haha.
For the sidebar content, you can edit it in class_sidebar and I think the module tab in the ACP. For styling, change the style.css file for your theme. This is what I did for v1.3.3.
tahbikat
12-29-2015, 05:12 AM
Thanks, I tried messing with the widgets and modules but they confuse me...
I've tried inputting html and php with and without tags but I get errors every time. Probably doing something wrong. ;-;
I mean is there a way I can just build my own sidebar, without using widgets and modules, and just disable the original sidebar? How do I put php into a .tpl file? :c
Hwona
12-29-2015, 05:18 AM
Thanks, I tried messing with the widgets and modules but they confuse me...
I've tried inputting html and php with and without tags but I get errors every time. Probably doing something wrong. ;-;
I mean is there a way I can just build my own sidebar, without using widgets and modules, and just disable the original sidebar? How do I put php into a .tpl file? :c
in the style.css file for your theme, do you have this:
#menu{
codehere
}
If you simply deleted the modules you don't want and styled this part, in v1.3.3, that should get rid of your bar.
Edit: *smacks head*
Yikes, sorry. Actually, if you just want non-user-specific links, you can definitely just replace the {$sidebar} thing you found in the template file with normal html links... since there's php variables there, there must be a way to display other variables... I just don't know that.
tahbikat
12-29-2015, 06:01 AM
Yea, I know how to remove it and edit the styles and such, but I want to edit the actual structure of it.
Here's exactly what I want, but just don't know where to go/how to edit it into the tpl file:
http://i.imgur.com/Y7H0OrC.png
Hwona
12-29-2015, 06:23 AM
Yea, I know how to remove it and edit the styles and such, but I want to edit the actual structure of it.
Here's exactly what I want, but just don't know where to go/how to edit it into the tpl file:
http://i.imgur.com/Y7H0OrC.png
Ah, I must have misundersrood you then. In that case, try editing class_sidebar and the theme template file. What you want looks like a horizontal sidebar? Maybe try removing the sidebar <td> in the template file. Add another <tr> above the <tr> that currently contains the sidebar and page content. Add the {$sidebar} into the new tr and give it an id which you can style in the style.css file.
If I remember correctly, you can delete the items you dont want in the sidebar by removing the functions from the class_sidebar file.
Kyttias
12-29-2015, 09:07 AM
This thread (http://www.mysidiaadoptables.com/forum/showthread.php?t=4599) may help you design your own sidebar (or horizontal user status bar) directly in your theme's template, as an alternative approach to using the built-in sidebar widget. It'll show you how to display a user's name, money, avatar, etc. We'll be using Smarty handles, which is something Mysidia is capable of doing but actually doesn't make a great deal of use of - it's really pretty easy!
Follow that up by reading this other thread (http://www.mysidiaadoptables.com/forum/showthread.php?t=4543) where I got some help from IntoRain and you can also add the message count to your new horizontal sidebar. I also revealed some code to display the time and users online!
:meow: (I kept my actual sidebar but removed all the information you mentioned from it and just made a horizontal bar.)
tahbikat
12-29-2015, 09:19 AM
Omgoodness. ;-;
Thank you Kyttias! I was driving myself crazy trying to figure this out lol!
I'm dead tired right now and plan on crashing, but I'm going to experiment tomorrow.
Thank yoouu! <3
Kyttias
12-29-2015, 09:22 AM
It's funny, I wanted to make it into a mod but never quite pulled all my information together into one spot... For now, I added a link to my signature to my post above so people can find that info. It's an important, yet basic, part of my own site - so I feel it's code everyone should have access to. Perhaps this spring I'll do a better write up on it!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.