Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Show Announcements first as in 2.0.18 version.

Does anyone know how to show announcements on list first like before 2.1 version? Now the latest topic always show first but before "Announcement" topics where always first and under them the rest of regular topics where sorted from newest to latest. Do you know if this is possible with 2.1 version? Ive checked probably everything and cant find answer on this questions.

Thanks in case!

Tagged:

Comments

  • did you choose "in the category and recent discussions."

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Yes, i did it for all discussion posts. I got "Announcement" badge next to each topic but when someone add any other regular post, it shows always at the top.

  • it looks like it is a slight bug, the setting doesn't stick when selecting that option and posting a new discussion at the same time

    however, if you click on the cogwheel to edit the discussion (announcement) and re-select in the category and recent discussions.

    it should stick and stay at the top,

    give it a try and see if it works.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • You're right man :) It doesnt work from Edit/Start new discussion position. When i choose "in the category and recent discussions." and come back to edit topic, the first box "Dont announce" is checked. So something must be wrong with this section and have no idea why. But as you said, when on posts list i check "Cog" and make it announcement from this section, then it works because all announced topics are on the top. But this is really weird and have no idea why this happen.

    Will be great if you know what can be the reason of that but if not, then of course THANK YOU because you helped me a lot :)

  • when posting a discussion they set the wrong value in the announce column when posting a discussion - it is mistakenly set to 2 when it should be set to 1 in the discussion table.

    editing the discussion and aelecting announce in the category and recent discussions. correctly puts a "1" in the announce column.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Ohh i understand now. Do you know maybe where in forum files this can be changed from 2 to 1 so from posting topic section this will work as well?

  • peregrineperegrine MVP
    edited May 2014

    the postcontroller.php needs the array swapped

    from

         if (C('Vanilla.Categories.Use')) {
                 $Result = array_merge($Result, array(
                    '2' => '@'.sprintf(T('In <b>%s.</b>'), T('the category')),
                    '1' => '@'.sprintf(sprintf(T('In <b>%s</b> and recent discussions.'), T('the category'))),
                 ));
    
    
    to
    
       if (C('Vanilla.Categories.Use')) {
             $Result = array_merge($Result, array(
               '1' => '@'.sprintf(sprintf(T('In <b>%s</b> and recent discussions.'), T('the category'))),
                '2' => '@'.sprintf(T('In <b>%s.</b>'), T('the category')),
    
              ));
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thanks! You are the best! Now everything works fine :)

Sign In or Register to comment.