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,982
  • Total Topics: 21,320
  • Online today: 307
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 239
  • Total: 239

Width of sidebars

Started by feline, January 19, 2006, 11:30:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

feline

For more flexibility of your own sidebar scripts, you can check/get the width of this ...

open TPortalBlocks.template.php and search for

// TPortal side bar, left or right.
function TPortal_sidebar($side)
{
   global $context , $scripturl, $settings;


add after:

   if ($side == 'right' || $side == 'left')
      $context['TPortal']['sidebar_width'] = $context['TPortal'][$side .'bar_width'];


now you can check the current width in each sidebar by
$context['TPortal']['sidebar_width']

Fel


scope

Would you happen to know how to lock the size of the side bars.  Currently the only reason I have for doing this is because of pictures on the right hand bar.  I want them no wider than 170, but I want it to resize the rest of the picture to proportion it.

I cuurently have scripts doing the random pics but the one I want doesn't resize automatically.  One script does, but it has some other things I'm working with on it.  Whatever one works first is the one I will stay width(pun inserted before this).LOL. Ok, not that funny, but it was before I typed this sentence.

Anyway, question is after all the babling:
question: How can I lock the size of the side bars?
question: Since the scripts I'm using are php is there a standard command I can add to do this?

Your help is greatly appreciated.

Rasyr

You might want to check out http://www.tinyportal.net/smf/index.php?topic=2185.0

There is some code in there about resizing images on the fly...


This website is proudly hosted on Crocweb Cloud Website Hosting.