HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to Embed a Facebook Video on Vanilla forum
How do I embed a video from Facebook onto a Vanilla forum?
0
How do I embed a video from Facebook onto a Vanilla forum?
Comments
@R_Jno replies here also
Adds iframe code to database, but not displaying data.
<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fsandvik%2Fvideos%2F1055493134654052%2F&show_text=0&width=560" width="560" height="315" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe>
There is a method in class.format.php which handles embedding videos:
As you can see, facebook isn't on that list. So there is no setting or something you can do on any other way, I'd say. You will need to write your own custom plugin "FacebookVideoEmbed".
I hate facebook, so I will not be the one who writes such a plugin. But I must confess I have taken a look how it would have to be done.
I think you should use the fireFilter that is in the processHtml method and by copying much of the Vanilla code you end up with something like this:
I am not that much expertise into this, I have found the function in class.format.php , but i m not able to figure out , how to proceed to fix this issue.
kindly help me out on this.
@R_J that embed replacement code is what we have for Advanced Editor posts. Rich editor has a different pipeline and support for more embeds.
This issue was just moved into our planning pipeline, and I think the extendable new Rich embed system (with documentation and examples) will be ready for the 3.1 release.
Another ongoing goal (definitely this year, although the exact month will depend on how successful our hiring is right now. We're hiring a bunch of developers at the moment) is the refactoring & unification of our content rendering pipelines. That would bring some additional configuration options and administration pages.
Like @R_J, mentioned, you'd have to create your own plugin to add support for Facebook embeds by taking the formatted output of discussion/comment bodies and replacing links to Facebook videos with its embed code.
I've actually put together a prototype addon to add support for various video site embeds, but haven't done much with it. I added a base_links_handler and used Gdn_Format::replaceButProtectCodeBlocks(). It was mainly just an experiment of Garden Container's DI where developers can just drop in class files in a folder to add more sites, instead of tightly coupling the embed logic for each site in the addon's main code. This was probably over-engineered, though. 😂
Rather, would the new embed system (EmbedManager) only be for the Rich Editor, or an extension to formatting in general for any format that would provide the ability to add more sites, @charrondev?
Add Pages to Vanilla with the Basic Pages app
@Shadowdare
Rather, would the new embed system (EmbedManager) only be for the Rich Editor, or an extension to formatting in general for any format that would provide the ability to add more sites?
In the next couple of week I'll be finalizing the public API. The actual unification of the text formatting pipelines will be going into planning this week, and likely will be implemented in the next couple of months.
The plan is as follows:
Gdn_Format
with tests.Gdn_Format
and unify our backend rendering into a single pipeline. This means Rich Editor will get the pieces it's missing (trusted domains, and a couple other addons that do HTML processing), and the existing HTML based pipelines will get the new embed system.I'm thinking we'll enable the new system by default with a feature flag, and put out a release note of how to keep using the old embed system if you have some integration there. Step 1 is completed, Step 2 is in progress, and Step 3 is in planning.