how to collapse header by default

Started by 061, July 27, 2005, 12:28:49 AM

Previous topic - Next topic

061

hi i posted it some where else but thought this might be more appropriate place to ask

the forum header is shown expanded by default...how to make it collapsed and let users expand it later.

arod

in Themes/default/index.template.php, change $options['collapse_header'] = !empty($_COOKIE['upshrink']); to $options['collapse_header'] = $_COOKIE['upshrink'] !== 0;

061

Thanks it worked cool. 
I removed is_guest from line above to make it work for users aswell. Works gr8 now.
Thanks a lot

storyman

#3
Quote from: arod on July 27, 2005, 11:19:10 PM
in Themes/default/index.template.php, change $options['collapse_header'] = !empty($_COOKIE['upshrink']); to $options['collapse_header'] = $_COOKIE['upshrink'] !== 0;

Ok, I have been searching for this.  Does this work for all listed categories.  ALso, I am a total lame ass and have not been able to figure out how to change code yet.  A point into the direction would be great.  Last I heard someone was supposed to be launching a kickass tutorial... any word on that ?

xalaris

This code line change doesn't seem to work in smf 1.1.2
Anyone know how to apply this to 1.1.2?
This would be great option for big forum with many categories...
THANKS

Xarcell

#5
Yes, this technique seems to work, but it doesn't save if after you expand the header.

Any other suggestions?

Bulakbol

You can try this.

in index.template.php, change

<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>

to

<tr id="upshrinkHeader"', empty($options['collapse_header']) ? 'style="display: none;"' : ' style="display: none;"', '>
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Xarcell

That's a little better than the first. However it doesn't remember to keep it open if you open it.

Advertisement: