News:

Wondering if this will always be free?  See why free is better.

Main Menu

Message index default to lowest views

Started by Biology Forums, April 27, 2018, 12:22:54 PM

Previous topic - Next topic

Biology Forums

How do I change messageindex.php so that it displays the messages from the lowest views first?

Shambles

MessageIndex.php

Code (find) Select

// They didn't pick one, default to by last post descending.
if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']]))
{
$context['sort_by'] = 'last_post';
$_REQUEST['sort'] = 'id_last_msg';
$ascending = isset($_REQUEST['asc']);
}




Code (replace) Select

// They didn't pick one, default to by lowest view descending.
if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']]))
{
$context['sort_by'] = 'views';
$_REQUEST['sort'] = 'num_views';
$ascending = !isset($_REQUEST['desc']);
}


Advertisement: