tolgaaaltas A few things:

  1. Autoimage only works with a few specific file extensions
  2. This extension simply enables existing formatter plugins, it does not create them
  3. Sometimes changes only apply after saving posts, and other times they don't apply at all 🤷‍♂️ even after clearing the cache multiple times
  4. That exception is not related to formatting, but rather reflar/doorman.

Hello everyone, I am running BETA 9 on PHP 7.3 and I am struggling to get embedded auto reproduction running.
I would like the following to be working:

  • autoimage (for external urls being posted)
  • embedded autovideo
  • embedded autoaudio
    After installing FoF/formatting, the extension appears in bazaar, however, there is no further option for configuration.
    I am unable to find the toggle options posted in this thread!

Where am I supposed to find those options?
There is no tab within the admin dashboard that allows further configuration...

Best regards

    capecarlo You can access the options by clicking on the 3 dots right next to "FoF Formatting" in the Extensions dashboard page. From there, click settings to open the modal that contains the extension settings.

      datitisev
      Thank you for your response.
      I found the gear icon in the admin dashboard that would open the configuration, after clearing the cache it finally worked.
      The 3 dots I found in Bazaar on FoF Formatting would only offer disabling​/uninstalling it.
      I am still working on enabling direct audio urls (e.g.: http://www.largesound.com/ashborytour/sound/brobob.mp3) , but I guess that would require some major extension/plugin

      Hi guys,

      Little question regarding the mediaembed function.
      My forum is full french and Facebook are integrated in english (button, date, translation, etc...)

      Is there any way to simply adapt the language ? according the forum language may be ?

      Thanks for your answers.

        ComUneInfo You'd most likely have to modify the MediaEmbed plugin... we don't code them, just enable them. You can probably edit the embeds, not sure how you'd make every site your locale though.

        It seems that the plugin call an external link to generate the frame content:
        https://s9e.github.io/iframe/2/facebook.min.html#{@type}{@id} (Git) then this page call the us version of Facebook components: //connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5

        I found it in CachedDefinitionCollection.php:

        'facebook'=>[
        	'attributes'=>[],
        	'example'=>[
        		'https://www.facebook.com/FacebookDevelopers/posts/10151471074398553',
        		'https://www.facebook.com/video/video.php?v=10150451523596807',
        		'https://www.facebook.com/photo.php?fbid=10152476416772631',
        		'https://www.facebook.com/ign/videos/10153762113196633/',
        		'https://www.facebook.com/southamptonfc/videos/vb.220396037973624/1357764664236750/'
        	],
        	'extract'=>[
        		'@/(?!(?:apps|developers|graph)\\.)[-\\w.]*facebook\\.com/(?:[/\\w]+/permalink|(?!pages/|groups/).*?)(?:/|fbid=|\\?v=)(?\'id\'\\d+)(?=$|[/?&#])@',
        		'@facebook\\.com/(?\'user\'\\w+)/(?\'type\'post|video)s?/@',
        		'@facebook\\.com/video/(?\'type\'post|video)\\.php@'
        	],
        	'homepage'=>'https://www.facebook.com/',
        	'host'=>['facebook.com'],
        	'iframe'=>[
        		'data-s9e-livepreview-ignore-attrs'=>'style',
        		'onload'=>'var c=new MessageChannel;c.port1.onmessage=function(e){{style.height=e.data+\'px\'}};contentWindow.postMessage(\'s9e:init\',\'https://s9e.github.io\',[c.port2])',
        		'src'=>'https://s9e.github.io/iframe/2/facebook.min.html#{@type}{@id}'
        	],
        	'name'=>'Facebook',
        	'scrape'=>[],
        	'tags'=>['social']
        ],

        The fact is that this page is common for all those who use the plugin, may be i can try to create my own iframe page and change link in CachedDefinitionCollection.php

        The only evolution i can see is to deploy frame pages on the package instead of a public website, it will be more customizable but maybe it's like that for a specific reason i don't know.

          It works.
          I duplicate and hosted my own page with the URL locale modified for fr_FR.

          But it's not clean to modify plugin directly.
          At next update, shazam !

          I'm not developper, so i have questions:

          • How to make it adaptive ? A new option on the plugin ?
          • Value in db is stored in short format (fr), facebook must be called in full locale format (fr_FR), how to deal with that ?
          • Moving public pages as local pages with a generic way to define locale values on call ? Good solution ? Performance ?

          All this is just a reflexion not a request 🙂
          Did someone had the same need ?

            ComUneInfo You are the first person to have requested this, I doubt you are the only one that needs this though. Issue with this is that to make it extensible, the extension would extremely increase in complexity, so it is probably best that a different extension is made to extend MediaEmbed.

              ComUneInfo The code you have to modify is in a separate web page so whatever you do you'd have to host your own copy of the page to do it.

              ComUneInfo The only evolution i can see is to deploy frame pages on the package instead of a public website, it will be more customizable but maybe it's like that for a specific reason i don't know.

              As the author/maintainer of the library/pages involved I can give you the real reasons:

              1. It's infinitely easier both for me and for the library's consumers to have those pages hosted somewhere public rather than bundled with the library as some sort of HTML assets.
              2. Hosting the iframes on a different domain than the page that displays them makes them act as a sandbox. The third party JavaScript that gets embedded on the s9e.github.io domain cannot interact with your page.

              Anyway, I've just updated the Facebook iframe on GitHub to add some support for locales. If your browser announces that it prefers pages in French then the Facebook interface should appear in French. It should be noted that it may not work for all languages because there's a difference between the browser's configuration and the kind of value Facebook expects but it should work for most. Otherwise, it should default to en_US. For now I consider this feature experimental but if nobody reports any issues then it'll become permanent.

                JoshyPHP Thanks, i was sure there is reason for, your explaination is pretty clear.
                I also have to thanks you again for this update.

                I spend few minutes after reading your post to get back the s9e extension back to normal and test it (so excited).
                On my side and as expected it works for French language, hoping other languages to be tested with this result.

                This little update is a great thing to get flarum ans your plugin usable in most of languages and be more popular.

                Great job, thanks again for this !

                4 days later

                Hi,

                I installed it by unfortunatelly Youtube link videos are not embedded ?!

                  ProgWeb Admin area > Extensions > FoF Formatting (hover) > Click three dots > Settings > Enable what you want (for YouTube and other sites MediaEmbed) > Save > Control Panel > Clear cache

                    Thanks all !

                    I tought it will detect automatically youtube links and then show the video, but finally I have to use MEDIA BBCODE in order to show the video.

                    It will be nice if the detection is automatic.

                    Thanks again