MyBB Community Forums

Full Version: RE: Sidebar With MyBB Default Template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Greetings,

Can someone please tell me how to use a sidebar
for all pages of the default MyBB Forum?

Thank you, very much!
Well, you could do something like this

<html>
<head>
  <title>{$mybb->settings['bbname']}</title>
    {$headerinclude}
	</head>
<body>
{$header}
	
   <div id="main-content">
ENTER SOME MAIN CONTENT
    </div>
   <div id="right-sidebar">
		ENTER SOME SIDEBAR		
	   </div>
<br class="clear" />
{$footer}
</body>
</html>

And perhaps, some CSS like this
#main-content {
    padding-right: 10px;
    float: left;
    width: 70%;
}

#right-sidebar {
    overflow: hidden;
    margin: 0px;
}


So, you could just replace your MyBB page template with this simple but flexible right sidebar template, but make sure you put back any JavaScript in the header, if it is already in your previous template. Let us know how it goes.