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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 333
  • Total: 333

Top Posters - Post Count

Started by ontap, March 24, 2006, 07:17:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

rumboogy, the code you posted from the style.css file is for the formatting of the BBC code part of posts. By default if a font property is not specified in the code for the snippet, it will use the default font property of the body class (if specified). If not specified, it will be in the div or table class.

rumboogy

#41
Thanks IchBin,

I think I am still lost. I understand that if the font is not specified in the code, it will use the default font in the style.css file...which is the case here (I think), but I don't know how to code a smaller font for this script:


// Show the top poster's name and profile link.
// Theres no post count... so lets show it
function ssi_topPoster($topNumber = 3, $output_method = 'echo')
{
global $db_prefix, $scripturl;

// Find the latest poster.
$request = db_query("
SELECT ID_MEMBER, realName, posts
FROM {$db_prefix}members
ORDER BY posts DESC
LIMIT $topNumber", __FILE__, __LINE__);
$return = array();
while ($row = mysql_fetch_assoc($request))
$return[] = array(
'id' => $row['ID_MEMBER'],
'name' => $row['realName'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<table border="0" cellpadding="0" cellspacing="3" width="100%"><font size="1"><td><a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">  ' . $row['realName' ] . '</a></td><td align="right">' . $row['posts' ] . '</font><br></td></table>',
);
mysql_free_result($request);

// Just return all the top posters.
if ($output_method != 'echo')
return $return;

// Make a quick array to list the links in.
$temp_array = array();
foreach ($return as $member)
$temp_array[] = $member['link'];

echo implode($temp_array);
}


So my question is...is there a way to control font size by adding the font size code in the script. I also want to single space the list.

Sorry to be so dense...

On the left size is the font size I want...on the right is what it presently is...(default size)

IchBin

Yes, you can add the class="smalltext" to your <td> tag. :)

rumboogy

Thanks IchBin...I will work at it some more...

I had forgot to list the site I was working on...better late than never I guess.
http://www.zumoforums.com

Thanks,

Wally

IchBin

I would delete the <font size="1"> and </font> tags as well.

magz

Quote from: JPDeni on March 13, 2007, 02:03:57 PM
I guess one of my failings is that I don't use many of the built-in functions. I prefer to use a php block and write the code myself.

Open TPortalBlocks.template.php. Search for


ssi_topPoster(5);


Change the number there.

Hi,
Where can I find TPortalBlocks.template.php.

JPDeni


magz


b33znutz


DarkAngel612

i am so glad i got pointed in this direction...by using the php block and only changing 1 line in the ssi file i got it to work and even decreased the space in between the name and post count but

how do i get rid of the comma ?

This website is proudly hosted on Crocweb Cloud Website Hosting.