TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 23, 2024, 06:28:56 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,170
  • Total Topics: 21,219
  • Online today: 43
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 47
  • Total: 47

Foobared upshrink in index.template.php

Started by ipoco, March 20, 2006, 11:03:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ipoco

I've instally TP with no problems on a new SMF 1.0.6 board but noticed one tiny error - the upshrink - hide header function doesn't seem to work.  Where do I look to fix this?

I DID have to manually update index.template.php based on TP_mod-instructions and have rechecked what I did.

Everything else seems to work like a charm.

Thanks

C

you can see the problem herehttp://ipoco.com/xforums/index.php

Crip

On around Line 120 in the - index.template.php file add:

       <script language="JavaScript" type="text/javascript">
                var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';

                function shrinkHeaderLeftbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "', $context['session_id'], '");';
        echo '
                        document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("leftbarHeader").style.display = mode ? "none" : "";

                        current_leftbar = mode;
                }
          // ]]></script>
       <script language="JavaScript" type="text/javascript">
                var current_rightbar = ', empty($options['collapse_rightbar']) ? 'false' : 'true', ';

                function shrinkHeaderRightbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        smf_setThemeOption("collapse_rightbar", mode ? 1 : 0, null, "', $context['session_id'], '");';

        echo '
                        document.getElementById("upshrinkRightbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("rightbarHeader").style.display = mode ? "none" : "";

                        current_rightbar = mode;
                }
        // ]]></script>

<script language="JavaScript" type="text/javascript">
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';

function shrinkHeader(mode)
{';

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>';

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript">
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';

function shrinkHeaderIC(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>


down to the </head>  tag.
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



ipoco

thanks for the reply - I've copied and pasted your code into the file and still no luck. :-\

IchBin

Can you attach your file to this thread please?

ipoco

Here it is - found a few items wrong - now I have two instances of the upshrink gif and a java script error.

www.ipoco.com/xforums

G6Cad

#5
Try this one, you have some codestring twise in there
I havent been able to test it cause im not running on SMF 1.0.6

Installed 1.0.6 and installed tinyportal to that to.
Found out that there were some more faults on the first one.
Use the other one i attached, i couldent remove the firt file for some reason.

Use this
Quote* index.template.php (28.35 KB - downloaded 0 times.)

Crip

Try adding this:

</head>
<body>';

neither attachment had a </head> tag: should look like this :
_______
</head>
<body>';
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



ipoco


G6Cad