ich habe eine tabelle in der portal.php der die meisten danke empfangende user seigt.leider sind die namen und zahlen zusam gedruckt.
So sieht das jetzt aus.
[ externes Bild ]
Möchte gern so haben.das die zahlen ganz rechts alle in eine reihe stehen.
[ externes Bild ]
Ich habe bei den Mod macher auch nach hilfe gebeten leider keine antword, bitte kann mir das jemand anpassen.
hier ist der teil das in Portal.php angezeigt wird.
Code: Alles auswählen
//
// Start Top 5 Thanked Users
//
$sql = "SELECT t.thanked_user, u.username
FROM forum_thanksmod t LEFT JOIN " . USERS_TABLE . " u
ON t.thanked_user = u.user_id
WHERE thanked_user <> " . ANONYMOUS . "
ORDER BY thanked_user DESC";
if ( !($result = $db->sql_query($sql)) ) {
message_die(GENERAL_ERROR, 'Could not query users table', '', __LINE__, __FILE__, $sql);
}
$thanked_count = 1;
$old_user_id = 0;
$x = 0;
while ($row = mysql_fetch_array($result)) {
$user_id = $row['thanked_user'];
$username = $row['username'];
$username = color_group_colorize_name($user_id, true);
if ($row['thanked_user'] != $old_user_id) {
$thanked_count = 0;
$x++;
}
$old_user_id = $row['thanked_user'];
$thanked_count++;
$thankslist[$x]['count'] = $thanked_count;
$thankslist[$x]['user_id'] = $user_id;
$thankslist[$x]['username'] = $username;
}
rsort($thankslist);
for ($x = 0; $x < 10; $x++) {
if ($thankslist[$x]['user_id']) {
if ($x >= 1) { $top_5_thanked_users .= "<br /> "; }
// Add user to thanked list
$temp_url = "profile.$phpEx?mode=viewprofile&u=" . $thankslist[$x]['user_id'];
$top_5_thanked_users .= '<a href="' . $temp_url . '">' . $thankslist[$x]['username'] . '</a> (' . $thankslist[$x]['count'] . ')';
}
}
//
// End Top 5 Thanked Users
//