AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Embed YouTube Video

7 Posts
3 Users
0 Reactions
4,071 Views
Posts: 22
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@etrimon)
Eminent Member
Joined: 7 years ago
[#8498]

Hallo wpForo team,

I have a problem with embeding YouTube video to reply/post.

I added this to "Allow extra HTML tags:":

embed(src width height name pluginspage type wmode allowFullScreen allowScriptAccess flashVars), iframe(width height src frameborder allowfullscreen)

but if I put YouTube video into the post, it still gets removed.

Running version 1.6.1

(Tried all possible like deleting cache and such stuff).

Please, can you help me?


6 Replies
Sofy
Posts: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi @etrimon,

Please try the solution mentioned by Robert in this post: 

https://wpforo.com/community/general-discussions/original-wp-embed-function-for-youtube/#post-1875

I'd also suggest you check out wpForo Embeds add-on. The addon allows embedding hundreds of video, social network, audio and photo content providers in forum topics and posts.  More info here:

https://gvectors.com/product/wpforo-embeds/


Posts: 22
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@etrimon)
Eminent Member
Joined: 7 years ago

I am using the media plugin for TinyMCE and it always inserts iframe and I globaly would like to add iframes to the posts (I know, you are again spammers, but please, do not mention this).

I simply just would like to know, how to allow iframe into the post.

Thank you.


Posts: 22
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@etrimon)
Eminent Member
Joined: 7 years ago

The funny thing is, that you allow posting iframe into topic start post, but then in reply you have hardcoded strip_tags to the $args['body'] in "wpForoPost->add" and it is not asking for any options or something like that, but the add topic function does not contain it.


3 Replies
Robert
Admin
(@robert)
Joined: 2 months ago

Support Team
Posts: 10736
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@etrimon,

Please read attentive the code. The strip_tags($args['body']) is only used in if() condition, it just for checking empty content, it's not used for filtering and saving content. If we use it all formatting will be stripped too. So there is no any strip_tags() function for saved content. The content goes through wpforo_kses() function which controls HTML tags and it can exclude iframe if you set it correctly in according option mentioned here: https://wpforo.com/community/wpforo-announcements/wpforo-1-4-8-is-released/#post-16003

Also, the iframe should be embedded using the source text editor, you should click on {;} button and insert it. If you insert iframe in rich editor it'll be converted to non-HTML text.


(@etrimon)
Joined: 7 years ago

Eminent Member
Posts: 22
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Thank you for your answer, but the thing is, if I post just the video, it gets stripped and at this point the post is empty => error thrown.


Sofy
 Sofy
Admin
(@sofy)
Joined: 8 years ago

Support Team
Posts: 5774
Robert
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

Hi @etrimon

This may happen if you insert the only video without any content. Please try to add some symbols and try again. 

We're preparing a new wpForo version this will be fixed. I mean that you'll be able to insert only the iframe without any additional content. 


Share: