News: When asking for support, it helps us and you, if you read the Posting Guidelines

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

October 14, 2019, 09:54:27 AM

Login with username, password and session length

Recent

Members
  • Total Members: 3756
  • Latest: Ocean
Stats
  • Total Posts: 189081
  • Total Topics: 20763
  • Online Today: 70
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 2
Guests: 42
Total: 44

Author Topic: How I deactivated the switch Icons?  (Read 2637 times)

0 Members and 1 Guest are viewing this topic.

MotMann

  • Guest
How I deactivated the switch Icons?
« on: January 08, 2006, 07:50:30 AM »
How i can deactivated the switch icons, that user can switch of the left sidebar or the header?
« Last Edit: January 08, 2006, 10:05:42 AM by MotMann »

Rasyr

  • Guest
Re: How I deactivated the switch Icons?
« Reply #1 on: January 08, 2006, 08:57:23 AM »
In index.yemplate.php, look for the following code:

Code: [Select]

// TinyPortal
echo '<div align="center">';
         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

// Show the menu here, according to the menu sub template.

template_menu();
echo '</div>';


To turn off the ability to open and close the header and left bar, just comment out the approproate lines like so:

Code: [Select]

// TinyPortal
echo '<div align="center">';
  //       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

// Show the menu here, according to the menu sub template.

template_menu();
echo '</div>';



MotMann

  • Guest
Re: How I deactivated the switch Icons?
« Reply #2 on: January 08, 2006, 09:51:12 AM »
Öhm.... are the second code not the same as the first one?

Rasyr

  • Guest
Re: How I deactivated the switch Icons?
« Reply #3 on: January 08, 2006, 10:02:28 AM »
In the second code block, there are 4 lines where I add "//" in front of the lines.

Those "//" comment out those lines. This means that the server will not see or execute them, thus the little icons for collapsing the top and sidebar will not show up. (Note: I did not comment out the two lines of code for the right side bar).


MotMann

  • Guest
Re: How I deactivated the switch Icons?
« Reply #4 on: January 08, 2006, 10:04:00 AM »
Aaaahhhh..... thank's  :)

borgBOB

  • Guest
Re: How I deactivated the switch Icons?
« Reply #5 on: January 08, 2006, 10:31:29 AM »
I also believe in TPAdmin you can turn these side bars on and off.

Rasyr

  • Guest
Re: How I deactivated the switch Icons?
« Reply #6 on: January 08, 2006, 12:38:13 PM »
I also believe in TPAdmin you can turn these side bars on and off.
I was under the impression that he wanted the top and side blocks on, but not able to be hidden. (you can also turn off the top section as well in TPAdmin - the show user/news block option).


MotMann

  • Guest
Re: How I deactivated the switch Icons?
« Reply #7 on: January 08, 2006, 01:12:17 PM »
I was under the impression that he wanted the top and side blocks on, but not able to be hidden.
Yes.... :) Now the User can't switch the sidebars ore top off ... that's fine.