07-07-2001, 10:00 PM
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, if ($what=="datejoined") {
$orderby="joindate";
$direction="DESC";
}Under it add,// 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 addict02. open index.php
Find,$numbermembers=$numbersmembers['users'];Under it add,// 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 addict03. open your forumhome template, and place this code somewhere.<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>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, if ($what=="datejoined") {
$orderby="joindate";
$direction="DESC";
}Under it add,// 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 addict02. open index.php
Find,$numbermembers=$numbersmembers['users'];Under it add,// 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 addict03. open your forumhome template, and place this code somewhere.<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>04. done