Hi All,
I am wondering if it somehow is possible to autogenerate new topics in WPforo based on a youtube channel?
It could also be picked up via twitter or some other social media.
BR
Hi @vogelsang,
I'm really sorry, but wpForo doesn't have such a feature. You can create a new topic and embed the youtube content in the topic.
I may suggest you use the code below. It'll allow embedding the video from youtube to post content. You'll just need to put the URL in the content:
Put the 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 advanced features please check out wpForo Embeds paid addon:
https://gvectors.com/product/wpforo-embeds/
Here is an instruction on How to Edit Your Theme’s Functions.php File Without Killing Your Site:
https://www.nosegraze.com/edit-functions-php/
Currently, we have plugin customization and custom addon development services at the gVectors Team. They can asses the work and create it for you. Just contact us via sales[at]gvectors.com email address and send a list of requirements you'd like to have.