Also dann mal los...
memberlist.php
suchen
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');
ersetzten mit
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');
suchen
danach einfügen
suchen
Code: Alles auswählen
case 'topten':
$order_by = "user_posts $sort_order LIMIT 10";
break;
Das kannst du jetzt einfach löschen oder mit
/* und
*/ auskommentieren.
suchen
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);
}
ersetzten mit
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);
}
}
suchen
ersetzten mit
suchen
Code: Alles auswählen
while ( $row = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);
}
danach einfügen
Code: Alles auswählen
if ($schleife == 'memberrow')
{
$weiter = false;
}
$schleife = 'memberrow';
}
memberlist_body.tpl
suchen
davor einfügen
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>
Sollte funktionieren ..
