Jump to content

Recommended Posts

Posted (edited)

I'm trying to figure out how to embed iframe based widgets (namely Discord and Youtube Direct Lite) into a post, essentiually.

Specifically the "Rules" section of a particular sub-board, which is essentially a bunch of text (or whatever you put into the editor) that shows up at the top of the sub board.

I've tried adding codemirror to my ckeditor to allow source editing (for admins only of course) and pasting the iframe in source mode.  
That does allow me to paste the iframe in the body of the post, where it shows up as the app itself, exactly as it should in the final post.  
Problem is when I go to post it, nothing shows up except a blank space the size of the app.

I've tried installing the editors iframe dialogue plugin also to no avail.

Does anyone have experience doing this kind of thing successfully, or know how I could do it?

Edited by RobotMonkeyHead
Posted

ACP -> Customization -> (Editor) Settings -> Advanced. Look at the 'Allowed iframe bases' setting.

You don't need codemirror to enable source mode in the editor - you need to allow your group "Can post html?" in the group settings, and then the 'Source' icon appears for you if you are in a forum that allows html to be posted.

Once you see how it works, you can then play around with creating a custom button in the editor to allow people to post links that you can convert to an iframe, all without the need to enable the 'Can post html?' setting.

Posted (edited)

but if you let them do this it will or might have this

When enabled, users in this group will be able to post raw HTML (in areas of your site where it is also enabled). Allowing users to post HTML is extremely dangerous and malicious users can use the feature to damage your site. It is strongly recommended that this feature is not enabled at all, or only for trusted staff groups.

i made this for my forums

MediaTag its from the old version of ipb 3.49

Edited by sweethoney
Posted

If the iFrames need to be only used by admins, then the mentioned method of turning on HTML in posts and allowing the iFrame base is the way to go. 

If the regular members also should be able to add iFrames, then in addition to allowing the iFrame base, you can create a new editor button for the specific external service. You can then safely let users paste a URL or a media ID and the button creates the embedding HTML snippet. 

  • 2 weeks later...
Posted
On 17/12/2016 at 7:02 PM, RobotMonkeyHead said:

Yes, this worked beautifully.  Thank you Nathan.
In this instance it's only admins that need to be able to post html, so this was perfect.

Me too, it work...happy can do that, thank all ......

iframe3.PNG

 

I have a question, 

On 13/12/2016 at 4:53 PM, Nathan Explosion said:

ACP -> Customization -> (Editor) Settings -> Advanced. Look at the 'Allowed iframe bases' setting.

1. Exactly what thing need changed there? In my case I want embed a form of jotform and I did it.........but I do not know what thing i should imput there...

iframe2.PNG

2. Use iframe to embed some external content is a way recommended by your @opentype? how about others ways?

iframe1.PNG

Posted
2 hours ago, Nathan Explosion said:

It tells you in the placeholder and the instruction text.

example.com/embed/ means "any urls that start (ie have a base) with example.com/embed/"

What is the diference with or withou this field fill?

In my case, should be jotform.com/embed"?

Posted (edited)

No idea what it should be for you - what is the url of the items that you are trying to put in the iframes in your content? Does the URL start with http://jotform.com/embed? If so, then yes jotform/embed is what you need to put in there.

What is the difference? Well, without it filled then you won't be able to out foreign URLs in iframes within your content. With it filled you will be able to put foreign URLs in iframes within your content - it's that simple.

Edited by Nathan Explosion
Posted
9 hours ago, kmk said:

Where can I verify the URL?

By looking at the URL, and determining what it (and other urls on that same site) starts with and determining the commonality between them. Then drop the http:// or https:// and BOOM...you've got the entry.

9 hours ago, kmk said:

I have not filled it, but it work....do you know why???

Because you've entered it directly via the source method - works fine, and isn't controlled by that setting. But you're not going to be allowing everyone to use source mode, are you? So then you need to allow people to post certain urls...and that is what the setting is for. You then need to provide them with a method in the editor (ie a custom button) to allow them to use iframes.

 

What exactly are you trying to achieve here, as I've a feeling this is going to go around in circles very soon. The above information has been covered a few times on here, and a search for 'iframe' should pull up any other informaton you need.

  • 3 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...