if($mybb->settings['sidebox1'] == 1)
{
if ($mybb->settings['sidebox4'] == 2)
{
//$templates->cache['index'] = str_replace('{$forums}', '<table width="100%" border="0"><tr><td width="auto" valign="top">{$forums}',$templates->cache['index']);
$templates->cache['index'] = str_replace('{$header}', '{$header}<table width="100%" border="0"><tr><td width="auto" valign="top">',$templates->cache['index']);
$templates->cache['index'] = str_replace('{$footer}','{$footer}</td><td width="'.$lmao1.'" valign="top">'.$lol1."".$lol2."".$lol3."".$lol4."".$lol5."".$lol6."".$lol7."".$lol8."".$lol9.'</td></tr></table>',$templates->cache['index']);
}
else
{
//$templates->cache['index'] = str_replace('{$forums}', '<table width="100%" border="0"><tr><td width="'.$lmao1.'" valign="top">'.$lol1."".$lol2."".$lol3."".$lol4."".$lol5."".$lol6."".$lol7."".$lol8."".$lol9.'</td><td width="auto" valign="top">{$forums}',$templates->cache['index']);
$templates->cache['index'] = str_replace('{$header}', '{$header}<table width="100%" border="0"><tr><td width="'.$lmao1.'" valign="top">'.$lol1."".$lol2."".$lol3."".$lol4."".$lol5."".$lol6."".$lol7."".$lol8."".$lol9.'</td><td width="auto" valign="top">',$templates->cache['index']);
$templates->cache['index'] = str_replace('{$footer}','{$footer}</td></tr></table>',$templates->cache['index']);
}
}
//Display boxes on forumdisplay
if($mybb->settings['sidebox2'] == 1)
{
if ($mybb->settings['sidebox4'] == 2)
{
//$templates->cache['forumdisplay'] = str_replace('{$subforums}','',$templates->cache['forumdisplay']);
//$templates->cache['forumdisplay'] = str_replace('{$threadslist}','<table width="100%" border="0"><tr><td width="auto" valign="top">{$subforums}{$threadslist}',$templates->cache['forumdisplay']);
$templates->cache['forumdisplay'] = str_replace('{$header}','{$header}<table width="100%" border="0"><tr><td width="auto" valign="top">',$templates->cache['forumdisplay']);
$templates->cache['forumdisplay'] = str_replace('{$footer}','{$footer}</td><td width="'.$lmao1.'" valign="top">'.$lol1."".$lol2."".$lol3."".$lol4."".$lol5."".$lol6."".$lol7."".$lol8."".$lol9.'</td></tr></table>',$templates->cache['forumdisplay']);
}
else
{
//$templates->cache['forumdisplay'] = str_replace('{$moderatedby}','<table width="100%" border="0"><tr><td width="'.$lmao1.'" valign="top">'.$lol1."".$lol2."".$lol3."".$lol4."".$lol5."".$lol6."".$lol7."".$lol8."".$lol9.'</td><td width="auto" valign="top">{$moderatedby}',$templates->cache['forumdisplay']);
$templates->cache['forumdisplay'] = str_replace('{$header}','{$header}<table width="100%" border="0"><tr><td width="'.$lmao1.'" valign="top">'.$lol1."".$lol2."".$lol3."".$lol4."".$lol5."".$lol6."".$lol7."".$lol8."".$lol9.'</td><td width="auto" valign="top">',$templates->cache['forumdisplay']);
$templates->cache['forumdisplay'] = str_replace('{$footer}','{$footer}</td></tr></table>',$templates->cache['forumdisplay']);
}
}
//Display boxes on showthread
if($mybb->settings['sidebox3'] == 1)
{
if ($mybb->settings['sidebox4'] == 2)
{
$templates->cache['showthread'] = str_replace('{$header}',' {$header}<table width="100%" border="0"><tr><td width="auto" valign="top">',$templates->cache['showthread']);
$templates->cache['showthread'] = str_replace('{$footer}','{$footer}</td><td width="'.$lmao1.'" valign="top">'.$lol1."".$lol2."".$lol3."".$lol4."".$lol5."".$lol6."".$lol7."".$lol8."".$lol9.'</td></tr></table>',$templates->cache['showthread']);
}
else
{
$templates->cache['showthread'] = str_replace('{$header}',' {$header}<table width="100%" border="0"><tr><td width="'.$lmao1.'" valign="top">'.$lol1."".$lol2."".$lol3."".$lol4."".$lol5."".$lol6."".$lol7."".$lol8."".$lol9.'</td></td><td width="auto" valign="top">',$templates->cache['showthread']);
$templates->cache['showthread'] = str_replace('{$footer}','{$footer}</td></tr></table>',$templates->cache['showthread']);
}
}