Hello again Devs,
Is it possible to display the iframe code in the post? No, not as code snippet but as actual iframe code result.
thanks once again in advance :)
I guess, you need to enable HTML BBC tag in editor to do that. Let me warn you, it is not something I would advise for non admin users.
thanks
@Wizard, where exactly can I find that setting so I can enable it.
I am not sure. It must be under BBC settings. That means somewhere in post or topic settings.
@Wizard I found where to enable it. Its under Forum > Posts and topics > BBC. Unfortunately it doesnt work even if its enabled.
I mean the BBC work but for basic HTML markup only. not for iframe.
You need to wrap the iframe in
[html] iframe code here [/html]
tag.
@Wizard its still not working unfortunately.
It should, provided
1. You have enabled use of HTMLin editor
2. You have use the [html] [/html] to wrap the iframe code
Check and confirm if these are met. If still not working, I am not sure why.
You can alternatively see the user group permissions, whether it allow use of html on editor even if you allowed in BBC settings.
The HTML tag was removed from ElkArte since... I think 1.0.1 for security reasons.
Use HTML is a security risk.
There is an addon the restores the HTML tag, but I would suggest to consider explaining why you need to post an iframe and investigate if there are better solutions.
Hi
@emanuele the reason I want to use an iframe on a post is because Im running an educational forum where I give each lessons as a separate posts. There is one lesson (1 post) that I want to display an iframe widget from a third-party site so I can explain it further. I hope we could come up with an addon just for this purpose if its now possible to do so. As always, any ideas on how I can achieve this goal is greatly appreciated.
I too used to think ways to use <iframe></iframe>. Wish they simply uploaded the YouTube video.
For youtube you just have to use the url of the video, no need for iframes.
@emanuele can I use the same principle as the youtube where I will just provide a link and it will be automatically iframes exactly the same iframe code I got from the third-party vendor? Maybe if I could duplicate the same functionality for the youtube so I can create the same functionality for my own use. Is it possible?
You need to give more information about what you're trying to do.
@emanuele @Joshua Dickerson please refer to the attached image. In the left is the iframe code and on the right is the preview. I want to embed that iframe in the post so I can explain what is all about and the user can actually see the live widget and interact on it. Can it be done? many thanks again in advance.
It can be done, but it's a mod. It would be a security issue to allow anyone to add an iframe on your site. So, it would need to be limited to admins. Because of that, it requires a mod... which I don't want to write.
You'll need to look at parse_bbc() in Subs.php and get a pretty good idea of how it all works.
May be an addon to enable only iframe attribute in HTML.
@Joshua Dickerson I know a little bit of php (still a newbie) so if you could point me to the right direction, I could probably take a shot. thanks
You need to either do it in preparsecode() or check it in there and do it in parse_bbc(). It's not a simple mod because it requires permissions to do it. If you are new to PHP/Elkarte, I doubt you have the skills or knowledge to do it right now without a lot of help. Sorry, I don't have time to do this.
First few random questions: any user have to be able to do that? Do you need it on "several" topics, or it's just a "one-topic" thing to explain how to use the calculator?
In one case (i.e. multiple users and/or multiple times) it would be worth write an addon for the specific topic. But if you need it just one time (or very few times) to explain how to use the form, then use the BBC html addon you can find at http://addons.elkarte.net/