habe den Top10user-MOD installiert (okay, "installiert" ist vielleicht zu viel gesagt - war ja keine besondere Leistung von mir...

[Grafik entfernt]
Habt ihr eine Idee, wie ich das anstelle?
Code: Alles auswählen
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');
Code: Alles auswählen
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website');
Code: Alles auswählen
'L_PM' => $lang['Private_Message'],
Code: Alles auswählen
'L_TOPTEN' => $lang['Sort_Top_Ten'],
Code: Alles auswählen
case 'topten':
$order_by = "user_posts $sort_order LIMIT 10";
break;
Code: Alles auswählen
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY $order_by";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
Code: Alles auswählen
$schleife = 'topten';
$weiter = true;
while($weiter)
{
if($schleife == 'topten')
{
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY user_posts DESC LIMIT 10";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users (topten)', '', __LINE__, __FILE__, $sql);
}
}
else
{
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY $order_by";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
}
Code: Alles auswählen
$template->assign_block_vars('memberrow', array(
Code: Alles auswählen
$template->assign_block_vars($schleife, array(
Code: Alles auswählen
while ( $row = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);
}
Code: Alles auswählen
if ($schleife == 'memberrow')
{
$weiter = false;
}
$schleife = 'memberrow';
}
Code: Alles auswählen
<form method="post" action="{S_MODE_ACTION}">
Code: Alles auswählen
<div class="nav" style="width:100%;text-align:center;">
{L_TOPTEN}
</div>
<div style="width:100%;margin:4px;">
<span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span>
</div>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th height="25" class="thCornerL" nowrap="nowrap">#</th>
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
<th class="thTop" nowrap="nowrap"> </th>
<th class="thTop" nowrap="nowrap">{L_FROM}</th>
<th class="thTop" nowrap="nowrap">{L_JOINED}</th>
<th class="thTop" nowrap="nowrap">{L_POSTS}</th>
<th class="thCornerR" nowrap="nowrap">{L_WEBSITE}</th>
</tr>
<!-- BEGIN topten -->
<tr>
<td class="{topten.ROW_CLASS}" align="center"><span class="gen"> {topten.ROW_NUMBER} </span></td>
<td class="{topten.ROW_CLASS}" align="center"><span class="gen"><a href="{topten.U_VIEWPROFILE}" class="gen">{topten.USERNAME}</a></span></td>
<td class="{topten.ROW_CLASS}" align="left" valign="middle">{topten.PM_IMG} {topten.EMAIL_IMG} {topten.ICQ_IMG} {topten.AIM_IMG}
{topten.MSN_IMG} {topten.YIM_IMG}</td>
<td class="{topten.ROW_CLASS}" align="center" valign="middle"><span class="gen">{topten.FROM}</span></td>
<td class="{topten.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{topten.JOINED}</span></td>
<td class="{topten.ROW_CLASS}" align="center" valign="middle"><span class="gen">{topten.POSTS}</span></td>
<td class="{topten.ROW_CLASS}" align="center"> {topten.WWW_IMG} </td>
</tr>
<!-- END topten -->
<tr>
<td class="catBottom" colspan="8" height="28"> </td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="right" valign="top"></td>
</tr>
</table>
<div class="nav" style="width:100%;text-align:center;">
{L_MEMBERLIST}
</div>
Code: Alles auswählen
'ROW_NUMBER' => $i + ( $start + 1 ),
Code: Alles auswählen
'ROW_NUMBER' => ($schleife == 'topten') ? $i + 1 : $i + ( $start + 1 ),
edit: mist dazu wollt ich doch auch noch was sagen: Kein Problemsmart hat geschrieben:Jetzt hast du echt einen gut bei mir!
D A N K E !
Code: Alles auswählen
WHERE user_id <> " . ANONYMOUS . "
Code: Alles auswählen
AND user_id <> 2