Hari changed the title to Embed Discussion in a different page .
Hari changed the title to Embed Discussion in a different page : solved .

I see the issue is solved but just for reference all flarum/flarum-ext-* are old names that have been abandoned. All core extensions use flarum/* names.

Please do not install dev-master versions of Flarum core and extensions unless you are working on pull requests for the extension. We have tagged releases for all extensions, so "*" is the correct version to use.

Hari it's nice like no extra scroll

The embed extension has a similar feature using the iframe-resizer library. You can see the content script of that library is loaded inside of the iframe https://github.com/flarum/embed/blob/master/js/src/forum/index.js#L1 so all you need to do is load the iframe-resizer on your website outside of the iframe so they can talk together and resize the iframe. That being said I tried to use that feature in my Wordpress extension in the past and it doesn't work very well with the infinite scrolling, so I abandoned.

Hari how to restrict embed to my domain only

I think HTTP headers can be used to restrict that. There's the soon obsolete X-Frame-Options https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options and now CSP https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors

    clarkwinkelmann thanks for taking the time and explaining. i've used composer require flarum/embed:"*" to install the embed extension.

    as I feel that the posting interface/user experience on a flarum forum is currently much richer than what we could embed via Javascript.

    in any other embed area, it will open a lot of popups and behaves like a mobile website

    1. will iframe consumes additional system resources/ burden to the system?
    2. how to take the user to discussion directly? I want the user should go to the discussion page even when clicking on the individual comment replay button. (can we just disable the reply button?)
    3. how display comment count?

    can we modify the embed extension & build our own embed look with the above-mentioned features?

      Hari can we modify the embed extension & build our own embed look with the above-mentioned features?

      got it so we can build a custom class for ourselves as per our needs

      Hari can we modify the embed extension & build our own embed look with the above-mentioned features?

      Go for it. Flarum (and its bundled extensions) are MIT Licensed so just make sure you're maintaining attribution as required.

      Understand that Flarum's standards for bundled extensions has to be pretty high, our extensions have to work for general purpose. We do accept PR requests from the public, but the best way to go about it is to start with a discussion here about the scope (plan) of your changes and how you'll accomplish them.

      The best way to go about it is probably to fork the embed extension and create your own version with those changes. Then other people can use them and try them out. It doesn't even have to be for a PR back to Flarum's extension, you're always welcome to build extensions that do the same thing as Flarum features/extensions, that's the guiding principle of our ecosystem.

        You can of course fork the embed extension and customize it to your needs.

        The embed is just a visually simplified discussion page. It uses as much resources as someone browsing the discussion without an iframe.

        I'm not sure if the embed has custom class names, but it does have a custom frontend name that should allow registering some custom CSS files. Using the Frontend Flarum extender with embed frontend name.

          jordanjay29 We do accept PR requests

          Sure 👍

          clarkwinkelmann since you are the expert you can do the best for it. due to covid things are getting delayed here, I will be sponsoring this PR after 2 months


          my wish list

          1. Embed view optimization example
          2. Custom Related Discussions example
          3. YouTube and Twitter comments grabbing example
          4. Instagram Commercial API example
          5. Move post example

            Hari When I say we accept PR requests, I mean that we accept outside contributers submitting PR requests. I'm encouraging you to do this yourself or find a developer who is willing to do the work.

            Our devs may decide to write their own features to submit, but please don't volunteer them for your custom work unless they have already agreed.

            • Hari replied to this.

              jordanjay29 I mean that we accept outside contributors submitting PR requests.

              yes, I do get it, I always wanted to add a brick for such a great tall building (flarum).

              jordanjay29 I'm encouraging you to do this yourself or find a developer who is willing to do the work.

              I'm not a developer but for sure whatever my thoughts are and whoever makes it .. I will take good care to be it an open-source and adds up to the community .. good softwares are not built by one person its cumulative of many peoples effort .. together everything will get better. 🌼

              jordanjay29 Our devs may decide to write their own features to submit, but please don't volunteer them for your custom work unless they have already agreed.

              Sure, I understand will not misuse or pull someone demandingly for my own self-benefits 🙂

              • sorry for bad English
              6 days later

              Hari manage/restrict access of embedding to the self domain.

              All you need do is add this code in ht access file only if you use apache.

              <IfModule mod_headers.c>
              Header set X-Frame-Options "SAMEORIGIN"
              </IfModule>

              Nginx
              add_header X-Frame-Options "SAMEORIGIN" always;
              In nginx you have to add this in conf file server block.

                1Dot are you thinking to optimize embed view ? 😍 Please do it bhai

                And do not include rameshDada name spaces 😂