Taking a quick look at it. Oooh goody. Inline css n stuff. Yummy. ![Cheesy :D](https://www.elkarte.net/community/smileys/default/cheesy.svg)
Could do with a basic front end cleanup, but that's not a big deal.
ETA: For example, some of this seems redundant. I can't see why the display: none; needs to be on both elements, since having it on the parent should do the trick.
<td id="tprightbarContainer" style="width:' ,$context['TPortal']['rightbar_width'], 'px;' , in_array('tprightbarHeader',$context['tp_panels']) && $context['TPortal']['showcollapse']==1 ? 'display: none;' : '' , '" valign="top">
<div id="tprightbarHeader" style="' , in_array('tprightbarHeader',$context['tp_panels']) && $context['TPortal']['showcollapse']==1 ? 'display: none;' : '' , '">