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] help

5 Posts
3 Users
1 Reactions
1,639 Views
Posts: 81
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
(@sergido)
Estimable Member
Joined: 7 years ago
[#23189]

there is some way that the "HTML" can be put in the threads since I see that it does not appear in the themes, and it would be good if it came out.


4 Replies
Robert
Posts: 10736
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
(@robert)
Support Team
Joined: 2 months ago

@sergido,

Yes, you can put HTML using the {;} button, which opens the source code of your post.

 


Posts: 81
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
(@sergido)
Estimable Member
Joined: 7 years ago

@robert

i try to try to upload youtube videos with html as you mention, and it doesn't work

 

For example, if I want to upload this video: (does not upload it in the thread)

<iframe width="1189" height="669" src="https://www.youtube.com/embed/9rYfVDawF-w" title="COMO APRENDÍ A QUERERME/ Desirée Vila" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


dimalifragis
Posts: 2600
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
(@dimalifragis)
Famed Member
Joined: 6 years ago

Add this code to your theme's functions end or use

https://wordpress.org/plugins/code-snippets/ to add it (you decide)

Then just paste the url of youtube video in a post.

 

add_filter('wpforo_content_after', 'wpforo_custom_video_embed', 10);
function wpforo_custom_video_embed( $content ){
    $paterns = array();
    $paterns[] = "/<a[^><]+>\s*[a-zA-Z\/\/:\.]*youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i";
    $paterns[] = "/<a[^><]+>\s*[a-zA-Z\/\/:\.]*youtu.be\/([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i";
    $content = preg_replace($paterns, "<iframe width=\"420\" height=\"280\" src=\"//www.youtube.com/embed/$1\" frameborder=\"0\" allowfullscreen></iframe>", $content);
    return $content;
}

And PLEASE use some DESCRIBING Titles when you ask for Help. HELP means nothing.


Robert
Posts: 10736
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
(@robert)
Support Team
Joined: 2 months ago
Posted by: @sergido

For example, if I want to upload this video: (does not upload it in the thread)

<iframe width="1189" height="669" src="https://www.youtube.com/embed/9rYfVDawF-w" title="COMO APRENDÍ A QUERERME/ Desirée Vila" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Inserting iframes to post content is the most terrible and unsecure thing that is fully forbidden. You should insert the YouTube link and see the iframe automatically. So just use the code above or purchase wpForo Embeds addon to turn URLs to video players and content widgets.


Share: