For Guests
Themes/Default/index.template.php
FIND
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
REPLACE
$options['collapse_header'] = isset($_COOKIE['upshrink']) ? (int) $_COOKIE['upshrink'] : 1 ;
$options['collapse_header_ic'] = isset($_COOKIE['upshrinkIC']) ? (int) $_COOKIE['upshrinkIC'] : 1 ;
For Members
Themes/Default/index.template.php
FIND
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
ADD BEFORE
$options['collapse_header'] = isset($options['collapse_header']) ? $options['collapse_header'] : true ;
$options['collapse_header_ic'] = isset($options['collapse_header_ic']) ? $options['collapse_header_ic'] : true ;
Hi,
I cant seem to find:
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']); in the Themes/Default/index.template.php
This is on 1.1.5 should it be the same as 1.1.4 ?
HMMMM.
It looks like collapsing the info center is in SMF 1.1.5 only.
1.1.4 uses a different method.
I have posted it for 2.x on the bug tracker.
If your on 1.1.4 you won't have the info center line.
Question for ya. I can't get my collapse button to work at all as a member, but guests can collapse it. With the problem I'm already having, I don't dare change anything. Maybe you can shed some light on my problem? Thanks.
http://www.remedydog.com (http://www.remedydog.com)
Any javascript errors? Those could prevent it working properly.
I think the "ROG mod" changed something that effected the java script. Do you think that would also explain my problem with my "register" button not working for members to click when registering? I currently have the "agree to rules" turned of in the admin panel to allow members to register. If I enable "agree to rules" in the admin panel, the "register" button does not work. Suggestions? Thanks.
yes, that would probably be a javascript error.
I looked everywhere and tried everything to remove the "ROG" mod, I really think that was the cause of the problems. I just reinstalled smf. Everything is great, life is good. Thanks for the code change/mod.
Zitat von: forummaker in Mai 09, 2008, 11:03:34 NACHMITTAGS
I looked everywhere and tried everything to remove the "ROG" mod, I really think that was the cause of the problems. I just reinstalled smf. Everything is great, life is good. Thanks for the code change/mod.
The "Rant on Guests" is known to cause Javascript issues. That's probably the reason why the mod has been removed from the Mod Site.
this is what I found about the info center:
// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';
function shrinkHeaderIC(mode)
{';
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>
I want to make the Info Center collapsed by default for guests.
I have smf 1.1.5
What I have to edit? I can't find $options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
Sorry for the late response.
Do you still need assistance with this?
Zitat von: gianko82 in August 31, 2008, 11:44:41 VORMITTAG
I want to make the Info Center collapsed by default for guests.
I have smf 1.1.5
Perhaps you want to Hide Info Center From Your Guests (http://custom.simplemachines.org/mods/index.php?mod=1335) (modification package).
Zitat von: karlbenson in Mai 01, 2008, 08:17:28 NACHMITTAGS
For Guests
Themes/Default/index.template.php
FIND
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
REPLACE
$options['collapse_header'] = isset($_COOKIE['upshrink']) ? (int) $_COOKIE['upshrink'] : 1 ;
$options['collapse_header_ic'] = isset($_COOKIE['upshrinkIC']) ? (int) $_COOKIE['upshrinkIC'] : 1 ;
For Members
Themes/Default/index.template.php
FIND
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
ADD BEFORE
$options['collapse_header'] = isset($options['collapse_header']) ? $options['collapse_header'] : true ;
$options['collapse_header_ic'] = isset($options['collapse_header_ic']) ? $options['collapse_header_ic'] : true ;
that worked GREAT! BUT is it possible to just hide the TOP section (above the board)? but still show the button section like the stats?
anyone?
Phat^Trance, did you try just using the following instead:
$options['collapse_header'] = isset($options['collapse_header']) ? $options['collapse_header'] : true ;
Just use the first line of code instead of both (which includes both the top and bottom).
worked for me, thanks!
This should also likely work in 1.1.10, for those concerned.
Any work-around for 2.0 RC3?
I can't find the necessary code. I'm using 2.0 Gold. Help?
Same here, actually I am just trying to find the files that the code of Info Center is in... :o
For 2.02 you can simply change the 'false' 'true' options to be both 'true' 'true' Bolded them below in the code.
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'true' : 'true', ', <- TRUE TRUE HERE INSTEAD OF 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'] ? 'true' : 'true', ', <- <- TRUE TRUE HERE INSTEAD OF FALSE TRUE
sOptionName: \'collapse_header\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
in 2.0.7
I want default "Shrink header for Guests" while "Expand Header for members"
Please guide
1- do not double post - you resurrected this ancient thread AND posted in support.
2- Given that you have removed the SMF copyright (which is legally allowed) we basically have chosen to not provide support to such sites - since, by removing the copyright, you have essentially stated that you do not need support from us.
(and you have removed the simple portal copyright - which is typically NOT allowed)