News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Board Sort Methods

Started by drhamad, March 12, 2009, 12:20:23 PM

Previous topic - Next topic

drhamad

Link to Mod

This modification is based on Custom Board Sort by JThor/akabugseyes, which is not compatible with SMF2.  All original credit for the code goes to him.

By default, SMF sorts threads in boards by the date & time of the last post made.  This modification allows the administrator to set up new possibilities for sort methods, on a board by board basis:

- Last post - default
- Started by
- Replies
- Views
- First post
- Subject

Each can also be sorted in ascending or descending order.

These settings by the administrator are default only.  Users can change them on a time-by-time basis.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

shadow82x

Thanks for updating this. :) Nice mod.
Colin B
Former Spammer, Customize, & Support Team Member

lluks

#2
Thank you soooo much drhamad for updating this. You have no idea how much this will help me with my forum.

Thank you, thank you, thank you!

And thank you again.

:)

Senalaya

Really nice, but a few issues with the current version:

- Install check fails. It seems that the first modification to the /sources/ManageBoards.php is supposed to be an 'add after' rather than the current 'add before'.

After manually fixing the above:
- In the admin's 'manage boards', only '(overall default)' is displayed, no other sort method can be selected.

drhamad

Quote from: Senalaya on March 16, 2009, 12:38:35 AM
Really nice, but a few issues with the current version:

- Install check fails. It seems that the first modification to the /sources/ManageBoards.php is supposed to be an 'add after' rather than the current 'add before'.

After manually fixing the above:
- In the admin's 'manage boards', only '(overall default)' is displayed, no other sort method can be selected.

Which .tar.gz did you download, BoardSortMethods.tar.gz or BoardSortMethods2-0.tar.gz?  Those problems sound like a pre-release version that was accidentally put up.  You should have the "2-0" file.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

lluks

#5
Quote from: Senalaya on March 16, 2009, 12:38:35 AM
Really nice, but a few issues with the current version:

- Install check fails. It seems that the first modification to the /sources/ManageBoards.php is supposed to be an 'add after' rather than the current 'add before'.

After manually fixing the above:
- In the admin's 'manage boards', only '(overall default)' is displayed, no other sort method can be selected.

I too get the same error...
redownloaded the latest and still no go

drhamad

The first problem reported by Senalaya is correct - that was reversed somehow.  I'll update the mod today sometime.

I have seen the second problem, I can't remember what I did to fix it.  I'll have to do some testing.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

webking

May be the ManageBoards.Template.php file seems to have missing items?

Nothing works at this moment. I even tried to manually edit the files.
http://www.internetvps.com - #1 Virtual Private Server Provider!

drhamad

OK I have a feeling I uploaded the wrong version of the file or something.  I'm working on it right now and hope to have the problem resolved shortly.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

drhamad

OK I've fixed one of the two problems (I haven't updated the file online yet).  Working on the second now.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

drhamad

BSM 2.0.1 is now available, and fixes all reported bugs to date.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

webking

Thank you a lot! This helps a lot of folks.

I didn't understand why SMF never thought of this. This is standard on all other forum software. It is one of most useful options for the forum to be organized and well-structured.

Final thoughts:

DrHamad is a life saver! Good things will come to you!
http://www.internetvps.com - #1 Virtual Private Server Provider!

drhamad

Yeah this and the ability to make membergroups moderators of boards should be core to SMF, in my opinion, as it is in much other software.  But oh well, tis not I who makes that decision.  I just wish someone would make a mod for that second thing I want ;)

Let me know if there's any further problems.  I've been running this on my own site for well over a month now, but I don't use the packaged version, so there's differences that I don't realize sometimes.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

Marcus Forsberg

Nice mod :)

Swedish translation:

// Board Sort Methods v2.0 by drhamad, based on Custom Board Sort v1.0.1 by akabugeyes
$txt['first_post'] = 'Första inlägget';
$txt['last_post'] = 'Senaste inlägget';
$txt['startedby'] = 'Författare';
$txt['subject'] = 'Ämne';
$txt['views'] = 'Visningar';
$txt['replies'] = 'Svar';
$txt['asc'] = 'Stigande';
$txt['desc'] = 'Sjunkande';
$txt['asc_full'] = 'Stigande';
$txt['desc_full'] = 'Sjunkande';
$txt['sort_desc'] = 'Här kan du ändra sortering och ordning för denna tavla. Ange standardsortering för att låta tavlan använda standardsortering.';
$txt['sort_title'] = 'Standardsortering';
// End BSM2.0


Senalaya

Thank you, drhamad!

Just installed it again and checked it - works like a charm. :)

Wow, that was a really fast response.

Jesuz

I'm a newbie here. I did installed the Mod but I couldn't find where to set up the sorting. I'm using Babylon Theme.
Thank you

drhamad

Quote from: Jesuz on April 07, 2009, 04:36:47 AM
I'm a newbie here. I did installed the Mod but I couldn't find where to set up the sorting. I'm using Babylon Theme.
Thank you

If you aren't using the default theme you'll probably have to hand-code the ManageBoards.template.php portion.  I don't know, I haven't looked at it at all.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

ɔɔɔɔɔɔuɥoɾ

Very nice mod thanks, with 2 manual edits, working 100% :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

n-joy

How can I let it work in the overview light theme?

Groundhog

drhamad

This is just what I needed. Many thanks as I have a board that has to keep the messages in the order that they were created but I had to edit some of the messages which messed up the default order. Using this mod worked a treat.

However the latest mod: BoardSortMethods_2-0-1.tar.gz broke my board. It was caused by a a missing coma at the end of a line:

<add><![CDATA[ // Board Sort Methods v2.0 by drhamad, based on Custom Board Sort v1.0.1 by akabugeyes
'sort_method' => $row['sort_method'],
'sort_order' => $row['sort_order']
]]></add>


should be >

<add><![CDATA[ // Board Sort Methods v2.0 by drhamad, based on Custom Board Sort v1.0.1 by akabugeyes
'sort_method' => $row['sort_method'],
'sort_order' => $row['sort_order'],
]]></add>


I don't know if this only effected me as I don't see any other messages saying that this caused any problems for anyone else  ???

Anyway Thanks again for the mod  8)

Advertisement: