This AddOn replaces the file memberlist.php and shows this list in a better interface and adds more features in the listing (mostly in the PRO version). Please note, that as I said before, there is a replacement of the original memberlist.php, so in case that you want to revert back, you must re-upload this file from your vB distribution. Also after any vB upgrade you need to re-upload my memberlist.php (just re-upload, no re-importing the xml file).
2.- Features
Homepage with the following blocks
Meet Our Admins
2nd Same Block to promote another usergroup (PRO version only)
Top Rated Members (PRO version only)
Top Posters Last Week
Top Posters Last Month
Top Posters Overall
Just Join Us
*** All blocks can be turn On/Off and also you can change the title
Search Members
Username
Location
Join date
Posts
Age (PRO version only)
Points (PRO version only)
Infractions (PRO version only)
Aim, Icq, Msn, Yahoo, Skype (PRO version only)
For Messaging the search works like "Has Aim, Has Icq" and not as the native vB Search where you can search only for a specific account.
Rate This Member (PRO version only)
Contact Member
Email
PM
Add to Buddy
Send Friend Request
Aim, Icq, Msn, Yahoo, Skype (PRO version only)
Show Avatar or Image
Show Online Status
Reputation (PRO version only)
Featured Members (Different background color) (PRO version only)
3.- Installation
Upload all files in upload directory to your forum directory
Import product-forummembers.xml
Goto Forum Member Setting and set them as you like
Click "Usergroups" (Forum Members Menu) and select which usergroups you want to show (Hold Ctrl + Click for multi select).
Goto vB Usergroup permissions and set them accordinally.
4.- Copyright
This mod is an upgrade of Mary's MemberIndex for which I've got the rights. Copyright removal is phohibited (PRO version does not has copyright link).
Is there somewhere in the plugins or code where I could add an "if usergroup = " type statement that would force it to include a specific set of usergroups for its calculations?
Appreciate your work ...
Regards,
Doug
You need to edit memberlist.php. An example for Top posters last week (lines 219-240) is showing below:
Code:
// Week's Top Posters
// Put the usergroupids that you want to include
$include_groups = array(2,6,8);
if ($vbulletin->options["forummembers_week"] == '1') {
$timelimit = time() - 7 * 24 * 60 * 60;
$mostactiveweek_get = $db->query_read("
SELECT COUNT(post.dateline) AS postcount, post.userid,
user.userid, user.username, user.lastpostid, user.posts, user.usergroupid
FROM " . TABLE_PREFIX . "post AS post
JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
WHERE user.posts != '0' AND user.usergroupid IN($include_groups) AND post.dateline>'".$timelimit."'
GROUP BY post.userid
ORDER BY postcount DESC
LIMIT $limit
");
$users = array();
while($user = $db->fetch_array($mostactiveweek_get))
{
$users[] = $user;
$totalposts = $db->query_first("SELECT COUNT(postid) AS postcount FROM ".TABLE_PREFIX."post WHERE dateline>'".$timelimit."'");
$mostactiveusersweek = printUsers($users, $vbulletin->options['forummembers_week_text'], 2, $totalposts['postcount']);
unset($users);
}
}
You need to edit memberlist.php. An example for Top posters last week (lines 219-240) is showing below:
Code:
// Week's Top Posters
// Put the usergroupids that you want to include
$include_groups = array(2,6,8);
if ($vbulletin->options["forummembers_week"] == '1') {
$timelimit = time() - 7 * 24 * 60 * 60;
$mostactiveweek_get = $db->query_read("
SELECT COUNT(post.dateline) AS postcount, post.userid,
user.userid, user.username, user.lastpostid, user.posts, user.usergroupid
FROM " . TABLE_PREFIX . "post AS post
JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
WHERE user.posts != '0' AND user.usergroupid IN($include_groups) AND post.dateline>'".$timelimit."'
GROUP BY post.userid
ORDER BY postcount DESC
LIMIT $limit
");
$users = array();
while($user = $db->fetch_array($mostactiveweek_get))
{
$users[] = $user;
$totalposts = $db->query_first("SELECT COUNT(postid) AS postcount FROM ".TABLE_PREFIX."post WHERE dateline>'".$timelimit."'");
$mostactiveusersweek = printUsers($users, $vbulletin->options['forummembers_week_text'], 2, $totalposts['postcount']);
unset($users);
}
}
Hope that it helps.
Chris
It does Sir ..
Thank you ... very gracious of you to take the time to do this ...
Hi Chris ...
'
Ok, I made the changes, but now get this SQL error?
Did I miss something?
Quote:
Database error in vBulletin 4.1.3:
Invalid SQL:
SELECT COUNT(post.dateline) AS postcount, post.userid,
user.userid, user.username, user.lastpostid, user.posts, user.usergroupid
FROM post AS post
JOIN user AS user ON (post.userid = user.userid)
WHERE user.posts != '0' AND user.usergroupid IN(Array) AND post.dateline>'1334411824'
GROUP BY post.userid
ORDER BY postcount DESC
LIMIT 4;
MySQL Error : Unknown column 'Array' in 'where clause'
Error Number : 1054
Request Date : Saturday, April 21st 2012 @ 09:57:03 AM
Error Date : Saturday, April 21st 2012 @ 09:57:04 AM
Script : http://www.xxxx.com/memberlist.php
Referrer : http://www.xxxx.com/index.php
IP Address : xx.xxx.xxx.xxx
Username : Tester
Classname : vB_Database
MySQL Version : 5.0.95
Thanks...
Regards,
Doug
By the way, here's the code the way I changed it...
Quote:
// Week's Top Posters
// Put the usergroupids that you want to include
$include_groups = array(2,9,10);
if ($vbulletin->options["forummembers_week"] == '1') {
$timelimit = time() - 7 * 24 * 60 * 60;
$mostactiveweek_get = $db->query_read("
SELECT COUNT(post.dateline) AS postcount, post.userid,
user.userid, user.username, user.lastpostid, user.posts, user.usergroupid
FROM " . TABLE_PREFIX . "post AS post
JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
WHERE user.posts != '0' AND user.usergroupid IN($include_groups) AND post.dateline>'".$timelimit."'
GROUP BY post.userid
ORDER BY postcount DESC
LIMIT $limit
");
$users = array();
while($user = $db->fetch_array($mostactiveweek_get))
{
$users[] = $user;
$totalposts = $db->query_first("SELECT COUNT(postid) AS postcount FROM ".TABLE_PREFIX."post WHERE dateline>'".$timelimit."'");
$mostactiveusersweek = printUsers($users, $vbulletin->options['forummembers_week_text'], 2, $totalposts['postcount']);
unset($users);
}
}
// Month's Top Posters
// Put the usergroupids that you want to include
$include_groups = array(2,9,10);
if ($vbulletin->options["forummembers_month"] == '1') {
$timelimit = time() - 30 * 24 * 60 * 60;
$mostactivemonth_get = $db->query_read("
SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle,
COUNT(".TABLE_PREFIX."post.postid) AS postcount
FROM ".TABLE_PREFIX."user
LEFT JOIN ".TABLE_PREFIX."post
ON ".TABLE_PREFIX."post.userid=".TABLE_PREFIX."user.u serid
AND dateline>'".$timelimit."'
WHERE user.usergroupid IN($include_groups)
GROUP BY ".TABLE_PREFIX."user.userid
ORDER BY postcount DESC
LIMIT $limit");
$users = array();
while($user = $db->fetch_array($mostactivemonth_get))
$users[] = $user;
$totalposts = $db->query_first("SELECT COUNT(postid) AS postcount FROM ".TABLE_PREFIX."post WHERE dateline>'".$timelimit."'");
$mostactiveusersmonth = printUsers($users, $vbulletin->options['forummembers_month_text'], 2, $totalposts['postcount']);
unset($users);
}
// Overall Top Posters
// Put the usergroupids that you want to include
$include_groups = array(2,9,10);
if ($vbulletin->options["forummembers_overall"] == '1') {
$mostactive_get = $db->query_read("
SELECT userid, username, usertitle, posts AS postcount
FROM ".TABLE_PREFIX."user
WHERE user.usergroupid IN($include_groups)
ORDER BY posts DESC
LIMIT $limit");
$users = array();
while($user = $db->fetch_array($mostactive_get))
$users[] = $user;
$totalposts = $db->query_first("SELECT COUNT(postid) AS postcount FROM ".TABLE_PREFIX."post");
$mostactiveusers = printUsers($users, $vbulletin->options['forummembers_overall_text'], 2, $totalposts['postcount']);
unset($users);
}
A new update (ver.1.2.0) is available for download. In this version there is an extra setting where you can set which usergroup(s) to include in the TOP's blocks. The earlier version was counting posts only from Registered Members (usergroupid=2).
To upgrade upload all the files and import product-forummembers.xml selecting to overwrite.