Page 1 of 1

Sort the messages

Posted: Fri Sep 12, 2008 4:23 pm
by sendo
Hello,

I am using Hesk, an I want to know if it is possible to list the last message before all others messages ? Actualy the last message appear at the bottom of the page.

Thank you...

Best regards.

Posted: Sat Sep 13, 2008 10:32 am
by Klemen
Try changing this code in file "print_tickets.inc.php" (inside "inc" folder)

Code: Select all

$sort = hesk_input($_GET['sort']) or $sort='priority';
to

Code: Select all

$sort = hesk_input($_GET['sort']) or $sort='lastchange'; if (!isset($_GET['asc'])) {$_GET['asc']=0;} 

Re:

Posted: Mon Sep 15, 2008 12:16 pm
by sendo
Hello,

Not work... the last response in a discussion appear always at the bottom of the page.

Thanks.

Posted: Mon Sep 15, 2008 7:06 pm
by Klemen
Ah, sorry, misunderstood you. Undo the change I suggested last time and rather edit admin_ticket.php, change

Code: Select all

$sql = "SELECT * FROM `hesk_replies` WHERE `replyto`='$ticket[id]' ORDER BY `id` ASC";
to

Code: Select all

$sql = "SELECT * FROM `hesk_replies` WHERE `replyto`='$ticket[id]' ORDER BY `id` DESC";
and the same in ticket.php

This will make the last message appear second which may confuse some people (it would take quite some more editing to make the original post at the bottom and is out of the scope of my support here). So rather than doing what suggested above you can try with hiding replies like this:
viewtopic.php?t=1466

Posted: Sun Sep 21, 2008 11:17 am
by sendo
Thank you Klemen :D

Best regards...