Uutiset:

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

Main Menu
Advertisement:

Remove top right arrow forum collapse .

Aloittaja SaltedWeb, kesäkuu 14, 2014, 11:12:54 AP

« edellinen - seuraava »

SaltedWeb

 
Is there a way to Remove the top right arrow forum collapse ?
Like the one in this forum top upper right?

I want the whole area to show but remove the option to shrink it?

Did a search but didn't find anything on it.

Thanks. ;D
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Matthew K.

Sure, it's possible. Attach your themes index.template.php.

kat

NINJAD! Still, I'll post, anyway... :P

This works with the default SMF theme...

In index.template.php, find this:

echo '
<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';


(They're the two lines after:    // the upshrink image, right-floated)

And replace that with this:

// echo '
// <img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';


That comments those lines out, so you can put them back, if required. ;)

Matthew K.

There's also a JavaScript object that is used that could be removed then too...

SaltedWeb

#4
Lainaus käyttäjältä: K@ - kesäkuu 14, 2014, 11:30:37 AP
NINJAD! Still, I'll post, anyway... :P

This works with the default SMF theme...

In index.template.php, find this:

echo '
<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';


(They're the two lines after:    // the upshrink image, right-floated)

And replace that with this:

// echo '
// <img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';


That comments those lines out, so you can put them back, if required. ;)

That was the ticket , thank you very much, worked on my modded theme perfectly.  :-)

Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

kat

WoOt! :)

Dunno the js bit, Lab. But, job done, so all's good. :)

Antes

// 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>';


that's the JS object, comment it out :)

kat

Ta! I don't think it'll hurt, if he leaves that there, though, does it?

Matthew K.

No, it won't hurt. If he had attached the file, I would've removed the JS though as well.

SaltedWeb

I'm not seeing any issues , appears to be working fine .  Thanks again.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Antes

Yeap it won't hurt but commenting (disabling) unused code shrink size of php gives small performance.

Matthew K.

Yep. Antes is right. Although you would never notice a difference in performance. It's more being thorough than anything.

Advertisement: