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,004
  • Total Topics: 21,330
  • Online today: 136
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 875
  • Total: 875

Recent Topics Block missing some things

Started by Moif, June 17, 2008, 10:34:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Moif

Hi,

I'm in the process of upgrading my SMF and TP forums to the latest stable and beta versions respectively. However, I've noticed that my Recent Topics block on the front page doesn't have the poster name or time:

http://labs.brap.fm/index.php

How do I get that back so it's the same as my live site:

http://forums.brap.fm/index.php

Thanks

Zetan

Looks like it does to me.. Although the horizontal rule has been omitted and the font size is a little different.

Moif

You're right, the text is there but from what I can see, on my live site, the fonts are all of a different style. Poster name is in bold, date is in square brackets with the today in bold and it's all nicely formatted.

On the labs site, it's all the same font, size and formatting and yep, no horizontal rule.

Is this a stylesheet issue?

Zetan

Nope.. it's the tportal.blocks.php file (I think.. at work and can't check). I'm not sure why it was changed, but I prefered it the way it was.

try having a search, somebody may have posted a fix for it.

Moif

Ah cool. I'll check the old php and make some comparisons.

Thanks

Moif

Fixed.

in TBlocks.template.php

Find (around line 171)


// Output the topics
echo '
<ul class="tp_recentblock" style="' , $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , '">';
foreach($what as $w){
echo '
<li style="overflow: auto;"><a href="'.$w['href'].'">'.$w['short_subject'].'</a> ', $txt[525], ' ', $w['poster']['link'];
if(!$w['new'])
echo ' <a href="'.$w['href'].'"><img src="'. $settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';

echo ' ['.$w['time'].']
</li>';
}
echo '
</ul>';
}


Replace with:


// Output the topics
$counter=1; $cmax=count($what);
echo '
<div style="width: 100%; ' , $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , '">';
foreach($what as $w){
echo '
<div class="smalltext"><a href="'.$w['href'].'">'.$w['short_subject'].'</a></div>
<div class="smalltext">', $txt[525], ' <b>', $w['poster']['link'], '</b></div>
<div class="smalltext">';
if(!$w['new'])
echo '<a href="'.$w['href'].'"><img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';

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

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

Zetan

Good stuff, pleased you worked it out.  :up:

Marked solved

This website is proudly hosted on Crocweb Cloud Website Hosting.