TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,853
  • Total Topics: 21,290
  • Online today: 1,590
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 176
  • Total: 177
  • @rjen

reset every users side bar upshrink options

Started by pheasant_plucker, July 29, 2008, 05:41:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pheasant_plucker

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

IchBin

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.

pheasant_plucker

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

IchBin

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.

pheasant_plucker

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

IchBin

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. :)

pheasant_plucker

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

pheasant_plucker

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

Smoky

congrats, and thanks for finding the answer and posting for others!! ;)

bloc

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. 

This website is proudly hosted on Crocweb Cloud Website Hosting.