hallo habe das gemacht aber irgentwie kommt da noch ein fehler.....ich erkläre mal was ich gemacht habe.....
damit ich top votes und bad votes machen kann habe ich erstmal das aus der TOP.PHP kopiert und dadrunter nochmal eingefügt und //badRating genannt.......
// Rating
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field(", u.", "user_name")."
FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id
$cat_match_sql
ORDER BY i.image_rating DESC, i.image_name ASC
LIMIT 50";
$result = $site_db->query($sql);
$top_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
$top_list[$i] = $row;
$i++;
}
$site_db->free_result();
for ($i = 1; $i <= 50; $i++) {
if (isset($top_list[$i])) {
$register_array['image_rating_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
$register_array['image_rating_openwindow_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
if (isset($top_list[$i][$user_table_fields['user_name']]) && $top_list[$i]['user_id'] != GUEST) {
$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $top_list[$i]['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$top_list[$i]['user_id'];
$register_array['image_rating_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".htmlspecialchars($top_list[$i][$user_table_fields['user_name']])."</a>";
}
else {
$register_array['image_rating_user_'.$i] = $lang['userlevel_guest'];
}
$register_array['image_rating_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
$register_array['image_rating_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
}
else {
$register_array['image_rating_'.$i] = "--";
$register_array['image_rating_user_'.$i] = "--";
$register_array['image_rating_cat_'.$i] = "--";
$register_array['image_rating_number_'.$i] = "--";
}
}anschließend habe ich
ORDER BY i.image_rating DESC, i.image_name ASC
in
ORDER BY i.image_rating ASC, i.image_name ASCausgetauscht....dan habe ich noch in der top html die Spalten für BadVoting eingefügt !!!!
Jetzt mein Problem Wenn ich jetzt auf meine homepage gehe und top bilder anklicke haben sowohl die Top Votes als auch die Bad Votes alle 0 bewertungen ??Was muss ich noch ändern ????Außerdem wenn die ersten 30 top bilder kommen fehlt dazauch noch die spalte wo steht Bad Votes wie änder ich das noch ???? Hab noch nen bild mit rangehangen damit ihr seht was ich meine !!!
wischen