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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,026
  • Total Topics: 21,333
  • Online today: 916
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 413
  • Total: 413

Adding in a custom hide panel link?

Started by MrApples, June 25, 2007, 09:26:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrApples

What is the link to hide the right, left, and center panels? If not a link, how do I do it.

Nokonium

Available panel settings can be found here Admin>TinyPortal>Settings>Panels.

There will be more options in TP 1.0.

MrApples

For adding the actual button in the theme that minimizes the panels though. Not through admin but for a member.

Nokonium

Are you designing a theme?

All the necessary code to convert an SMF index.template to a TP capable one can be found in the manual modification instructions. The parts that you want will include the upshrink.gif and upshrink2.gif.

MrApples


        <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                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"><!-- // --><![CDATA[
                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>


Looks complicated. No, I'm not designing a theme, I just want to add the button to a theme that doesn't have it. This is the right code though right?

This website is proudly hosted on Crocweb Cloud Website Hosting.