• [deleted]

malago not working for me sadly. I see this in the log

2021-01-27 22:57:57] flarum.ERROR: RuntimeException: Tag 'IMG' does not exist in /var/www/vhosts/metabullet.com/httpdocs/vendor/s9e/text-formatter/src/Configurator/Collections/TagCollection.php:34

    [deleted] Interesting... do you have the BBCode extension activated?

    Can you post images in your forum with this code?

    [img]https://discuss.flarum.org/assets/logo-y6hlll2o.png[/img]

    I have tried my modified extension in my testing forum and my production forum and it works in both 🤔

      [deleted] Was this extension working before for you? That part of the code is untouched.

      I can add some checks to see if the tag exists, I'll do my own debug with the upload extension. I will let you know when you can update and try again.

        malago using fof/upload
        one of bbcod unsing is : [upl-image-preview url=XXX.jpg]
        worked with the original fancybox 🙂

          Does this allow you to resize uploaded images?

          A big plus if fof formatting add this option (fancybox) for both contents it can manage (images, youtube video, etc)

          But, for now, it's just awesome having this extension working in beta 15. Thx @malago for this

          Amarok I'm glad to see it working!

          So it has to be some other problem if it works for you with the upload extension 🤔

          I didn't have time to debug it yet though...

          Also, if I have more time (I have a lot to learn about Flarum extensions) I can try to improve the extension. I have to see if fancybox can also work with videos, but it might not be possible.

          • [deleted]

          • Edited

          I've created a basic extension for this, where a loop is created over all <img> tags, and data-fancybox is added as an attribute. It is also 100% compatible with fof/upload

          It's clean, and works in my instance. See a demo over at https://metabullet.com

          I will be extending this so that Youtube and other videos can take advantage of the same thing.

          EDIT: Uploaded 🙂

          It's basic, but functional. Further development to follow

          To install

          composer require phenomlab/fancybox

          To update

          composer update phenomlab/fancybox

          To remove

          composer remove phenomlab/fancybox

            [deleted] mmmh, work not very well. After the image was viewed in full, it's disappear (on my installations)

              • [deleted]

              • Edited

              Amarok really ? Can you provide a bit more detail ? I can't replicate that here. Are you using the latest version 0.1.2 ?

              Also, can you give me your forum URL so I can have a look ?

                I see the same behaviour, after viewing the image is no longer displayed in the original post. The issue is related to CSS that gets applied to the image, after viewing in the fancybox the main image gets set to style="display: none"

                • [deleted]

                • Edited

                @ctml @Amarok I've checked the link @Amarok provided in three browsers, and cannot replicate this issue at all. @ctml I also cannot replicate your issue either.

                This extension does not add or alter any CSS - all it does in fact is add data-fancybox as an attribute. Do either of you have the other "fancybox" extension installed and activated ?

                @ctml - can you send me a link please so I can test this ?

                @Amarok - also, I do not even see the data-fancybox attribute being added

                Is the extension enabled ?

                  • [deleted]

                  Amarok Are you using "Login2See" ? I think there is a conflict there.