TinyPortal

Development => Support => Topic started by: sportsguy on May 18, 2007, 01:08:19 AM

Title: How do I turn off this particular user function?
Post by: sportsguy on May 18, 2007, 01:08:19 AM
OK, so I don't want users to be able to shrink the right sidebar I have installed.  How do I remove the little button thingie that allows them to shrink the right side blocks?

Been all through the TP settings, and didn't see any setting that looked able to disable this functionality.
Title: Re: How do I turn off this particular user function?
Post by: Lesmond on May 18, 2007, 01:14:22 AM
Try this (http://www.tinyportal.net/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MTIsMjUsMTEwLDcwLDY5LDU5LDYwLDkxLDcyLDkyLDkzLDk0LDk1LDk2LDE1LDEwOSwxMjksODksMTU0LDQ2LDEzMywxMzAsODUsNjgsMTE4LDExOSwxMjAsMTMxLDExNywzNiwzNSwxMTMsOSwxNTEsODgsMzEsMTE1LDYzLDMyLDI3LDI2LDIzLDIyLDIxLDIwLDE5LDE4LDE3LDI5LDE1NSw3NiwxNDksMTQ2LDEyMiwxMDUsODQsODIsMTM0LDE1NiwxNTIsMTM2LDExNCwxMDYsOTAsODMsODEsODAsNzksNzcsNzUsNzMsNjUsMTE2LDE1OCwxNTksMTU3LDEzOSwxMDgsNzgsNzQsMTI3LDEyOCwzMCw4LDUxLDEyMSw1OCwxNDMsNTIsMzMsNTAsMTA3LDEyMywxMjQsMTM1LDEzNywxMzgsMTQ0LDE0NSwxNTAsMTUzLDE2MCwxNjEsOTgsOTksMTQwLDE0OCwxNDEsMTQyLDE0N3wifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c29ydF9kaXJ8J3xkZXNjfCJ8c2VhcmNofCd8cmlnaHQgc2lkZSBibG9ja3M=) there are a few options :)
Title: Re: How do I turn off this particular user function?
Post by: sportsguy on May 18, 2007, 01:35:07 AM
Well, that search turned up an answer to another question I had, but had not asked, so that ws a bonus. :)  Thanks.

This link (http://www.tinyportal.net/index.php?topic=13296.0) makes me think what I want to do it not possible.
Title: Re: How do I turn off this particular user function?
Post by: tick on May 18, 2007, 01:51:46 AM
GO to edit in the block you want this to be this way in and check do not allow users to collapse box.
Title: Re: How do I turn off this particular user function?
Post by: sportsguy on May 18, 2007, 02:02:13 AM
It's not a box I don't want them to be able to collapse - it's the entire right hand panel.  I'm fine with some of the boxes in the panel being able to shrink - that's up to the user, but the ads must stay visible, and so, the entire panel must not be collapsible...
Title: Re: How do I turn off this particular user function?
Post by: tick on May 18, 2007, 02:05:55 AM
ok I got you .  Which theme are you using?
Title: Re: How do I turn off this particular user function?
Post by: Lesmond on May 18, 2007, 11:47:10 AM
Quote from: sportsguy on May 18, 2007, 01:35:07 AM
This link (http://www.tinyportal.net/index.php?topic=13296.0) makes me think what I want to do it not possible.
Yes I did see the post by Ichbin, I know you can remove or comment out some code in index.template.php, best way it to experiment with it, but make sure to do a backup first
Title: Re: How do I turn off this particular user function?
Post by: sportsguy on May 18, 2007, 12:26:38 PM
Tick - default theme

Lesmond - coolio

Anyone have a sample of the code I'm hunting handy?
Title: Re: How do I turn off this particular user function?
Post by: sportsguy on May 19, 2007, 04:53:34 PM
OK - where do I find the code that handles this option - which file?

...and what does it look like so I can cut it out?

I need to get this done before I begin selling my ad space next week.

Thanks gang.
Title: Re: How do I turn off this particular user function?
Post by: G6Cad on May 19, 2007, 07:27:03 PM
Try and comment this part of the code out in your index.template.php

With comment out i mean /* the code here */

middlebar1.'<div nowrap="nowrap" style="bar_name">';
// TinyPortal

         if($context['TPortal']['showtop'])
             echo '<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'shell/middlebar-left2.jpg' : 'shell/middlebar-left2.jpg', '" alt="*" title="', $txt['upshrink_description'], '" align="middle" style="margin: 0;" border="0" /></a><img align="middle" id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 1ex;" /> ';
         if($context['TPortal']['leftbar'])
             echo '<a href="#" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'shell/middlebar-left2.jpg' : 'shell/middlebar-left2.jpg', '" alt="*" title="', $txt['upshrink_description'], '" align="middle" style="margin:0;" border="0" /></a><img align="middle" id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
         if($context['TPortal']['rightbar'])
             echo '<a href="#" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'shell/middlebar-left2.jpg' : 'shell/middlebar-left2.jpg', '" alt="*" title="', $txt['upshrink_description'], '" align="middle" style="margin:  0;" border="0" /></a><img align="middle" id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
// TinyPortal end

        echo ' &nbsp;&nbsp;HIDE/SHOW</div>'.$middlebar2;


         echo $botbar.
Title: Re: How do I turn off this particular user function?
Post by: Larathiel on May 20, 2007, 01:06:57 AM
Wow, looks like someone else asked this just in time for the answer to be posted scant hours before I needed to search it out.  Thanks sportsguy and G6. :up:

BTW, this is something I've also had to manually disable everytime I've updated TinyPortal.  Perhaps the option to disable collapsable sidebars is something that should be included in the next version...