TinyPortal

Development => Support => Topic started by: pheasant_plucker on July 29, 2008, 05:41:05 PM

Title: reset every users side bar upshrink options
Post by: pheasant_plucker on July 29, 2008, 05:41:05 PM
I have searched high and low and I can't find the answer to this. How do I force everyone in our forum to use the side bar. I have installed a new theme and it is designed to have the sidebar on. Previously some users had bars collapsed and of course now they don't show. How as Admin can I turn these back on? I fully understand there is not a feature to do this but could someone please point me at the correct place in the database so I can reset it!

Gerry
Title: Re: reset every users side bar upshrink options
Post by: IchBin on July 29, 2008, 06:05:24 PM
Its not stored in the database. Its stored in a cookie on each persons machine. If you want to force everyone to use the sidebars, you'll need to remove the upshrink javascript code for it.
Title: Re: reset every users side bar upshrink options
Post by: pheasant_plucker on July 29, 2008, 06:07:58 PM
I have removed the upshrink links if that is what you mean! If the upshrink is stored in the cookies, does that means that forcing new cookies on every user i.e. changing the cookie name in settings will reset everyone to see the side bar?

Thanks
Gerry
Title: Re: reset every users side bar upshrink options
Post by: IchBin on July 29, 2008, 06:09:32 PM
No the links are only the links. The code that the javascript links to is what you'd need to remove. I'm not sure about the cookie, as it probably uses a different cookie than the SMF one. But I'm not 100% about that.
Title: Re: reset every users side bar upshrink options
Post by: pheasant_plucker on July 29, 2008, 06:21:25 PM
I noticed this code

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '


when a guest views the forum all panels are down. If I change if ($context['user']['is_guest']) to if ($context['user']['is_logged']) do you think it may force everyone's panels open?

All help is very much appreciated, were a bit desperate here....

Gerry
Title: Re: reset every users side bar upshrink options
Post by: IchBin on July 29, 2008, 07:12:53 PM
It could possibly work. Wouldn't hurt if you want to try it I suppose. You're guess is as good as mine at this point. :)
Title: Re: reset every users side bar upshrink options
Post by: pheasant_plucker on July 29, 2008, 08:10:32 PM
Unfortunately no change. Someone here must know how to reset these options! It would certainly be a desirable feature from an Admins point of view.

Gerry
Title: Re: reset every users side bar upshrink options
Post by: pheasant_plucker on July 29, 2008, 08:48:27 PM
Done it!
In Index.template.php find
// Output any remaining HTML headers. (from mods, maybe?)
after it add
       if ($context['user']['is_logged'])
       $options['collapse_leftbar'] = 0;


Gerry
Title: Re: reset every users side bar upshrink options
Post by: Smoky on July 29, 2008, 09:06:31 PM
congrats, and thanks for finding the answer and posting for others!! ;)
Title: Re: reset every users side bar upshrink options
Post by: bloc on July 29, 2008, 11:48:19 PM
FYI: that only works in TP 0.9.8, in TP 1.0 there is a different option to set.

The best option is to simply remove "display: none;" from where the leftbar HTML code is located, inside index.template for 0.9.8 and inside TPBlockLayout.template for TP 1.0. 
Title: Re: reset every users side bar upshrink options
Post by: pheasant_plucker on August 01, 2008, 09:05:53 AM
I still have problems with this for a small handful of users! So far it appears they are all in the same membergroup but I have tried both methods and while the majority of members leftbars appear OK it still doesn't for these few. I have tried a force of new cookies and flushed the sessions table but the issue still remains. Any suggestions Bloc?

Gerry
Title: Re: reset every users side bar upshrink options
Post by: pheasant_plucker on August 02, 2008, 12:38:47 PM
just ignore that last post please. The solutions posted previously work fine it's just that one membergroup couldn't see it because they weren't in the permissions  ::)

Gerry