View Full Version : Show richest members on CMPS ?
LoOnEyToOnZ
06-14-2004, 09:16 AM
Im using uCash, how can i show the richest users on the frontpage of CMPS, on the right sideblock ?
LoOnEyToOnZ
06-16-2004, 07:29 AM
Anyone ?
Natch
06-16-2004, 09:13 AM
Should be simplicity itself ...
Make a new PHP module, which performs the query and retrieves the top 10 (or however many you like) richest members <?
require_once('./global.php');
global $DB_site;
$result = $DB_site->query("SELECT user.userid as userid, user.username as username, user.money as money FROM " . TABLE_PREFIX ."user as user ORDER BY money LIMIT 10");
while($hoarders = $DB_site->fetch_array($result))
{
$moneybagsbits.= "<tr><td><a href=\"member.php?userid=" . $hoarders['userid'] . "\" title=\"Visit the palace of this rich user\">" . $hoarders['username'] . "</a></td><td>" . $hoarders['money'] . "</td></tr>\n";
}
$moneybags = "<tr><th>Richest User</th><th>Cash</th></tr>\n$moneybagsbits";
eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_moneybags') . '";');
?>
Then make a template called adv_portal_moneybags:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder"width="100%">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Top uCash Holders</strong></span></td>
</tr>
$moneybags
</table>
<br />
Now bear in mind that I know nothing about the structure of the uCash hack - I don't use it - but this theory should work ...
Then u need to install the module the same way you do any of the others ...
anyone has tested this block? oh and can we see a screenshot?
LoOnEyToOnZ
07-04-2004, 12:02 AM
I got this error when i used this module.....
Database error in vBulletin 3.0.0:
Invalid SQL: SELECT user.userid as userid, user.username as username, user.money as money FROM user as user ORDER BY money LIMIT 10
mysql error: Unknown column 'user.money' in 'field list'
mysql error number: 1054
Date: Sunday 04th of July 2004 04:00:51 AM
Script: http://www.singaporesoccer.com/?
Referer: http://www.singaporesoccer.com/forum/index.php?
Username: Shawn
IP Address: 202.156.2.130
Zachery
07-04-2004, 12:35 AM
Because youll need to adapt it for uCS ill see about getting some instructions for the next release
LoOnEyToOnZ
07-30-2004, 11:36 AM
Because youll need to adapt it for uCS ill see about getting some instructions for the next release
Any luck with it ? :rolleyes:
Zachery
07-30-2004, 04:12 PM
Did you try requesting this at GeekyDesigns.com or the thread at vB.org? im no programer ;p that is matts department
Did you try requesting this at GeekyDesigns.com or the thread at vB.org? im no programer ;p that is matts department
You dont code? what do you do then? :p just curious
Zachery
07-30-2004, 04:37 PM
Templates, styles, small bits and peices of code in uCS, Managment :)
Cool... just getting to know you ;)
curetheitch
08-11-2004, 07:48 PM
Any updates on this?
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.