Version: 1.00, by Hoffi
Developer Last Online: Mar 2016
Version: 2.2.x
Rating:
Released: 01-27-2002
Last Update: Never
Installs: 17
Is in Beta Stage
No support by the author.
some time ago, i asked if it's possible to enter an extra sorting option for each forum.
a small but Ppowerful hint came up from FireFly, and i build a Hack around it.
I hope it works and you like it.
What it does: it adds new Fileds to every Forum-Properties and you can select, if the Board-defaults were shown when the forum is opend, or you you can say which Row schould be sorted. Ascending or Descending is also selectable.
To build it as much as flexible, I add an Admin-Page, where you can Select some of all Listed Colums existing in the forum-Table. Even new added through Hack. So have only These Colums in your Drop-Down Box.
Part 1 of this Hack is the DaysPruneOverride Hack.
Later i will release all of them in one Big hack.
I hope you like it.
-----
Update:
The SQL ALTER-Command was wrong. Fixed.
-----
Update:
I must be blind and used the wrong table. Fixed.
Demo:
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Wait...doesn't this allow you to change the default sort settings of the threads within a forum? So when they go to the forum it defaults to sorting ASC/DESC ordered by title, posts, views, or whatever you choose?
Yes. It sorts the Threads in the specified Forum. But i don't use any thread-properties. The Threads inside the Forum were sorted like my choose in the CP. eg. Title, ASC.
With my Part 1 of the Hack, to override the User-Settings how old threads should be shown, this is perfect or an archive. Thats why i develop this Hacks.
When all is done, i will release on big Hack named Advanced Forum properties.
I don't understand how you would be ordering threads a certain way by using properties that apply to the forum. It doesn't make sense...threads should be ordered by their own properties - replies, views, titles, starter, last poster, etc...not by the forum's properties. Just one example(because I'm too tired to list them all) - you wouldn't sort threads by the 'allowposting' option
D'oh!
Now I understand you. I must be blind...
Thanks DarkReaper!
It works, because the filed-names in both tables were nearly the same... I Updated the hack. The Changes were small, but now it is better.
Update:
First go to the New Menu. Sort Preselection.
Disable all Columns. (You not disable rows, if you are shure, the they are in both tables the same! e.g. title)
Opel admin/forum.php:
Search for:
PHP Code:
$sortinfos=$DB_site->query("describe forum");
It appears two times, replace both with:
PHP Code:
$sortinfos=$DB_site->query("describe thread");
Now you can reset you Sort Preselection! You will see, that the List is smaller.
I did install as you said and but it seems that ascending doesn't work. it always display in descending order. (note i changed to ASC in my forum properties) pls tell me what should i need to fix.
I haven't tested it with 2.2.6
You can chooser yourself which Table-Fields are Displayed in the Drop-Down Box. I am just not shure if this Date is in one of the Fileds, if yes you can do It by Yourself. Otherwise i must take a look to the DB-Structure.
I got it to work with 2.26.
I had one problem, though - I had to modify forumdisplay.php
Find:
PHP Code:
switch ($sortfield) {
Now, the fields you want to be able to sort on should be added below that line...For example, I wanted to sort on threadid (making the forum display the threads in the order which they were posted), so I added the following line:
PHP Code:
case 'threadid':
I also made a template modification to allow everyone to sort on threadid...I modified this template:
forumdisplay_threadslist