Hello,
This hack will display members that have 0 posts, or are inactive, or are active in the memberlist.
(members that are longer than one month registered, and haven't been posted for a month will be displayed)
Tested on php 4.0.4pl1 and vB 2.0.1
I am still trying to make a hack to display the top 10 thread starters, if somebody can make this, please reply.
01. memberlist.php
Find,
Under it add,
02. open index.php
Find,
Under it add,
03. open your forumhome template, and place this code somewhere.
04. done
This hack will display members that have 0 posts, or are inactive, or are active in the memberlist.
(members that are longer than one month registered, and haven't been posted for a month will be displayed)
Tested on php 4.0.4pl1 and vB 2.0.1
I am still trying to make a hack to display the top 10 thread starters, if somebody can make this, please reply.
01. memberlist.php
Find,
PHP Code:
if ($what=="datejoined") {
$orderby="joindate";
$direction="DESC";
}
PHP Code:
// memberlist hack v1.0 by demolition, aka addict
if ($what=="0-posters") {
$condition.=" AND posts<'1'";
$orderby="";
$direction="";
}
if ($what=="active") {
$condition.=" AND posts>'0'";
$orderby="posts";
$direction="DESC";
}
if ($what=="inactive") {
$lastmonth = mktime (0,0,0,date("m")-1,date("d"),date("Y"));
$lastmonth2 = date("Y-m-d", $lastmonth);
$condition.=" AND joindate<UNIX_TIMESTAMP('".addslashes(strtolower($lastmonth2))."') AND lastpost<UNIX_TIMESTAMP('".addslashes(strtolower($lastmonth2))."')";
$orderby="posts";
$direction="DESC";
}
// end memberlist hack v1.0 by demolition, aka addict
Find,
PHP Code:
$numbermembers=$numbersmembers['users'];
PHP Code:
// memberlist hack v1.0 by demolition, aka addict
$snonposters=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE posts=0');
$nonposters=$snonposters['users'];
$activemembers=$numbermembers-$nonposters;
$lastmonth = mktime (0,0,0,date("m")-1,date("d"),date("Y"));
$lastmonth2 = date("Y-m-d", $lastmonth);
$sinactive=$DB_site->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM user WHERE joindate<UNIX_TIMESTAMP('".addslashes(strtolower($lastmonth2))."') AND lastpost<UNIX_TIMESTAMP('".addslashes(strtolower($lastmonth2))."')");
$inactive=$sinactive['users'];
// end memberlist hack v1.0 by demolition, aka addict
Code:
<A HREF="memberlist.php?s=$session[sessionhash]&what=0-posters">$nonposters 0-posters</A> | <A HREF="memberlist.php?s=$session[sessionhash]&what=active">$activemembers active members</A> | <A HREF="memberlist.php?s=$session[sessionhash]&what=inactive">$inactive non-active members</A>
Comment