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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 175
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 181
  • Total: 181

"shrink or expand the header" button in Babylon

Started by peterstaley, April 11, 2006, 10:03:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

peterstaley

When I'm looking at this page using Babylon, I see 2 shrink or expand the header buttons to the left of the Home button.  The first one works (and is generated by TP, I think).  The 2nd one doesn't do anything.

If I change my TP settings so that "Show userinfo/news at the top" is set to "no", then the first header button disappears, but the 2nd, non-functioning button remains.  Is there a way to get rid of this 2nd, non-functioning "shrink or expand the header" button?

Peter

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



peterstaley

#2
I'm seeing it now, on this page (The Bloc Zone's forums), when I have it set to Babylon Theme. There are 2 shrink header buttons, and the 2nd one doesn't do anything.

My site is at http://forums.poz.com/, where I have "Show userinfo/news at the top" set to "no", so only one, non-functioning button is showing.

Crip

Replace with this in your index.template.php file and all 3 upshrinks will work correct..if you want.


  <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 '
                        document.getElementById("upshrinkTempLeftbar").src = "', $scripturl, '?action=jsoption;var=collapse_leftbar;val=" + (mode ? 1 : 0) + ";sesc=', $context['session_id'], ';" + (new Date().getTime());';

        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 '
                        document.getElementById("upshrinkTempRightbar").src = "', $scripturl, '?action=jsoption;var=collapse_rightbar;val=" + (mode ? 1 : 0) + ";sesc=', $context['session_id'], ';" + (new Date().getTime());';

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

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

                        current_rightbar = mode;
                }
       // --></script>
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



peterstaley

Thanks, that works!  One more thing, if I decide to hide these buttons, what's the easiest way?  What lines to I comment out?

Peter

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



peterstaley

that's what I couldn't find.  could you point me to where this link coding is?

Crip

line 360 in your index.template.file is this:

';
// TinyPortal

if($context['TPortal']['showtop'])
echo '<a href="javascript:void(0);" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 1ex;" /> ';
if($context['TPortal']['leftbar'])
echo '<a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
if($context['TPortal']['rightbar'])
echo '<a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
// TinyPortal end


You just remove the link you want too.
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



This website is proudly hosted on Crocweb Cloud Website Hosting.