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: 195,996
  • Total Topics: 21,327
  • Online today: 232
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 234
  • Total: 234

Scrollbar in Block appeared with TP 1.0 beta 3

Started by Nr|Five, February 19, 2009, 01:38:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nr|Five

Link to my site: http://www.gameshrine.org
SMF version: 1.1.8
TP version: TP 1.0 beta 3
Theme name and version: Overview Light

Basicly I have no error, but since it happend with the installation with the latest TP version, I assume something changed with this version.

On the top of the page you can see the "recent topics" on the forum. But there is a horizontal scrollbar. This scrollbar wasn't there with the previous TP version. So my question is how to remove this.

If I look at the code I used:


// "Recent Topics" a php Block
// Prefered settings when being designed
// Border and title on
// Title ="Recent Topics"

global $scripturl;
$what=ssi_recentTopics('10', NULL, 'array');

echo '<table border="0"  width="100%" cellspacing="1" cellpadding="4" class="bordercolor">';
echo '<tr class="catbg3"><td valign="middle">Subject</td><td valign="middle">Board</td><td valign="middle">Poster</td><td valign="middle">Time</td></tr>';

foreach ($what as $topic)
  {
    echo '<tr><td class="windowbg" valign="middle">', $topic['link'];
    // Is this topic new? (assuming they are logged in!)
    if (!$topic['new'] && $context['user']['is_logged'])
      echo '<a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['time'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
      echo '</td><td class="windowbg2" valign="middle" >', $topic['board']['link'], '</td>';
      echo '</td><td class="windowbg2" valign="middle" >', $topic['poster']['link'], '</td><td class="windowbg2" valign="middle" >';
      if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
      echo '<a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
      echo '<span class="smalltext">', $topic['time'], '</span></td></tr>';
  }

echo '</table>';


I can change the Width by 1%. If I change it to 99% the scrollbar is gone. But ofcourse the rest of the layout is not aligned nicely. So how can I best get rid of this scrollbar?

// Nr|Five

Edit:

With IE I even have a vertical and a horizontal scrollbar! (Teh horror!)

Nr|Five

Okay n/m. Fixed it! :)

Added the following:


echo '<table style="width: 100%; height:1%; position: static;" cellspacing="1">';


Did the trick!

// Nr|Five

cepsi

#2
just in case anyone needs this. I had same problem as this with this code for recent block,

global $scripturl; echo '

<table border="0, position: static;"" width="95%, position: static;" cellspacing="1,position: static;" cellpadding="2,position: static;" class="bordercolor"> ';

// To show more posts change the number at recentTopics('8', to the amount you want.

// To hide specific rooms from the PHPscript replace the """, NULL,""" with """, array('7','56'),""" as an example.
// The numbers at the array = the rooms ID number. To find out what ID number the room you want to hide is, just klick on it.
// Then see what number it is at the end of the url. For example: /index.php?board=7.0 is the same as number 7

//This is the codeline you alter to change the amount of topics to show + hide rooms.
$what=ssi_recentTopics('4', array('2','3','4','6','8','18','19','20','42','104','135','109','106','105',), 'array');

foreach ($what as $topic){echo '

<tr>
<td class="windowbg" valign="middle">

<span class="smalltext">', $topic['link'];

// Is this topic new? (assuming they are logged in!)
if (!$topic['new'] && $context['user']['is_logged']) echo '
<a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

echo '
<br>
<span class="smalltext"> ', $topic['time'],'
<br>
by: ', $topic['poster']['link'], '
</span>
</span>
</td>
</tr>
';}echo '
</table>
';


when i changed the position "static" though it took the horizontal rulke away from the table so i reduced the width to 99% and seemed to work ok  ;D

<table border="0, position: static;"" width="99%, position: static;"

EDIT: had the same with the shoutbox and the same fix worked, reducing width to 99%

This website is proudly hosted on Crocweb Cloud Website Hosting.