Notifications
Clear all

wpForo 1.x.x [Closed] Is it possible to auto generate topics based on new YouTube videos?

2 Posts
2 Users
1 Likes
589 Views
Posts: 4
Topic starter
(@vogelsang)
Active Member
Joined: 7 years ago

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

 

1 Reply
Sofy
Posts: 4310
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

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.