MyBB Community Forums

Full Version: Square theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2015-10-18, 05:14 PM)eNvy Wrote: [ -> ]
(2015-10-18, 03:48 PM)amanda2014 Wrote: [ -> ]
(2015-10-18, 01:37 PM)eNvy Wrote: [ -> ]Use a plugin to show the latest activity, because I removed this in the latest update due to a malfunction (The code runs all the querys from the portal, when you only need one query not all the querys).

I still have the sidebar where the latest activity is shown. I just can't hide it like I used to be able to since the button with the two arrows pointing at each other is gone. Has that image been removed from the image directory in your latest version of Square? What was it called?

ACP > Templates & Styles > Templates > Square templates > Navigation templates > open nav template

Replace all the code with this new one:

<fieldset class="breadcrumb">
 <span class="crumbs">{$nav}{$activesep}
 <span class="crust">{$activebit}</span>
 </span>
 <a class="buttons" title="{$lang->xstyled_hidesidebar}" style="float: right;"><i style="font-size: 14px;" class="fa fa-compress fa-fw"></i></a>
 <a class="clickedbuttons" title="{$lang->xstyled_showsidebar}" style="float: right;"><i style="font-size: 14px;" class="fa fa-expand fa-fw"></i></a>
</fieldset>

ACP > Templates & Styles > Templates > Square templates > Ungrouped templates > open headerinclude template

Add this code to the end of the file

<script type="text/javascript">
jQuery(function($) {
    $(".clickedbuttons").hide();
    $(".buttons").click(function() {
        $(".sidebar").animate({height: "hide", opacity: 0}, 500,
            function() {
                $(".forums").animate({width: "984px"}, 500);
            });
        $(this).hide();
        $(".clickedbuttons").show();
        $.cookie("sidebar","collapsed", {expires: 365});
        return false;
    });
    $(".clickedbuttons").click(function() {
        $(".forums").animate({width: "724px"}, 500,
            function() {
                $(".sidebar").animate({height: "show", opacity: 1}, 500);
            });
        $(this).hide();
        $(".buttons").show();
        $.cookie("sidebar","expanded", {expires: 365});
        return false;
    });
    if($.cookie("sidebar") == "collapsed") {
        $(".buttons").hide();
        $(".clickedbuttons").show();
        $(".forums").css("width","984px");
        $(".sidebar").hide();
    };
});
</script>

Now add this css to Square.css

.buttons {
    cursor: pointer;
    color: #FFFFFF;
    width: 44px;
    height: 29px;
    padding-top: 15px;
    text-align: center;
    background: #005ea7;
    transition: all 0.5s ease;
}

.buttons:hover {
    cursor: pointer;
    color: #FFFFFF;
    background: #0076D1;
    transition: all 0.5s ease;
}

.clickedbuttons {
    cursor: pointer;
    color: #FFFFFF;
    width: 44px;
    height: 29px;
    padding-top: 15px;
    text-align: center;
    background: #005ea7;
    transition: all 0.5s ease;
}

.clickedbuttons:hover {
    cursor: pointer;
    color: #FFFFFF;
    background: #0076D1;
    transition: all 0.5s ease;
}

I think that's all.

I've decided I want to go with the plugin for the sidebar after all. Problem is I have modified some of your templates so it's not that easy for me to get rid of the sidebar. I understand I have to undo all the steps above. Could you give me the code you presently use for the nav template?

And I believe I need to revert the template portal_latestthreads_thread to the myBB default template? Anywhere else I need to modify code to get rid of the sidebar?
(2016-05-11, 05:58 PM)amanda2014 Wrote: [ -> ]
(2015-10-18, 05:14 PM)eNvy Wrote: [ -> ]
(2015-10-18, 03:48 PM)amanda2014 Wrote: [ -> ]
(2015-10-18, 01:37 PM)eNvy Wrote: [ -> ]Use a plugin to show the latest activity, because I removed this in the latest update due to a malfunction (The code runs all the querys from the portal, when you only need one query not all the querys).

I still have the sidebar where the latest activity is shown. I just can't hide it like I used to be able to since the button with the two arrows pointing at each other is gone. Has that image been removed from the image directory in your latest version of Square? What was it called?

ACP > Templates & Styles > Templates > Square templates > Navigation templates > open nav template

Replace all the code with this new one:

<fieldset class="breadcrumb">
 <span class="crumbs">{$nav}{$activesep}
 <span class="crust">{$activebit}</span>
 </span>
 <a class="buttons" title="{$lang->xstyled_hidesidebar}" style="float: right;"><i style="font-size: 14px;" class="fa fa-compress fa-fw"></i></a>
 <a class="clickedbuttons" title="{$lang->xstyled_showsidebar}" style="float: right;"><i style="font-size: 14px;" class="fa fa-expand fa-fw"></i></a>
</fieldset>

ACP > Templates & Styles > Templates > Square templates > Ungrouped templates > open headerinclude template

Add this code to the end of the file

<script type="text/javascript">
jQuery(function($) {
    $(".clickedbuttons").hide();
    $(".buttons").click(function() {
        $(".sidebar").animate({height: "hide", opacity: 0}, 500,
            function() {
                $(".forums").animate({width: "984px"}, 500);
            });
        $(this).hide();
        $(".clickedbuttons").show();
        $.cookie("sidebar","collapsed", {expires: 365});
        return false;
    });
    $(".clickedbuttons").click(function() {
        $(".forums").animate({width: "724px"}, 500,
            function() {
                $(".sidebar").animate({height: "show", opacity: 1}, 500);
            });
        $(this).hide();
        $(".buttons").show();
        $.cookie("sidebar","expanded", {expires: 365});
        return false;
    });
    if($.cookie("sidebar") == "collapsed") {
        $(".buttons").hide();
        $(".clickedbuttons").show();
        $(".forums").css("width","984px");
        $(".sidebar").hide();
    };
});
</script>

Now add this css to Square.css

.buttons {
    cursor: pointer;
    color: #FFFFFF;
    width: 44px;
    height: 29px;
    padding-top: 15px;
    text-align: center;
    background: #005ea7;
    transition: all 0.5s ease;
}

.buttons:hover {
    cursor: pointer;
    color: #FFFFFF;
    background: #0076D1;
    transition: all 0.5s ease;
}

.clickedbuttons {
    cursor: pointer;
    color: #FFFFFF;
    width: 44px;
    height: 29px;
    padding-top: 15px;
    text-align: center;
    background: #005ea7;
    transition: all 0.5s ease;
}

.clickedbuttons:hover {
    cursor: pointer;
    color: #FFFFFF;
    background: #0076D1;
    transition: all 0.5s ease;
}

I think that's all.

I've decided I want to go with the plugin for the sidebar after all. Problem is I have modified some of your templates so it's not that easy for me to get rid of the sidebar. I understand I have to undo all the steps above. Could you give me the code you presently use for the nav template?

And I believe I need to revert the template portal_latestthreads_thread to the myBB default template? Anywhere else I need to modify code to get rid of the sidebar?

You need to:

1- Templates

Ungrouped templates > open headerinclude template

Search this code and delete it:

<script type="text/javascript">
jQuery(function($) {
   $(".clickedbuttons").hide();
   $(".buttons").click(function() {
       $(".sidebar").animate({height: "hide", opacity: 0}, 500,
           function() {
               $(".forums").animate({width: "984px"}, 500);
           });
       $(this).hide();
       $(".clickedbuttons").show();
       $.cookie("sidebar","collapsed", {expires: 365});
       return false;
   });
   $(".clickedbuttons").click(function() {
       $(".forums").animate({width: "724px"}, 500,
           function() {
               $(".sidebar").animate({height: "show", opacity: 1}, 500);
           });
       $(this).hide();
       $(".buttons").show();
       $.cookie("sidebar","expanded", {expires: 365});
       return false;
   });
   if($.cookie("sidebar") == "collapsed") {
       $(".buttons").hide();
       $(".clickedbuttons").show();
       $(".forums").css("width","984px");
       $(".sidebar").hide();
   };
});
</script>

Navigation templates > open nav template

Modify all the code with this new one:

<fieldset class="breadcrumb">
<span class="crumbs">{$nav}{$activesep}
<span class="crust">{$activebit}</span>
</span>
</fieldset>

CSS

Open Square.css, search this classes and delete it:

.buttons {
   cursor: pointer;
   color: #FFFFFF;
   width: 44px;
   height: 29px;
   padding-top: 15px;
   text-align: center;
   background: #005ea7;
   transition: all 0.5s ease;
}

.buttons:hover {
   cursor: pointer;
   color: #FFFFFF;
   background: #0076D1;
   transition: all 0.5s ease;
}

.clickedbuttons {
   cursor: pointer;
   color: #FFFFFF;
   width: 44px;
   height: 29px;
   padding-top: 15px;
   text-align: center;
   background: #005ea7;
   transition: all 0.5s ease;
}

.clickedbuttons:hover {
   cursor: pointer;
   color: #FFFFFF;
   background: #0076D1;
   transition: all 0.5s ease;
}

Also, revert the index template and the portal_latestthreads_thread template to the original one. I think that's all.

Regards.
Thanks, eNvy!
I replaced the old Square theme sidebar with myBB's plugin "Latest Posts on sidebar" but I had to go back to the old Square theme sidebar since the plugin was showing posters the thread titles of threads in forums they are not allowed to view or read. Something is obviously up with the security of that plugin!
(2016-05-14, 10:38 AM)amanda2014 Wrote: [ -> ]I replaced the old Square theme sidebar with myBB's plugin "Latest Posts on sidebar" but I had to go back to the old Square theme sidebar since the plugin was showing posters the thread titles of threads in forums they are not allowed to view or read. Something is obviously up with the security of that plugin!

Well I have installed this: http://community.mybb.com/mods.php?action=view&pid=291

In the ACP you can put the forum ID to hide the messages of that forums, I don't test it but I assume it works, don't know if you use the same plugin.
(2016-05-14, 11:49 AM)eNvy Wrote: [ -> ]Well I have installed this: http://community.mybb.com/mods.php?action=view&pid=291

In the ACP you can put the forum ID to hide the messages of that forums, I don't test it but I assume it works, don't know if you use the same plugin.

Yes, that's the one I used. Hide the messages from that forum section for the members who do not have a right to see that forum section or for all members?
(2016-05-14, 05:10 PM)amanda2014 Wrote: [ -> ]
(2016-05-14, 11:49 AM)eNvy Wrote: [ -> ]Well I have installed this: http://community.mybb.com/mods.php?action=view&pid=291

In the ACP you can put the forum ID to hide the messages of that forums, I don't test it but I assume it works, don't know if you use the same plugin.

Yes, that's the one I used. Hide the messages from that forum section for the members who do not have a right to see that forum section or for all members?

I think it hide for all members, but I don't know since I don't have private forums Toungue.
Hello @eNvy, i realized now that I have two problems with the theme Square 1.8.x the first the first concerns the action names in the avatar menu:
[Image: bMYCAGK.jpg]
the second is missing the part of the left footer ,
[Image: 1DucR8t.jpg]
where I went wrong ? thanks in advance for helping ( forgive me, but I'm using google translator Big Grin )
(2016-05-15, 06:11 AM)shadowfree Wrote: [ -> ]Hello @eNvy, i realized now that I have two problems with the theme Square 1.8.x the first the first concerns the action names in the avatar menu:
[Image: bMYCAGK.jpg]
the second is missing the part of the left footer ,
[Image: 1DucR8t.jpg]
where I went wrong ? thanks in advance for helping ( forgive me, but I'm using google translator Big Grin )

Install the plugin!!! haha, that fix all your problems Toungue
(2016-05-15, 05:28 PM)eNvy Wrote: [ -> ]Install the plugin!!! haha, that fix all your problems Toungue


thanks eNvny, what plugin I need in this case? Wink