Another great one Jim! What I would like to see is a way not to sort the discussions at all, that is, leave them in the order that they were created in.
No need for the "letter" menu either, one of my discussions is for podcast episodes, it's annoying when a new post in an old episode/discussion brings it to the top.
Thanks Minisweeper, that did the trick beautifully. Now, to push a point, what if I wanted discussions in only one particular category listed chronologically?
Chronological can be set up to fire only when viewing the category directly-- i.e. CategoryID=x appears in the URL--then when all discussions are lumped together they will bump like normal.
Not sure how this could work with the Discussion Overview discussion list.
Otherwise, you would have to set some kind of trigger to check if the post is in the auto-sink category and set the sink flag.
I would love to use this. However, whenever I install it the site goes blank. The content is still there, but you can't see anything (it's just a white screen). Any idea on why this is occurring? This also means that when I want to deactivate the extension I have to go into conf/extentions.php to delete the entry line for DiscussionSort (through FTP and an HTML editor), because I can't access any aspect of the site (online).
Any help would be appreciated. I really want to use this. Thanks.
There are 2 places in the code that need to be modified to restrict Category selection. Both need to be changed. In the following example, I am not selecting Category 3 and 11: $s = &$DiscussionManager->DelegateParameters['SqlBuilder'];
$s->AddWhere('t', 'CategoryID', '', 3, '<>', 'and');
$s->AddWhere('t', 'CategoryID', '', 11, '<>', 'and');
$s->AddWhere('t','Name','',$x.'%','LIKE');
and $s = &$DiscussionManager->DelegateParameters['SqlBuilder'];
$s->AddWhere('t', 'CategoryID', '', 3, '<>', 'and');
$s->AddWhere('t', 'CategoryID', '', 11, '<>', 'and');
$s->AddOrderBy('Name', 't', 'asc');
You would add as many AddWhere statements as needed to not select other Categories.
If you only wanted Category 3, you would change the <> (not equal) operator to = (and delete the other AddWhere line).
This seems to work when I test it on my forum. I hope it helps.
I followed your instructions, but after that, only the category I chose to be sorted showed on the front page and the header was all screwed. I guess I could fix the problem with the header myself, but the sql thingy... don't know squat about mysql and php
I want the "All Discussions" to show the way it used to and sort discussions alphabetically only on the category's page.
Comments
What I would like to see is a way not to sort the discussions at all, that is, leave them in the order that they were created in.
Posted: Monday, 4 June 2007 at 1:40PM
Thank you, jim
Posted: Monday, 4 June 2007 at 9:33PM
Now, to push a point, what if I wanted discussions in only one particular category listed chronologically?
Posted: Tuesday, 5 June 2007 at 7:42AM
Not sure how this could work with the Discussion Overview discussion list.
Otherwise, you would have to set some kind of trigger to check if the post is in the auto-sink category and set the sink flag.
Any help would be appreciated. I really want to use this. Thanks.
In the following example, I am not selecting Category 3 and 11:
$s = &$DiscussionManager->DelegateParameters['SqlBuilder']; $s->AddWhere('t', 'CategoryID', '', 3, '<>', 'and'); $s->AddWhere('t', 'CategoryID', '', 11, '<>', 'and'); $s->AddWhere('t','Name','',$x.'%','LIKE');
and
$s = &$DiscussionManager->DelegateParameters['SqlBuilder']; $s->AddWhere('t', 'CategoryID', '', 3, '<>', 'and'); $s->AddWhere('t', 'CategoryID', '', 11, '<>', 'and'); $s->AddOrderBy('Name', 't', 'asc');
You would add as many AddWhere statements as needed to not select other Categories.
If you only wanted Category 3, you would change the <> (not equal) operator to = (and delete the other AddWhere line).
This seems to work when I test it on my forum. I hope it helps.
I want the "All Discussions" to show the way it used to and sort discussions alphabetically only on the category's page.