TinyPortal

Development => Support => Topic started by: signal15 on December 05, 2006, 08:14:57 AM

Title: How do I prevent users from hiding panels?
Post by: signal15 on December 05, 2006, 08:14:57 AM
I do not want users to be able to hide my left panel, as I'm using an articlebox to display some ads that wouldn't work in the ad management module.  Is there any way to prevent them from hiding the panel?

I know I can prevent them from hiding just the block, but I cannot figure out how to prevent the hiding of the whole panel.
Title: Re: How do I prevent users from hiding panels?
Post by: JPDeni on December 05, 2006, 09:56:08 AM
The only way is to change the upshrink code from index.template.php. Look for


// TinyPortal
       if($context['TPortal']['leftbar'])
             echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
     if($context['TPortal']['rightbar'])
             echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
// TinyPortal end


Put // in front of the second and third lines above to "comment them out." That way they'll still be there if you want to use them later on.
Title: Re: How do I prevent users from hiding panels?
Post by: signal15 on December 05, 2006, 10:46:04 PM
Thanks!  Works great!