I have a sports forum for sports in and around my city but in the match forum category i would like to just sort that forum category by date from the newest topic to the latest for me and all the users.
You are able to sort by User etc. but i would like to sort it by date created/started for just 2 forum categories.
I hope this could be added/implanted.
Regards RoyalMess.
I'd rather see this implemented as a mod, myself.
Should it suffice to have another column that allows sorting by date started? (so by the first post, not the last post).
in Sources/MessageIndex.php find // Default sort methods.
$sort_methods = array(
'subject' => 'mf.subject',
'starter' => 'IFNULL(memf.real_name, mf.poster_name)',
'last_poster' => 'IFNULL(meml.real_name, ml.poster_name)',
'replies' => 't.num_replies',
'views' => 't.num_views',
'first_post' => 't.id_topic',
'last_post' => 't.id_last_msg'
);
// 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']);
}
replace with // Default sort methods.
$sort_methods = array(
'subject' => 'mf.subject',
'starter' => 'IFNULL(memf.real_name, mf.poster_name)',
'last_poster' => 'IFNULL(meml.real_name, ml.poster_name)',
'replies' => 't.num_replies',
'views' => 't.num_views',
'first_post' => 't.id_topic',
'last_post' => 't.id_last_msg'
);
// They didn't pick one, default to by last post descending.
if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']]))
{
$context['sort_by'] = 'first_post';
$_REQUEST['sort'] = 'id_topic';
$ascending = isset($_REQUEST['asc']);
}
EDIT-just noticed you are using 1.1.11 this is for 2.0 rc2 but I am sure it is almost the same I will look at it tommorrow
Custom Board Sort mod, perhaps? (It's already on the mod site)
Here is the link to that http://custom.simplemachines.org/mods/index.php?mod=382
Quote from: smp420 on February 05, 2010, 12:35:32 PM
Here is the link to that http://custom.simplemachines.org/mods/index.php?mod=382
First Created:
July 09, 2006, 09:28:12 PM
Last Modified:
May 01, 2008, 06:30:40 PM
Latest Version:
1.0.1
Compatible With:
1.1 RC2, 1.1 RC3, 1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.5
It isn't working on my site, SMF 1.1.11
It should still work are you getting any errors when installing.
Quote from: smp420 on February 07, 2010, 07:32:25 PM
It should still work are you getting any errors when installing.
It did install just no option anywhere to change the sort by buttons, and i tried it manual but this whole mod is like outdated for SMF 1.1.11
In the admin panel did you edit a board the options should be there.
Just to confirm that the Custom Board Sort mod works fine on SMF 1.1.11
Whatever the status of this in SMF 2.x, I'd keep it in mind for even further versions... If not to implement in core, then to offer a possibility to sort on anything or add sorting on anything easily.