TinyPortal

Development => Support => Topic started by: youngjoonshi on July 16, 2006, 06:19:52 PM

Title: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: youngjoonshi on July 16, 2006, 06:19:52 PM
So, another 'minor' issue that came up just a few weeks ago...my Recent Topics block is looking way too big (in normal text size), compared to the other bits:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg503.imageshack.us%2Fimg503%2F7162%2Ffdaqr7.jpg&hash=357f8cd656f60dc28026cf3b93ee68e5a38cbc67)

This is only true for FireFox (both 1.5 and 2.0)...IE and Opera render it properly:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg103.imageshack.us%2Fimg103%2F9015%2Ffdsuc8.jpg&hash=3b04cb9035ef433967033e144d29b10098b15d7f)

Also, (if that cannot be fixed), how would you put a center block down to the bottom and not the top? (like at the bottom of the index, not at the very top...)

Any help would be appreciated..

PS: Why is it always FireFox causing problems?? >:(
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: Nokonium on July 16, 2006, 10:01:24 PM
I have some customised code you could use. I have added a spot like the User block and 'New' will display after the user name. All the text is given the smalltext style so that it matches the user block.

In TPortalBlocks.template.php find the code for the 'Recent Topics Block' and replace it with

// TPortal recent topics blockÃ,  Nokonium version
function TPortal_recentbox()
{
global $context, $settings, $options, $txt , $modSettings;
Ã,  Ã,  // is it a number?
if(!is_numeric($context['TPortal']['recentboxnum']))
$context['TPortal']['recentboxnum']='10';

// leave out the recycle board, if any
if(isset($modSettings['recycle_board']))
$bb=array($modSettings['recycle_board']);
else
$bb=array();

$what=ssi_recentTopics($num_recent = $context['TPortal']['recentboxnum'], $bb, $output_method = 'array');
// Output the topics
$counter=1; $cmax=count($what);
echo '
<div style="width: 100%; overflow: hidden;">';
foreach($what as $w){
echo '
<div style="white-space: nowrap;" class="smalltext">
<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" />&nbsp;<a href="'.$w['href'].'">'.$w['short_subject'].'</a>
Ã,  Ã,  Ã,  Ã,  </div>';
Ã,  echo '<span class="smalltext">', $txt[525], ' <b>', $w['poster']['link'], '</b>';
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  if(!$w['new'])
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,   echo '<a href="'.$w['href'].'">&nbsp;<img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a></span>';
echo '<span class="smalltext"><br /> ';

echo '['.$w['time'].']
</span>';

if($counter != $cmax)
echo '<hr />';
$counter++;
}
echo '
</div>';
}


PS it isn't FireFox causing the problems, it is IE. Both FF and Opera will both render  HTML code properly, however sometime back M$ decided they new better than to stick to  strict html and as a consequence trying to get code to render correctly in all browsers is problematic. IE7 will be better.
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: youngjoonshi on July 16, 2006, 10:09:25 PM
Same problem:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg245.imageshack.us%2Fimg245%2F9297%2Ffdszb6.jpg&hash=46b7600f9d7ba01a633fe2e9a332726ef7e8ddb8)

Any other ideas??
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: G6Cad on July 16, 2006, 11:47:15 PM
Clear cash and refresh and see it you still have the bigger text there
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: IchBin on July 17, 2006, 03:42:29 AM
It may also be one of the custom blocks you have. YOu can disable all blocks but the recent topics,(see if it works properly then) if so, then enable each block one by one to see which one is causing the issue.
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: iwyen on July 17, 2006, 05:22:27 AM
Quote from: YJ on July 16, 2006, 06:19:52 PM
Also, (if that cannot be fixed), how would you put a center block down to the bottom and not the top? (like at the bottom of the index, not at the very top...)

http://www.tinyportal.net/smf/index.php?topic=6088.msg49614#msg49614

This will move center block above the footer but everything in center block such as news or announcement type of blocks will be moved as well. Maybe bear with it and wait for the next release :P
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: Nokonium on July 17, 2006, 06:28:48 AM
When you have Kgadget open in Firefox, press control  and zero to reset Firefox to its normal text size.
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: youngjoonshi on July 17, 2006, 11:21:56 AM
Yeah, I tried that (clearing cooke&cache, restarting browser, setting text size to standard, disabling blocks) but it still just stays...:(

I will just wait for the next release..see what happens..
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: youngjoonshi on July 17, 2006, 12:04:52 PM
Figured out just now:

My Main Menu had it's text size to 2, which led to the Recent block having 2 as well...

But I need text 2 for the headings, so the sub headings don't look the same...any idea how to keep the recent topic block's text size the same?

EDIT Somehow fixed it by moving to the right hand side..

But I want it to be on the left hand side! :(
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: Assistance on July 17, 2006, 01:10:50 PM
I've noticed things changes differntly after moving them too
could it possibly be the cache featue on SMF in admins cp

maybe disable all blocks and put the current one where you want then see which one throws it out of wack
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: IchBin on July 17, 2006, 03:05:05 PM
YJ, can you post your menu code. I think there may be something causing it in that code.
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: youngjoonshi on July 17, 2006, 03:52:11 PM
Here it is:

<div class="smalltext"><font  size="1"><b>Navigation</b></font><br><hr><img src="Themes/TP_DilberMC/images/menu/home.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php">Home</a></font><br> <img src="Themes/TP_DilberMC/images/menu/forum.gif" /> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=forum">Forum</a></font></b><br><img src="Themes/TP_DilberMC/images/menu/news.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?board=82.0">News/Blog</a></font><br><img src="Themes/TP_DilberMC/images/menu/chat.gif"/> <font size="2"><a href="javascript:poptastic('chat/php121im.php');">Live Chat</a></font><br><img src="Themes/TP_DilberMC/images/menu/links.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/dir/">Link Directory</a></font><br><img src="Themes/TP_DilberMC/images/menu/rss.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=.xml">Syndication</a></font><br><br><font size="1"><b>Services</b></font><br><hr><img src="Themes/TP_DilberMC/images/menu/shop.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=shop">Shop</a></font><br><img src="Themes/TP_DilberMC/images/menu/calendar.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=calendar">Calendar</a></font> <font size="2"><br><img src="Themes/TP_DilberMC/images/menu/karma.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=viewkarma">Karma</a></font><br><img src="Themes/TP_DilberMC/images/menu/members.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=mlist">Member List</a></font><br><img src="Themes/TP_DilberMC/images/menu/online.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=who">Who's Online?</a></font><br><img src="Themes/TP_DilberMC/images/menu/stats.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=stats">Statistics</a></font><br><img src="Themes/TP_DilberMC/images/menu/vip.gif" /> <font size="2"><b><a href="http://www.gadgetkorea.com/index.php?topic=865.0">VIP Account</a></b></font></b><br><br><font size="1"><b>Help & Support</b></font><br><hr><img src="Themes/TP_DilberMC/images/menu/search.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=search">Search</a></font><br><img src="Themes/TP_DilberMC/images/menu/faq.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=help">Help Center</a></font><br><img src="Themes/TP_DilberMC/images/menu/staff.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?action=staff">Site Staff</a></font><br><img src="Themes/TP_DilberMC/images/menu/contact_us.gif"/> <font size="2"><a href="http://www.gadgetkorea.com/index.php?page=4">Contact Us</a></font></div>
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: G6Cad on July 17, 2006, 04:22:26 PM
you seem to have both smalltext and textsize 1 in the same call

try remove <font  size="1"> from that string
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: youngjoonshi on July 17, 2006, 04:25:47 PM
Tried it...makes no difference..:(
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: G6Cad on July 17, 2006, 06:50:30 PM
You have a lot of fontsize 2 aswell, i think i will leave this for IchBin, but i think you should just keep the small text and remove the fontsize from the code, not sure how to though.  ???
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: youngjoonshi on July 17, 2006, 06:52:39 PM
Well, I need fontsize 2 for the menu description...(otherwise it appears to small compared to the icons)...

Oh, and I deleted that small text...

Maybe this is a bug in TP? (or Firefox)
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: IchBin on July 17, 2006, 08:38:32 PM
Right after the calendar code you have one to many <font size="2"> tags. Delete that one and it should fix your problem.
Title: Re: Recent Topics block - Way too big. (Firefox ONLY.)
Post by: youngjoonshi on July 17, 2006, 08:44:31 PM
Thanks IchBin, issue fixed.;)