The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]() Quote:
Open Forum Block Manager Create a new block -> type -> Custom Html (if you already have some block which is Custom HTML type and you want to add in that, then edit that block else create new block) type: PHP Content: Code:
global $db; $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"); $templater = vB_Template::create('mostactivemember'); $templater->register('mostactive',$mostactive); $mostactives = $templater->render(); return $mostactives; Now You need to create a template Title: mostactivemember Code:
1. You can Use {vb:raw mostactive.username} to display the username 2. You can Use {vb:raw mostactive.count} to display the post count in a week Quote:
Replace The Plugin Content With This 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"); $memberaction_dropdown = construct_memberaction_dropdown(fetch_userinfo($mostactive[userid])); vB_Template::preRegister('FORUMHOME',array('mostactive' => $mostactive)); vB_Template::preRegister('FORUMHOME',array('memberaction_dropdown' => $memberaction_dropdown)); Code:
{vb:raw memberaction_dropdown} |
2 благодарности(ей) от: | ||
ProFifaLeagues, ravel123 |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|