REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TEMPLATE EDIT] jQuery sliding sidebar for MyBB!
Wishing you could have a sliding JQuery sidebar for MyBB just like ion IPB3 or vB4? Well, now you can with this super simple template edit!

We're going to be editing the index template, but you're first going to need to upload these two image files to your /images/ folder for MyBB.

[Image: arrowright.png] [Image: arrowleft.png]

Now, open the Index template and replace the whole thing with the following (unless you have plugins installed which edit the index template - in which case you'll have to add their stuff to it afterwards or just make careful edits.

PHP Code:
script type="text/javascript">
lang.no_new_posts "{$lang->no_new_posts}";
lang.click_mark_read "{$lang->click_mark_read}";
// -->
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<style type="text/css">
.buttons {
    background: url(images/arrowleft.png) no-repeat;
    width: 16px;
    height: 16px;
    display: block;
    cursor: pointer;

.clickedbuttons {
    background: url(images/arrowright.png) no-repeat;
    width: 16px;
    height: 16px;
    display: block;
    cursor: pointer;
<div style="float: right;">
<a id="button" class="buttons"></a>
<td width="100%;" valign="top">
    <script type="text/javascript">
    jQuery(function() {
        //run the currently selected effect
        function runEffect(){
            //get effect type from 
            var selectedEffect = 'slide';
            //most effect types need no options passed by default
            var options = {};
            //check if it's scale or size - they need options explicitly set
            if(selectedEffect == 'scale'){  options = {percent: 0}; }
            else if(selectedEffect == 'size'){ options = { to: {width: 200,height: 60} }; }
            //run the effect

        //set effect from select menu value
        jQuery("#button").click(function() {
            return false;

<td valign="top">
<div id="effect" class="ui-widget-content ui-corner-all">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" width="240">
<td class="thead">
<td class="trow1">
<form method="post" 

<input type="hidden" name="action" value="do_search" />

<input type="hidden" name="postthread" value="1" />

<input type="hidden" name="forums" value="all" />

<input type="hidden" name="showresults" value="threads" />

<input type="text" class="textbox" name="keywords" value="" />

<!-- start: gobutton -->

<input type="submit" class="button" value="Go" />

<!-- end: gobutton -->



<dl class="forum_legend smalltext">
    <dt><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>

    <dt><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>

    <dt><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
<br style="clear: both" />

Simple eh? You now have a sliding sidebar which is toggled with a small graphic button. There are no conflicts with prototype or anything, so enjoy!

Here's a quick screenshot of the closed sidebar next to the open one. Lovely eh? You can always add more to it too Smile

[Image: sidebar.png]

Messages In This Thread
[TEMPLATE EDIT] jQuery sliding sidebar for MyBB! - by euantor - Jul 07, 2010, 07:05 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Paying for theme edit... IceGuru 3 10,217 Sep 23, 2010, 09:16 PM
Last Post: IceGuru
Toungue [TEMPLATE] CopyRight 88power88 4 5,952 Sep 01, 2010, 04:23 AM
Last Post: 88power88
  need a template help[urgent] phantom_277 1 2,009 Jul 12, 2010, 11:34 AM
Last Post: Elite Dash
  Template help please {May pay} IceGuru 2 2,570 Jul 10, 2010, 06:48 AM
Last Post: IceGuru
  Changing the images used in the User CP's navigation sidebar? euantor 3 3,104 Mar 17, 2010, 05:09 PM
Last Post: Damion

Forum Jump:

Users browsing this thread: 1 Guest(s)