News: September 21st, 2019, The Tinyportal team is pleased to announce the release of ~~ TinyPortal 1.6.4! GET IT NOW!!!

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

November 18, 2019, 08:49:42 PM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189259
  • Total Topics: 20772
  • Online Today: 332
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 126
Total: 126

Author Topic: Foobared upshrink in index.template.php  (Read 4424 times)

0 Members and 1 Guest are viewing this topic.

ipoco

  • Guest
Foobared upshrink in index.template.php
« on: March 20, 2006, 04:03:32 PM »
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

Offline Crip

  • Jesus Inside.
  • Themes
  • *
  • Posts: 4168
  • Theme Support
    • Cripzone
Re: Foobared upshrink in index.template.php
« Reply #1 on: March 20, 2006, 04:32:03 PM »
On around Line 120 in the - index.template.php file add:
Code: [Select]
       <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

  • Guest
Re: Foobared upshrink in index.template.php
« Reply #2 on: March 20, 2006, 04:56:00 PM »
thanks for the reply - I've copied and pasted your code into the file and still no luck. :-\

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Foobared upshrink in index.template.php
« Reply #3 on: March 20, 2006, 10:49:08 PM »
Can you attach your file to this thread please?

ipoco

  • Guest
Re: Foobared upshrink in index.template.php
« Reply #4 on: March 21, 2006, 05:31:21 AM »
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

Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: Foobared upshrink in index.template.php
« Reply #5 on: March 21, 2006, 05:52:06 AM »
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.)
« Last Edit: March 21, 2006, 06:14:31 AM by G6 »

Offline Crip

  • Jesus Inside.
  • Themes
  • *
  • Posts: 4168
  • Theme Support
    • Cripzone
Re: Foobared upshrink in index.template.php
« Reply #6 on: March 21, 2006, 06:13:03 AM »
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


Offline Crip

  • Jesus Inside.
  • Themes
  • *
  • Posts: 4168
  • Theme Support
    • Cripzone
Re: Foobared upshrink in index.template.php
« Reply #7 on: March 21, 2006, 06:14:47 AM »
You got it G6! ;)
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes


ipoco

  • Guest
Re: Foobared upshrink in index.template.php
« Reply #8 on: March 22, 2006, 06:59:36 AM »
Thanks everyone - got it!

Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: Foobared upshrink in index.template.php
« Reply #9 on: March 22, 2006, 07:03:38 AM »
Glad it worked out :)