Sort by Topic title

Started by ADoomedMarine, September 02, 2004, 03:21:59 AM

Previous topic - Next topic

ADoomedMarine

I know you can sort by subject by clicking the headers on the topic list.. but how do I have it by default for particular forums?

For example I created a forum called Tutorials where I post all tutorials and I want it automatically (by default) sort by topic title and not last post.  I want this for all users and not just me.

Oldiesmann

Currently there isn't an easy way to do this. I'll look into it though and see what I can come up with for you.

ADoomedMarine


NoRad

Do you post a lot of tutorials all the time or is it something where you'll post a dozen and then let it sit for six months? If so, maybe you could just reply to them in the order you want and then lock?

ADoomedMarine

Well I'm allowed replies to the tutorials so it won't work like that unfortunately :(

Grudge

ADM,

You'll have to manually hack this in but it should work. Open MessageIndex.php in the Sources folder, and just before this:

$context['name'] = $board_info['name'];


add this:

if (!isset($_REQUEST['sort']) && in_array($board, array(1,2,3,4)))
{
$_REQUEST['sort'] = 'subject';
}


Where the list of numbers (1,2,3,4) are the board IDs of the boards you want it to use that sort on. You can easily get the ID by browsing to the board you want to sort that way, and it's the number after board= in the URL. I hope this makes sense!
I'm only a half geek really...

NoRad

so you would list your 1,2,3,4 as your board numbers in the order you want them to appear in the new messages list?

So I could have array(17,4,8,10,etc.) ?

Vveb.ws

Quote from: Grudge on September 04, 2004, 06:16:05 PM
ADM,

You'll have to manually hack this in but it should work. Open MessageIndex.php in the Sources folder, and just before this:

$context['name'] = $board_info['name'];


add this:

if (!isset($_REQUEST['sort']) && in_array($board, array(1,2,3,4)))
{
$_REQUEST['sort'] = 'subject';
}


Where the list of numbers (1,2,3,4) are the board IDs of the boards you want it to use that sort on. You can easily get the ID by browsing to the board you want to sort that way, and it's the number after board= in the URL. I hope this makes sense!

:D I very thanks to you !  :D

I insert in file Sources/MessageIndex.php
before line 46 I added line 45
Quote45
    $_REQUEST['sort'] = 'subject';
46
    $context['name'] = $board_info['name'];
It works !! version SMF 1-1-8

I needed that themes sorted by name and not by date, such CONTENT IN BOOK
Quote1
1.1
1.2
1.3
2
2.1
3

;D Thank you  :D !

JBlaze

Glad you got this sorted.

I'll mark this as solved for now, but if you need additional help, feel free to open it back up.
Jason Clemons
Former Team Member 2009 - 2012

Advertisement: