2015-06-01, 10:59 PM
I am trying to follow this toggle sidebar tutorial but it did not work well. Is there a way I can toggle sidebar for 1.8?
http://www.tripulse.net/forum/
http://www.tripulse.net/forum/
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
<div class="sidebar" style="float: right; width: 250px;">
<script type="text/javascript">
jQuery(function(){
jQuery(".latestthreads").load("{$mybb->settings['bburl']}/portal.php .latestthreads_portal");
});
</script>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse.png" id="ths_img" class="expander" alt="[-]" title="[-]" /></div>
<strong>Sidebar</strong>
</td>
</tr>
<tr>
<td style="{$collapsed['ths_e']} padding: 0;" id="ths_e">
<div class="latestthreads float_left"></div>
</td>
</tr>
</table>
<div class="theadend"></div>
</div>
<div class="forums" style="float: left; width: 824px;">
{$forums}
</div>
<br class="clear" /><br />
{$boardstats}
{$footer}
</body>
</html>
<tr class="latestthreads_portal">
<td width="230px" class="trow1">
<strong><a href="{$mybb->settings['bburl']}/{$thread['threadlink']}">{$thread['subject']}</a></strong>
<span class="smalltext"><br />
{$lang->by} {$lastposterlink}<br />
{$lastpostdate}
</td>
</tr>
<script type="text/javascript">
jQuery(function($) {
$(".clickedbuttons").hide();
$(".buttons").click(function() {
$(".sidebar").animate({height: "hide", opacity: 0}, 500,
function() {
$(".forums").animate({width: "1024px"}, 500);
});
$(this).hide();
$(".clickedbuttons").show();
$.cookie("sidebar","collapsed", {expires: 365});
return false;
});
$(".clickedbuttons").click(function() {
$(".forums").animate({width: "824px"}, 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","1024px");
$(".sidebar").hide();
};
});
</script>
<a class="buttons" title="Collapse sidebar" style="float: right;">C</a>
<a class="clickedbuttons" title="Expand sidebar" style="float: right;">E</a>