<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Help on a plugin that shows top posters</title>
		<link>https://www.cotonti.com</link>
		<description>Son konu mesajları</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Fri, 01 May 2026 15:49:55 -0000</pubDate>

		<item>
			<title>Twiebie</title>
			<description><![CDATA[<p>
	Thanks for the quick reply, Trustmaster!</p>
<p>
	Got it working now. :)</p>
]]></description>
			<pubDate>Sal, 31 Tem 2012 18:37:22 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=7026&d=0#post35045]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	The users table does not keep history information, so you cannot extract statistics for a given time span. Instead, the information should be extracted from the forum posts table. The query for top 10 posters for the last 7 days looks like this:</p>
<pre class="brush:sql;">
SELECT u.user_id, u.user_name, u.user_avatar, COUNT(p.fp_id) AS count
    FROM `$db_forum_posts` AS p
        LEFT JOIN `$db_users` AS u ON p.fp_posterid = u.user_id
    WHERE fp_creation &gt; UNIX_TIMESTAMP() - 7*24*3600
    GROUP BY fp_posterid
    ORDER BY count DESC
    LIMIT 10</pre>
]]></description>
			<pubDate>Sal, 31 Tem 2012 18:11:16 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=7026&d=0#post35044]]></link>
		</item>
		<item>
			<title>Twiebie</title>
			<description><![CDATA[<p>
	I want to create a little plugin that shows the weekly top posters in a list.</p>
<p>
	I've grabbed a bit of code from the forum stats plugin to get started, but now i'm wondering how I can get/specify the users post count for a specific timespan (a week for example).</p>
<pre class="brush:php;">
$res = $db-&gt;query("SELECT user_id, user_name, user_postcount FROM $db_users WHERE 1 ORDER by user_postcount DESC LIMIT 10");

foreach ($res-&gt;fetchAll() as $row) {
	$t1-&gt;assign(array(
		'TOPPOSTERS_NAME' =&gt; cot_build_user($row['user_id'], htmlspecialchars($row['user_name'])),
		'TOPPOSTERS_POSTS' =&gt; $row["user_postcount"],
	));
}</pre>
<p>
	Thanks.</p>
]]></description>
			<pubDate>Sal, 31 Tem 2012 17:53:24 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/tr/forums?m=posts&q=7026&d=0#post35043]]></link>
		</item>
	</channel>
</rss>