1.0.1

Installation
composer require fof/best-answer:"*"
php flarum cache:clear
23 days later
6 days later
7 days later
  • [deleted]

I'm able to replicate this same issue. Seems it's a bug as permissions are set correctly.

  • IanM replied to this.

    Thanks 👍 for this good extension but I missed a one thing from discourse that when we set a best answer after no. of maximum characters is reached it's automatically collapsed but in this extension it's showing the full answer, also I would like to request one more feature that maybe this extension can add schema seo tags that accepted answer tag, so that our site will show in featured snippet of Google. 😁

    • ctml replied to this.

      Header_Footer when we set a best answer after no. of maximum characters is reached it's automatically collapsed but in this extension it's showing the full answer

      Although it's not necessarily the best solution you can use some CSS to set the max height that will restrict the size of the best answer.

      Header_Footer maybe this extension can add schema seo tags that accepted answer tag

      I believe the dedicated SEO extension has support for this, have a look and see if it covers your needs.

      https://discuss.flarum.org/d/18316-flarum-seo

        ctml Although it's not necessarily the best solution you can use some CSS to set the max height that will restrict the size of the best answer.

        Hello, Ctml I tried this but its not so optimized I mean its not so smooth like discourse.

        ctml I believe the dedicated SEO extension has support for this, have a look and see if it covers your needs.

        As you said I tried that extension its amazing but do you know it mentioned that schema tag feature but in reality its not added, I checked the page source, I even cleared cache and even tried on fresh flarum install.

        • ctml replied to this.

          Header_Footer Hello, Ctml I tried this but its not so optimized I mean its not so smooth like discourse.

          There are some limitations but here is one option to limit the height and show some text like "Read the full post...". However there is no logic for shorter posts so it will still appear, but it may not matter to you. Obviously I think it could be more polished if the extension handled it all, but as far as CSS only solution I think it might be the best we can do. Screenshots for both scenarios attached.

          .item-bestAnswerPost .CommentPost{
              padding-bottom: 10px;
          }
          .item-bestAnswerPost .Post-body{
              max-height: 250px;
              margin-bottom: 10px;
          }
          .item-bestAnswerPost .CommentPost:after{
              content: "See the full post ...";
              cursor: pointer;
          }

          Header_Footer As you said I tried that extension its amazing but do you know it mentioned that schema tag feature but in reality its not added, I checked the page source, I even cleared cache and even tried on fresh flarum install.

          Ah ok sorry - my bad. Maybe you could also request that feature in the dedicated SEO extension? To be honest I am not sure which extension would be preferred to implement.

          16 days later

          oops inside the extension Disposable email , discuss link, brought me to this topic

            Braden thanks, I have fixed it on the master branch. I'm not sure if it's worth publishing a patch just for that, but it'll ship with the next update in any case 👍

            KakaLVPOT I don't think there's any weight of priority. Anyone authorized to change the best answer can do so at any time. If an admin set a best answer, the user can still choose another and it will be replaced.

            You can see some screenshots in the first post. You can scroll right in the screenshots to see more images. The best answer is shown in a green box below the OP. You can also see this in action on this very forum because the extension is enabled here.

            @IanM Hello, any possibility to get this integrated with the Gamification extension, so users can earn points also for the best answer? Thank you!

            11 days later
            • [deleted]

            Has there been a recent update to this extension ? I see version 1.1.0, but when issuing php flarum migrate the following error is displayed

            Migrated: 2021_08_09_add_qna_column_to_tags_table
            Migrated: 2021_08_10_add_reminders_column_to_tags_table
            PHP Fatal error:  Uncaught Error: Attempt to assign property "is_qna" on null in /home/metabullet/flarum/vendor/fof/best-answer/migrations/2021_08_15_migrate_reminder_settings.php:28
            Stack trace:
            #0 [internal function]: Illuminate\Filesystem\Filesystem::{closure}()
            #1 /home/metabullet/flarum/vendor/flarum/core/src/Database/Migrator.php(202): call_user_func()
            #2 /home/metabullet/flarum/vendor/flarum/core/src/Database/Migrator.php(133): Flarum\Database\Migrator->runClosureMigration()
            #3 /home/metabullet/flarum/vendor/flarum/core/src/Database/Migrator.php(116): Flarum\Database\Migrator->runUp()
            #4 /home/metabullet/flarum/vendor/flarum/core/src/Database/Migrator.php(90): Flarum\Database\Migrator->runMigrationList()
            #5 /home/metabullet/flarum/vendor/flarum/core/src/Extension/Extension.php(482): Flarum\Database\Migrator->run()
            #6 /home/metabullet/flarum/vendor/flarum/core/src/Extension/ExtensionManager.php(311): Flarum\Extension\Extension->migrate()
            #7 /home/metabullet/flarum/vendor/flarum/core/src/Database/Console/MigrateCommand.php(86): Flarum\Extension\ExtensionManager->migrate()
            #8 /home/metabullet/flarum/vendor/flarum/core/src/Database/Console/MigrateCommand.php(63): Flarum\Database\Console\MigrateCommand->upgrade()
            #9 /home/metabullet/flarum/vendor/flarum/core/src/Console/AbstractCommand.php(37): Flarum\Database\Console\MigrateCommand->fire()
            #10 /home/metabullet/flarum/vendor/symfony/console/Command/Command.php(299): Flarum\Console\AbstractCommand->execute()
            #11 /home/metabullet/flarum/vendor/symfony/console/Application.php(996): Symfony\Component\Console\Command\Command->run()
            #12 /home/metabullet/flarum/vendor/symfony/console/Application.php(295): Symfony\Component\Console\Application->doRunCommand()
            #13 /home/metabullet/flarum/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun()
            #14 /home/metabullet/flarum/vendor/flarum/core/src/Console/Server.php(42): Symfony\Component\Console\Application->run()
            #15 /home/metabullet/flarum/flarum(24): Flarum\Console\Server->listen()
            #16 {main}
              thrown in /home/metabullet/flarum/vendor/fof/best-answer/migrations/2021_08_15_migrate_reminder_settings.php on line 28

            Any thoughts ?

            Will need to roll back for the time being.

              • [deleted]

              IanM Done ! Thanks