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,021
  • Total Topics: 21,332
  • Online today: 496
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 459
  • Total: 459

Relocating upshrink buttons

Started by houston, November 14, 2005, 04:14:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

houston

Currently both upshrink buttons in the default theme are positioned on the left side of the menu buttons. How would one split them so that one is on the right and the other is on the left side of the menu buttons?

Thanks

IchBin

#1
Here's what my default looks like:

// 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

// Show the menu here, according to the menu sub template.
template_menu();

echo '
</div>';


And here's what I'd change it to if I want an arrow on each side.

// 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;" />';

// TinyPortal end

// Show the menu here, according to the menu sub template.
template_menu();
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;" />';
echo '
</div>';


Of course, this still leaves your topbar upshrink button on the left just so you know.

bloc

If you notice, IchBin..you actually show the right twice now.. ;D But otherwise its a good simple solution.

IchBin


houston


iowamf

That's nifty ...

This may be way out there - but could the right one be re-located to the "Content" bar in the Menu?

I tried hacking TPortalBlocks.template TPortal_catmenu() and I'm getting "geographically" close - but no go.

I was looking to get rid of all the buttons at the top - but that right upshrink button sure is valuable when the forums have pictures or iframes are a bit too wide.


houston

I have inputed the modification and it works great. Although I have noticed that the left upshrink button is several pixels away from the first menu icon and the right upshrink button is right up against the last menu button. Would this be corrected in the code posted above or would I have to look elswhere to correct it.

Thanks

bloc

Depending on if you want the space or not, the value for style have to be modified. For the right now moved, upshrink button:

Find: style="margin: 2px 0;
Set to: style="margin: 0 0 2px 0;

houston

Quote from: Bloc on November 15, 2005, 06:58:02 PM
Depending on if you want the space or not, the value for style have to be modified. For the right now moved, upshrink button:

Find: style="margin: 2px 0;
Set to: style="margin: 0 0 2px 0;

Sorry There's no visible change

IchBin


This website is proudly hosted on Crocweb Cloud Website Hosting.