Author Topic: Top 50 - - - - Flop 50 ????  (Read 5896 times)

0 Members and 1 Guest are viewing this topic.

Offline M1

  • Newbie
  • *
  • Posts: 12
    • View Profile
Top 50 - - - - Flop 50 ????
« on: March 29, 2003, 03:03:27 PM »
Ist es möglich sich was einzubauen, damit die schlechtesten Bilder angezeigt werden? Mütte doch irgendwie in der top.php funktionieren.

Offline slime

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: Top 50 - - - - Flop 50 ????
« Reply #1 on: May 09, 2006, 01:37:31 AM »
hat jemand ne lösung wie man noch die schlechtesten 50 bilder anzeigen kann wäre sehr  hilfreich....würde mich freuen wenn das jemand weiß

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: Top 50 - - - - Flop 50 ????
« Reply #2 on: May 09, 2006, 07:24:38 AM »
was heisst schlecht?
schlechte bewertung - wenig Hits?

gruss
vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: Top 50 - - - - Flop 50 ????
« Reply #3 on: May 09, 2006, 07:51:42 AM »
dann versuche einfach das:
Quote
ORDER BY i.image_rating DESC, i.image_name ASC

durch das auszutauschen:
Code: [Select]
ORDER BY i.image_rating ASC, i.image_name ASC

Offline slime

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: Top 50 - - - - Flop 50 ????
« Reply #4 on: May 10, 2006, 01:39:24 PM »
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&amp;".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 ASC


ausgetauscht....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

Offline slime

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: Top 50 - - - - Flop 50 ???? Noch ein kleiner Fehler
« Reply #5 on: May 13, 2006, 03:33:13 PM »
weiß keiner zu helfen oder versteht Ihr nicht was ich meine ! Please help me !