Verfasst: 26.10.2006 14:43
ok hab nur gedacht, dass du nicht nach dem thread suche musst.
so ist es natürlich wirklich besser hast schon recht!
so ist es natürlich wirklich besser hast schon recht!
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
$tile_object='<p align="center"><a href="' . $tile_url . '" onClick="' . $on_click . '; return false;" style="text-decoration: none"><font size="5" color="black">' . $tile[$tile_key] . '</font></a></p>';
Code: Alles auswählen
$tile_object='<p align="center"><b><font size="5" color="orange">' . $tile[$tile_key] . '</font></b></p>';
Code: Alles auswählen
$tile_object='<p align="center"><b><font size="5">' . $tile[$tile_key] . '</font></b></p>';
Code: Alles auswählen
$tile_object='<p align="center"><b><font size="5" color="cyan">' . $tile[$tile_key] . '</font></b></p>';
Code: Alles auswählen
$template->assign_block_vars('leaderboard', array(
Code: Alles auswählen
$row_color = ( !($x % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($x % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
Code: Alles auswählen
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> {FULL_LEADERBOARD}</td>
</tr>
<tr>
<td><span class="nav">{BACK}</span></td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="0" border="0" class="forumline">
<tr>
<th height="25" class="thCornerL" nowrap="nowrap" align="center">#</th>
<th class="thTop" nowrap="nowrap" align="center">{USERNAME}</th>
<th class="thTop" nowrap="nowrap" align="center">{LEAD_PLAYED}</th>
<th class="thTop" nowrap="nowrap" align="center">{LEAD_POINTS}</th>
<th class="thTop" nowrap="nowrap" align="center">{LEAD_AVERAGE}</th>
<th class="thTop" nowrap="nowrap" align="center">{LEAD_CURRENT_GAME}</th>
</tr>
<!-- BEGIN leaderboard -->
<tr>
<td class="{leaderboard.ROW_CLASS}" align="center" valign="middle"><span class="gen">{leaderboard.POS}</span></td>
<td class="{leaderboard.ROW_CLASS}" align="left" valign="middle"><span class="gen">{leaderboard.USERNAME}</span></td>
<td class="{leaderboard.ROW_CLASS}" align="center" valign="middle"><span class="gen">{leaderboard.PLAYED}</span></td>
<td class="{leaderboard.ROW_CLASS}" align="center" valign="middle"><span class="gen">{leaderboard.POINTS}</span></td>
<td class="{leaderboard.ROW_CLASS}" align="center" valign="middle"><span class="gen">{leaderboard.AVERAGE}</span></td>
<td class="{leaderboard.ROW_CLASS}" align="center" valign="middle"><span class="gen">{leaderboard.CURRENT_GAME}</span></td>
</tr>
<!-- END leaderboard -->
</table>
Code: Alles auswählen
$tile_object='<p align="center"><a href="' . $tile_url . '" onClick="' . $on_click . '; return false;" style="font-size: 26px; color: white;">' . $tile[$tile_key] . '</a></p>';
Code: Alles auswählen
$tile_object='<p align="center" style="font-size: 26px; color:cyan; font-weight:bold;">' . $tile[$tile_key] . '</p>';
Code: Alles auswählen
$tile_object='<p align="center" style="font-size: 26px; color: orange; font-weight:bold;">' . $tile[$tile_key] . '</p>';
Code: Alles auswählen
// START LEADERBOARD MOD
if ( $mode == 'leaderboard' )
{
// grab full leaderboard
$sql=" SELECT * FROM " . SUDOKU_STATS . "
ORDER BY points DESC
";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error in retrieving Sudoku userdata', '', __LINE__, __FILE__, $sql);
}
$x=1;
while ( $row=$db->sql_fetchrow($result) )
{
$stat_points=$row['points'];
$stat_played=$row['played'];
$stat_userid=$row['user_id'];
$sql_b=" SELECT username FROM " . USERS_TABLE . "
WHERE user_id=" . $row['user_id'];
if ( !($result_b = $db->sql_query($sql_b)) )
{
message_die(GENERAL_ERROR, 'Error in retrieving Sudoku userdata', '', __LINE__, __FILE__, $sql_b);
}
$row_b=$db->sql_fetchrow($result_b);
$stat_username=$row_b['username'];
// grab current game
$sql_b=" SELECT game_pack, game_num FROM " . SUDOKU_USERS . "
WHERE user_id=" . $row['user_id'] . "
ORDER BY game_pack DESC, game_num DESC
LIMIT 1
";
if ( !($result_b = $db->sql_query($sql_b)) )
{
message_die(GENERAL_ERROR, 'Error in retrieving Sudoku userdata', '', __LINE__, __FILE__, $sql_b);
}
$row_b=$db->sql_fetchrow($result_b);
$stat_gamepack=$row_b['game_pack'];
$stat_gamenum=$row_b['game_num'];
$stat_avg = !$stat_played || !$stat_points ? 0 : round($stat_points / $stat_played, 0);
// send to template
$template->set_filenames(array(
'body' => 'sudokuleaders.tpl')
);