News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Disable Collapsable Header

Started by IceXaos, October 03, 2010, 12:39:36 AM

Previous topic - Next topic

IceXaos

I'm unsure of where this is ...

How would I disable collapsing the header, yet keep the board collapsing enabled?

Ashley S

It be in your header file.
Or your index.php

Oya

Quote from: IceXaos on October 03, 2010, 12:39:36 AM
I'm unsure of where this is ...

How would I disable collapsing the header, yet keep the board collapsing enabled?

which header, which theme?

IceXaos

Quote from: Oya on October 03, 2010, 09:59:55 AM
Quote from: IceXaos on October 03, 2010, 12:39:36 AM
I'm unsure of where this is ...

How would I disable collapsing the header, yet keep the board collapsing enabled?

which header, which theme?
Default theme, containing the greeting & news section.


IceXaos


Oya

themes/default/index.template.php

remove this code

// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upper_section\'
],
aSwapImages: [
{
sId: \'upshrink\',
srcExpanded: smf_images_url + \'/upshrink.png\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/upshrink2.png\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrink\'
}
});
// ]]></script>';

IceXaos

Thanks, I looked there but didn't see it.  Anyways, last question : I assume it's by cookies, so where can I change the cookie name of the header, so the people who already had it minimized will have it open on them?

Alex' Manson

change forum cookie name >.> easy and fast

IceXaos

Quote from: skander1345 on October 03, 2010, 11:44:58 AM
change forum cookie name >.> easy and fast
Nope, I already tested that. :P

Alex' Manson

#10
aha sorry then :-[
so just  a quick edit.. u want this to disable them from hiding the advert? :P
its cooler down like it was...
but if you want many clicks, you could make it as a pop-up, and users can press "no thanks" and it will be saved for 24 hours so it doesnt pop-up for them again...

Oya

QuoteI assume it's by cookies, so where can I change the cookie name of the header, so the people who already had it minimized will have it open on them?

it isn't as the code above actually suggests when it talks about using theme options

remove any entry in the smf_themes table where the variable name is collapse_header

IceXaos

Ah, it's stored on the database.  I didn't know that, thanks. :)

Checkin' it out now.

IceXaos

Got it, thanks very much for your help.

Advertisement: