Author Topic: Order of Comments / Reihenfolge der Kommentare  (Read 3472 times)

0 Members and 1 Guest are viewing this topic.

Offline comeunder

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Order of Comments / Reihenfolge der Kommentare
« on: August 18, 2006, 07:10:28 PM »
Hello,
how can i change the order of the comments under a picture. Currently the oldest comment is the first. What do i have to change so that the newest/last comment is the first one?
Thanks for our help

----------------------------------------

Hallo,
wie kann ich die zeitliche Reihenfolge der Kommentare ändern die unter einem Bild erscheinen. Ich habe zb 50 Kommentare unter einem Bild, aber es kommt immer der älteste am Anfang. Was muss ich ändern, daß der neueste Kommentar zuerst unter dem Bild erscheint?
Vielen Dank

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Order of Comments / Reihenfolge der Kommentare
« Reply #1 on: August 29, 2006, 06:38:50 PM »
try this
open details.php
search for
Code: [Select]
//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------

LINES.......
LINES.......

  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.image_id = $image_id
          ORDER BY c.comment_date ASC";


change
ORDER BY c.comment_date ASC
to
ORDER BY c.comment_date DESC

untested rightnow..

viel spass
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline IWS_steffen

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Kreuzfahrtschiffe gestern und heute
Re: Order of Comments / Reihenfolge der Kommentare
« Reply #2 on: May 25, 2008, 04:39:21 PM »
Hallo Nicky ,

danke für den Tipp.

Gruß Steffen