I have a fishing rod that I would like to give away to somebody on our board. I am going to do a posting contest type thing where the person with the most posts within a certain time frame will win.
How do I keep track of posts? Is there somewhere in the admin panel that will help me out?
I don't think there is any such thing WSA. I haven't even seen a mod for such a feature. I think you'll have to manually keep track of the posts.
Man, that'll be hard. Thanks Ichbin.
you could use the posting cloud from the snipits board. and instead of using most
posters in last 100 votes use most of the last 1,000. Whoevers name is biggest wins. (sure the code would need altering)
maybe put it on its own page and just start when your board hits a certain number of posts such as 10,000 and say the contest ends when we hit 11,000
maybe the guy that made that snippit could help ya.
You mean this guy, londonhogfan? ;)
It shouldn't be too hard, really. You wouldn't have to have them different sizes, either, because they could get huge. I think it would be pretty easy to just have the number in parentheses after the name.
Done in a flash!
First, you need to find out the unix time for when you want it to start and end. You can compute it here (http://www.onlineconversion.com/unix_time.htm), among many other places. Put those numbers into the $starttime and $endtime variables below.
The code does not count admins or global moderators and prints out the 10 most prolific posters within the time frame, with the number of posts in parentheses after the name. There isn't any error checking for the beginning when there won't be any posts, though. It also prints a link to the profile, which you can delete if you want.
global $db_prefix, $scripturl;
$starttime = 1152182762; // Change this to the time you want the contest to start
$endtime = 1152405444; // 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
WHERE ID_GROUP <> 1 AND ID_GROUP <> 2
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;
}
WSA if you use the following method you could do it very easily:
- Make an announcement and get people to ENTER the competition - the reason for this will become apparent soon lol
- ONLY THOSE who enter --> copy the number of posts they have and store it in a file somewhere so you know --> then make their post count 0 by editing their profile
- Let them know this is ONLY done for the competition duration, to keep count and their post count WILL BE RESTORED once the competition is over
- do this only for those who entered the competition
- once ts over simply take out ur record of old posts, add it to the new post count and update their profiles
viola done
ok jp came up with a more professional approach :D
<3 JPDeni
LOL <3 you, too, IchBinâââ,¬Å¾Ã,¢
I already had most of it done. Actually, it was more a matter of taking out code from my poster cloud than adding it.
akulion, that's kind of an interesting idea, though. It can be a good thing to put the old-timers back to being newbies for a while.
Awesome. Thank you JP. That worked just fine. I already put the block up and it's running great.
Thanks again.
I'm really glad to help. That was an easy one. :)
Thanks JPDeni.
How about adding the snippet to the snippets board?
Okey-dokey. (Most of the time I forget which board I'm on. I thought this was the snippet board. ;D )