The Arcive of vBulletin Modifications Site. |
|
More Leaders of the Leaderboard? Details »»
|
|||||||||||||||||||||||||
Below is the code (arcade.php) to show 1 Leader of the Leaderboard (avatar + name + total score)
Anyone know how to change this into 3 Leaders of the Leaderboard (avatar + name + total score)? Code:
$DB->query("SELECT mid, gid, sum(position) AS position, sum(points) AS points FROM ibf_games_league GROUP BY mid ORDER BY points DESC LIMIT 1");
$row = $DB->fetch_row();
$points=$row['points'];
$name = "<span class=\"smallfont\"><strong><a href=\"";
$name = $name . $ibforums->base_url."act=Arcade&module=report&user=".$row['mid']."\">";
if ($row['mid'] > 0)
{
$Touruserid = $row['mid'];
$DB->query("SELECT name FROM ibf_members WHERE id=".$Touruserid);
$row = $DB->fetch_row();
$name = $name . $row['name'].'</a></strong></span>';
$tourneyinfo['champ'] = "<b>".$name."</b><br /><span class=\"smallfont\">{$ibforums->lang['tourneyinfo_txt1']}<b>".$points."</b>{$ibforums->lang['tourneyinfo_txt2']}</span>";
$tourneyinfo['champavatar'] = "";
$DB->query("SELECT avatar,avatar_size AS size FROM ibf_members WHERE id=".$Touruserid);
if ($avatar = $DB->fetch_row())
{
$tourneyinfo['champavatar'] = $std->get_avatar($avatar , 1 , $avatar['size']);
if ($tourneyinfo['champavatar'] == "")
{
$tourneyinfo['champavatar'] = "<img src='./arcade/images/noavatar.gif' alt='' />";
}
}
else
{
$tourneyinfo['champavatar'] = "<img src='./arcade/images/noavatar.gif' alt='' />";
}
}
else
{
$tourneyinfo['champ'] = "{$ibforums->lang['top3box_norank']}";
$tourneyinfo['champavatar'] = "";
}
Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Have you tried changing the LIMIT in first line ??
Code:
$DB->query("SELECT mid, gid, sum(position) AS position, sum(points) AS points FROM ibf_games_league GROUP BY mid ORDER BY points DESC LIMIT 1");
|
|
#3
|
||||
|
||||
|
Thanks stangger5, but nope, that alone doesn't work. How would one call 3 different names, avatars and total scores that way? There's no array to take avatar123, total score123, name123 from. Ofcourse the limit should be raised to 3, but that's just step one. Changes should be made to a 'while', if you catch my drift. I just don't know howto exactly...
|
|
#4
|
||||
|
||||
|
Have a look at this mod,,it might help you or give you a idea on how to do it..
IbproArcade 2.5.7- Top 25 player |
![]() |
|
|