Create New Plugin:
Hook:
forumhome_complete
Title: Most Actived Member Of The Week
Execution Order : 5
Code
Code:
$cutofftime = TIMENOW - 7*86400;
$mostactive = $db->query_first("select count(postid) as count, post.userid, user.username from ".TABLE_PREFIX."post INNER JOIN ".TABLE_PREFIX."user on user.userid = post.userid where post.dateline > $cutofftime GROUP BY post.userid ORDER BY count DESC LIMIT 1");
vB_Template::preRegister('FORUMHOME',array('mostactive' => $mostactive));
Now To Display Username of the Most Active Member
Use:
Code:
{vb:raw mostactive.username}
anywhere in the FORUMHOME TEMPLATE