cam somone please help me chang this to work with smf 2 i have tried but with no luck i got to the point where i am going to punch the crap out of my pc soon so fault ill ask here hope you can help thanks
wayne
function ArcadeStats_BestPlayers($count = 10)
{
global $db_prefix, $scripturl, $txt;
$res = $smcFunc['db_query']('', '
SELECT count(*) AS champions, IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem.realName, '') AS realName, IFNULL(mem.avatar, '') AS avatar
FROM {$db_prefix}arcade_games AS game
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = game.ID_MEMBER_CHAMPION)
WHERE ID_CHAMPION_SCORE > 0
GROUP BY game.ID_MEMBER_CHAMPION
ORDER BY champions DESC
LIMIT 0',$count", __FILE__, __LINE__);
$top = array();
$max = -1;
while ($score =$smcFunc['db_fetch_assoc']($res))
{
if ($max == -1)
$max = $score['champions'];
$top[] = array(
'name' => $score['realName'],
'avatar' => $score['avatar'],
'link' => !empty($score['realName']) ? '<a href="' . $scripturl . '?action=profile;u=' . $score['ID_MEMBER'] . '">' . $score['realName'] . '</a>' : $txt['arcade_guest'],
'champions' => $score['champions'],
'precent' => ($score['champions'] / $max) * 100,
);
}
if (count($top) == 0)
return false;
elseif ($count > 1)
return $top;
else
return $top[0];
}
$top_player = ArcadeStats_BestPlayers(10);
$i=0; //players position
//array for icons
$poz = array('/first.gif','/second.gif','/third.gif','/fourth.gif','/fifth.gif','/sixth.gif','/seventh.gif','/eigth.gif','/ninth.gif','/tenth.gif');
echo '
<table width="100%" border="0" cellpadding="1">
<tr>
<td class="titlebg" colspan="10"><div align="center"><b>Top 10 Arcade Champions</b></div></td></tr><tr></br></tr><tr>';
foreach ($top_player as $row)
{
echo '
<td><div align="center"><img src="http://waynesworld.kicks-ass.net/forum/Themes/BlackRainv11/images/arc_icons',$poz[$i] , '"/><br/><br/>
<img src="avatars/', $row['avatar'],'"><br/>
',$row['link'],'<br/>
',$row['champions'],' </div></span></td>
';
$i++;
}
echo'</tr><tr></br></tr><tr></br></tr><tr></br></tr><tr></br></tr></table></div>';
edit ok i been fidling a bit more and got this far and get this error
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\*******\htdocs\champs.php on line 18