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.

Sticky Weight

edited April 2008 in Vanilla 1.0 Help
Is there any way to give stickies different weights depending on who made them sticky. (admin vs. moderator vs. anyone else w/ the capability) so that the ones made sticky by admin are higher than the ones made sticky by mod. (all stickies are still above the other discussions)

Comments

  • Sounds like a good idea but I dont think it's been done so far..
  • sweet or even if you, when making a post sticky, can specify a weight value; and restrict certain weights per role. [that was a really choppy sentence]
  • oh and isn't there an addon that lets the users have their bookmarks act sticky... this addon [the one i'm requesting] should put all the actual stickies above the user stickies (bookmarks), if they check the option of making thir bookmarks act sticky. (if that makes sense at all)
  • *bump
  • sounds really cool ^_^
  • I don't have a lot of time to test this, so maybe someone else can. Get the David add-on and then modify it as follows. Add in the Join and OrderBy statements. Then comment out what is in the "foreach" loop. I think this will sort by role IDs in the default setup. Admin is 4 and unauthorized is 1.

    If you add any other roles or re-order them, this won't work.
    function Sticky_HideFromDiscussions(&$DiscussionManager) { global $CategoryToShow; // this function adjusts the Discussion count $SB = &$DiscussionManager->DelegateParameters['SqlBuilder']; $SB->AddJoin('User', 'us', 'UserID', 't', 'AuthUserID', 'left join'); $SB->AddOrderBy('RoleID', 'us', 'desc'); foreach ( array('0') as $CurrentBlock ) { //$SB->AddWhere('t', 'Sticky', '', 0, '=', 'and'); //$SB->AddWhere('t', 'CategoryID', '', $CategoryToShow, '=', 'or'); } }

    If you want to sort by Role Priority, then you would have to Join the Role table.
  • I have this extension written, but I have to finish testing it out and playing with the CSS. I'm guessing it will be done... some time tomorrow. I'll explain the way it works then.
This discussion has been closed.