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
Sure, it's possible. Attach your themes index.template.php.
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. ;)
There's also a JavaScript object that is used that could be removed then too...
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. :-)
WoOt! :)
Dunno the js bit, Lab. But, job done, so all's good. :)
// 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 :)
Ta! I don't think it'll hurt, if he leaves that there, though, does it?
No, it won't hurt. If he had attached the file, I would've removed the JS though as well.
I'm not seeing any issues , appears to be working fine . Thanks again.
Yeap it won't hurt but commenting (disabling) unused code shrink size of php gives small performance.
Yep. Antes is right. Although you would never notice a difference in performance. It's more being thorough than anything.