Topic: Plug in like TOP 20 most active users
Can someone create module or plug-in for top 20 or 10 most active users to be showed before footer
Here is sample:

This is on Bosnian language but it's like SomeNick (number of posts), ...
Thanks ...
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Plug in like TOP 20 most active users
Can someone create module or plug-in for top 20 or 10 most active users to be showed before footer
Here is sample:

This is on Bosnian language but it's like SomeNick (number of posts), ...
Thanks ...
this would have to be a modification, it wouldn't be that hard you just need to do an extra sql query
As soon as I come back from work, I'll make this small update for you!
It's really quite simple to create..
Here you go:
<!--- "Top 20 most active users" Script by ultime (ultime@omgultime.com) created for PunBB --->
<div id="announce" class="block">
<h2><span><b>Top 20 most active users</b></span></h2>
<div class="box">
<div class="inbox">
<div>
<?php$result = $db->query('SELECT id, username, num_posts FROM '.$db->prefix.'users ORDER BY num_posts DESC LIMIT 20') or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data = $db->fetch_assoc($result))
{
echo "\t\t\t\t\t\t".'<a href="profile.php?id='.$data['id'].'">'.pun_htmlspecialchars($data['username']).'</a>('.$data['num_posts'].') '."\n";
}?>
</div>
</div>
</div>
</div>
<!--- End for "Top 20 most active users" --->
For an example, go to www.cash4posts.com and scroll down a little..
Were do i have to put the code?
i'ill put before footer ...
thanks alot ultime ... i put this modification on my punbb it's work perfect. There is some modifications here is sample for anyone who need this option
open index.php
------------------
find
<?php
$footer_style = 'index';
require PUN_ROOT.'footer.php';replace with
<!--- "Top 20 most active users" Script by ultime (ultime@omgultime.com) created for PunBB --->
<div id="announce" class="block">
<h2><span><b>Top 20 most active users</b></span></h2>
<div class="box">
<div class="inbox">
<div>
<?php
$result = $db->query('SELECT id, username, num_posts FROM '.$db->prefix.'users ORDER BY num_posts DESC LIMIT 20') or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data = $db->fetch_assoc($result))
{
echo "\t\t\t\t\t\t".'<a href="profile.php?id='.$data['id'].'">'.pun_htmlspecialchars($data['username']).'</a>('.$data['num_posts'].') '."\n";
}
?>
</div>
</div>
</div>
</div>
<!--- End for "Top 20 most active users" --->
<?php
$footer_style = 'index';
require PUN_ROOT.'footer.php';No problem faax, if you really want the commas between usernames, just create an array and use the implode() function..
Have fun with this script ![]()
ultime thanks alot for this modification
Hi. Thanks for the code.
What shall i change if I want top 20 for the number of topics?
Added to the punres wiki
http://punres.org/doku.php?id=how-tos:t … tive_users
Hi. Thanks for the code.
What shall i change if I want top 20 for the number of topics?
Can anyone help please?
Cool!
But how do i get it to work in MyPunBB?
If you're guaging how 'active' users are by their number of posts - this is a great script.. but how hard would it be to write a 'karma' system of sorts where users get karma for posting... but lose it if they dont post over a long period of time, so 'active' users have to remain active?
Any ideas?
I tried to make this mod for people who had colored usergroups. But for some reason it wasn't working. Can someone help me with this? I want the 20 most active users to have their corresponding usergroup color. Thanks.
--Blueorb
i put the code in a txt file and then in main.tpl i put
<pun_include "file.txt">were i wanted it
I´m using the miniportal and it would be really nice if I can add the 20 most active users in the top of my forum.php How do I do that? I´ve tried to just copy/paste the code further up in the forum.php file but I only get the result that everything below the pasted code disapers.
I also tried this in the viewtopic.php file...copied and pasted the moste 20 active users code and it now shows/works1. How come it doesn´t work in the forum.php file?
thanks for the code ![]()
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Plug in like TOP 20 most active users
Powered by PunBB, supported by Informer Technologies, Inc.