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

Top Posters with posts II

Started by evillair, June 11, 2007, 06:07:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

evillair

There's already a 'top poster with posts' snippet but this on doesn't affect any files (SSI.php).
It's all done within the block.

Make a new phpbox and paste this in:

$myposterarray = ssi_topPoster(5,'array');

echo'<table width="100%" border="0" cellpadding="2">
  <tr>
    <td align="left" class="middletext"><b>Member</b></td>
    <td align="right" class="middletext"><b>Posts</b></td>
  </tr>';
foreach ($myposterarray as $member)
{
  echo'
    <tr><td align="left" class="smalltext">'. $member['link'] .'</td>
    <td align="right" class="smalltext">'. $member['posts'] .'</td></tr>';
}

echo'</table>';



Just change the 5 on the first line to how many members you want to display.
You can also change (or remove) the classes from the <td>'s if you want, I like the text small. ;)

Demo:  bottom right block.

Thanks.


soMzE

Cool thnx a lot!  Using it right now  :)

And you've got a very nice forum, looks great! One off-topic question, how did you get that rating system onto your forum on the message index?

evillair

Thanks

It's just this MOD: http://custom.simplemachines.org/mods/index.php?mod=91

I just edited it a bit to fit what I wanted.

This website is proudly hosted on Crocweb Cloud Website Hosting.