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,965
  • Latest: boruko
Stats
  • Total Posts: 195,980
  • Total Topics: 21,320
  • Online today: 281
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 117
  • Total: 117

Post Count for Current Month

Started by THUNDERxRAGE, September 06, 2007, 01:45:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THUNDERxRAGE

JD, where can I find that mod block for the post count of the current month?

THUNDERxRAGE

Not member of the month.  I"m talking about the one that displays the post counts made by members for the current month.  Also, is it possible to have one that shows current post count for previous month?

THUNDERxRAGE

What? You deleted your post already? LoL

jdvarner

Not sure where i saw it here but, I just put the following in block: (you can convert time here: http://www.onlineconversion.com/unix_time.htm


global $db_prefix, $scripturl;

$starttime = 1188608400; // Change this to the time you want the contest to start
$endtime = 1191196799;  // Change this to the time you want the contest to end

$count= array();
$poster_number = array();
$query = db_query(
   "SELECT posterName, {$db_prefix}messages.ID_MEMBER, ID_GROUP
    FROM {$db_prefix}members
    JOIN {$db_prefix}messages
    ON {$db_prefix}members.ID_MEMBER = {$db_prefix}messages.ID_MEMBER
   
    AND posterTime > $starttime
    AND posterTime < $endtime", __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($query))
{
 if (!isset($count[$row['posterName']]))
   $count[$row['posterName']] = 0;
 ++$count[$row['posterName']];
   $poster_number[$row['posterName']] = $row['ID_MEMBER'];
}

arsort($count);
$list_number = 0;
foreach ($count as $key => $value)
{
 echo '<a class="normaltext" href="' . $scripturl . '?action=profile;u=' . $poster_number[$key] . '">' . $key . '</a> (' . $value . ')<br />';
 ++$list_number;
 if ($list_number > 9)  
   break;
}

jdvarner

Quote from: THUNDERxRAGE on September 06, 2007, 01:50:08 AM
What? You deleted your post already? LoL

i read your request wrong and posted the wrong thing at first.

THUNDERxRAGE

Okay, what kind of block do I put this in?

jdvarner

php box "think we better jumper off this thread before getting in trouble"> :)

pm if you like.

THUNDERxRAGE

Okay, thanks!  I'll give this a try.

This website is proudly hosted on Crocweb Cloud Website Hosting.