[Request] [vBulletin] Top Ignored Members

Exel

Reputable
Joined
Jun 13, 2013
Messages
211
Reaction score
0
FP$
6
Requested here: http://www.vbulletin.org/forum/showthread.php?p=2433448#post2433448

PHP:
$ignorelistquery = $vbulletin->db->query_read("
SELECT ulist.userid, ulist.type, COUNT(ulist.relationid) AS exel, u.userid, u.username
FROM userlist as ulist
LEFT JOIN 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..

HTML:
<table width="100%">
<tr>
<td>
Top 100 Ignored Members
</td>
</tr>
<tr>
<td>
$topignorelist
</td>
</tr>
</table>
 
Back
Top Bottom