PDA

View Full Version : How do I keep messages from moving back to the top.


remlle
02-11-2005, 11:16 AM
I Want to stop the threads from jumping to the top when a comment is made on them. anyone know how to keep this from happen???
If a thread is created now. then another one after that so you have
thread 1
thread 2

then somone comments on threat 2 it goes to the top so it becomes

thread 2
thread 1
and so on
I want the threads to be displayed in the order they are created not replied to or updated
when people view the threads and someone replies to an older thread it becomes top of the list no matter what becaue it has been updated. I don want that

anyone have any ideas. I know there is a line in the forumdisplay.php file but I dont remember which one.

anyone have any ideas?

mothman
02-13-2005, 11:24 PM
Hi,

I wanted to change that to, and did it like this :

in forumdisplay.php at line 532 you will find this :

case 'title':
$sqlsortfield = 'thread.title';
break;
case 'lastpost':
case 'replycount':
case 'views':
case 'postusername':
$sqlsortfield = $sortfield;
break;
case 'voteavg':
if ($foruminfo['allowratings'])
{
$sqlsortfield = 'voteavg';
break;
} // else, use last post
default:
$sqlsortfield = 'lastpost';
$sortfield = 'lastpost';

I changed it to this :

case 'title':
$sqlsortfield = 'thread.title';
break;
case 'lastpost':
case 'replycount':
case 'views':
case 'postusername':
$sqlsortfield = $sortfield;
break;
case 'voteavg':
if ($foruminfo['allowratings'])
{
$sqlsortfield = 'voteavg';
break;
} // else, use last post
default:
$sqlsortfield = 'threadid';
$sortfield = 'threadid';

The last 2 lines changed

and it worked.

Cheers.