Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

DiscussionSort

edited June 2007 in Vanilla 1.0 Help
DiscussionSort

Comments

  • Sounds pretty cool!
  • Is there a demo site where I can see this extension in action?
  • It's now on my site.
  • 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.

    Posted: Monday, 4 June 2007 at 1:40PM

  • So, you would like to see the "letter" menu, but not have the discussions auto-sorted. I could add an option to allow this.
    Thank you, jim
  • The chronological extension leaves them in place. They don't bump, so it effectively sinks every discussion.
  • 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.

    Posted: Monday, 4 June 2007 at 9:33PM

  • Try the chronological extension Wanderer.
  • Thanks Minisweeper, that did the trick beautifully.
    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

  • 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.
  • thanks!
  • 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.
  • Could this be tweaked so that one could choose which categories to sort?
  • I will look into choosing categories.
  • 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.
This discussion has been closed.