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.

Latest Discussions Prime



  • Any idea on how to remove the stickies from the list?

    I was able to do this by modifying the "default.php" file in the Latest Discussions Prime extension directory. I added the following three pieces of code:
    • First, beneath the other dictionary entries near the top of the file:

      $Context->Dictionary['LatestDiscussionsNotIncludeSticky'] = 'Don\'t include Stickied discussions';
    • Second, just beneath the block of code that starts "if ($D->Context->Session->User->Preference('LatestDiscussionsOnlyShowMine'))":

      if ($D->Context->Session->User->Preference('LatestDiscussionsNotIncludeSticky')) {
      $s->AddJoin('Discussion', 'di', 'DiscussionID', 't', 'DiscussionID', 'left join');
      $s->AddWhere('di', 'Sticky', '', '1', '<>');
    • Finally, in the block of code that calls the "Addpreferences":

      $PreferencesForm->AddPreference('LatestDiscussionsPrefs', 'LatestDiscussionsNotIncludeSticky', 'LatestDiscussionsNotIncludeSticky', 0);
    This completely removes sticky discussions from the panel list.

    (NOTE: I'm still looking for a good way for this list to update automatically on a regular basis using AJAX. Any help appreciated.)
  • stickies from the list? I would like to make this the default instead of user selectable? Is that possible? Thanks,
Sign In or Register to comment.