View Full Version : Top 100 most ignored members?
dutchbb
03-16-2013, 12:08 AM
Someone on our forums asked for this. Top 100 of members who are ignored by the most other members (on the ignore list).
I believe it does not exist yet?
dutchbb
07-04-2013, 05:43 PM
Anyone interested?
Here you go: http://elite-source.com/web-design-development-discussion/442-%5Brequest%5D-%5Bvbulletin%5D-top-ignored-members.html#post2104
Requested here: https://vborg.vbsupport.ru/showthread.php?p=2433448#post2433448
$ignorelistquery = $vbulletin->db->query_read("
SELECT ulist.userid, ulist.type, COUNT(ulist.relationid) AS exel, u.userid, u.username
FROM " . TABLE_PREFIX . " userlist as ulist
LEFT JOIN " . TABLE_PREFIX . " user as u ON(u.userid = ulist.relationid)
WHERE ulist.type ='ignore'
GROUP BY ulist.relationid
ORDER BY ulist.type DESC LIMIT 100
");
while($ignore = $db->fetch_array($ignorelistquery)) {
$exelusername = $ignore['username']; //Username by Exel @ Elite-Source
$exeluserid = $ignore['userid']; //Ignore UserID by Exel @ Elite-Source
$exelcount = $ignore['exel']; //Ignore Count by Exel @ Elite-Source
$topignorelist .= "
<div style='background-color: alt1; padding: 4px; border-bottom: 1px solid rgb(163,163,163);'>
<div style='padding-top: 1px; padding-bottom: 1px;'><span><a href='member.php?u=$exeluserid'>$exelusername</a></span><span style='color: #1b5c75;margin-right: 5px;float:right;'>(Ignored $exelcount times)</span></div>
</div>";
}
$db->free_result($ignorelistquery);
You can add that to a global_complete hook / plugin then use $topignorelist wherever you want it.
From the looks of it, though.. you want it on an external page, so you can just add this to the PHP page you're going to use it on. ;)
And remember, you still need to add a table around it.
So it'd be something like..
<table width="100%">
<tr>
<td>
Top 100 Ignored Members
</td>
</tr>
<tr>
<td>
$topignorelist
</td>
</tr>
</table>
dutchbb
07-13-2013, 02:01 PM
Thanks but I just tried it and it returned a blank page on all the forum.
So not working for vBulletin 3.8.7 Patch Level 3
Here you go, I turned it into a product. :)
https://vborg.vbsupport.ru/showthread.php?t=300073
BirdOPrey5
07-18-2013, 11:06 AM
Here you go: http://elite-source.com/web-design-development-discussion/442-%5Brequest%5D-%5Bvbulletin%5D-top-ignored-members.html#post2104
Requested here: https://vborg.vbsupport.ru/showthread.php?p=2433448#post2433448
$ignorelistquery = $vbulletin->db->query_read("
SELECT ulist.userid, ulist.type, COUNT(ulist.relationid) AS exel, u.userid, u.username
FROM " . TABLE_PREFIX . " userlist as ulist
LEFT JOIN " . TABLE_PREFIX . " user as u ON(u.userid = ulist.relationid)
WHERE ulist.type ='ignore'
GROUP BY ulist.relationid
ORDER BY ulist.type DESC LIMIT 100
");
while($ignore = $db->fetch_array($ignorelistquery)) {
$exelusername = $ignore['username']; //Username by Exel @ Elite-Source
$exeluserid = $ignore['userid']; //Ignore UserID by Exel @ Elite-Source
$exelcount = $ignore['exel']; //Ignore Count by Exel @ Elite-Source
$topignorelist .= "
<div style='background-color: alt1; padding: 4px; border-bottom: 1px solid rgb(163,163,163);'>
<div style='padding-top: 1px; padding-bottom: 1px;'><span><a href='member.php?u=$exeluserid'>$exelusername</a></span><span style='color: #1b5c75;margin-right: 5px;float:right;'>(Ignored $exelcount times)</span></div>
</div>";
}
$db->free_result($ignorelistquery);
There are spaces after each " . TABLE_PREFIX . " that must be removed to prevent db errors if a table prefix is present.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.