Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Jul 27, 2019 1:36 am
Хотелось бы ставить на форуме для участников видео с ютуба, но не могу найти как это возможно. А так форум удобный, простой в работе, за что спасибо
2 Replies
Jul 27, 2019 8:04 am
Hi @gfy,
Thank you for using wpForo and for contacting us.
Please put this code in the active WordPress theme's functions.php:
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;
}
For more embedding options I recommend wpForo Embeds addon:
Jul 27, 2019 8:39 am
Thanks!