TinyPortal
Development => Block Codes => Topic started by: THUNDERxRAGE on September 06, 2007, 01:45:22 AM
JD, where can I find that mod block for the post count of the current month?
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?
What? You deleted your post already? LoL
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;
}
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.
Okay, what kind of block do I put this in?
php box "think we better jumper off this thread before getting in trouble"> :)
pm if you like.
Okay, thanks! I'll give this a try.