After a couple of weeks of creating this plugin, I got sometime today to update it for groups and here we have the YouTube feed plugin for Buddypress. Not named much elegantly but I call it “Bp-Youtube Feed” plugin.
Special thanks to Lee, Ben, Chris for the idea/testing of the plugin.
What It does:-
- It allows your users to associate their youtube account with their buddypress profile
- Group admins can associate youtube account with the group
and It will fetch and show the most recent 25 items/videos from the youtube feed.
What features is included:-
- You can force it to be used only for Users
- You can force it to act as group only features
- Group admins can enable/disable the youtube feed plugin for their group.
- and Obviously you can theme it as you want.
How to Use it:-
1. For User profile:-
If the plugin is active, you will see a profile tab named “Youtube”, the very first thing you need to do is associate a youtube account with your profile. To associate a youtube account, please click on Youtube link and then to the settings sun nav. Here is a screenshot.
Once you have entered the youtube use name, Click save, and the account will be associated. Now when you visit the profile, you can see the feed as shown below.
The videos are from youtube’s account, which I used for testing.
2.For groups:-
If the plugin is active for group, when creating a group, on group settings page, you will see the option to enable/disable YouTube feed plugin. Even if you decided to disable it, you can always turn it on(or off) By visiting Your group->Admin->Group settings and checking the box which says enable Youtube feed as shown below.
After you enable it, you will see and option in the admin as “YouTube feed settings” as shown below, you can associate the youtube account here.
Once the Youtube account is associated, you can see the feed in the YoutTube tab of the group nav.
Here is a screenshot.
Download:
Please checkout this plugin here http://buddydev.com/plugins/bp-youtube-feed
Installation:-
- Download the plugin bp-youtube-feed if you have not downloaded yet.
- Unzip it.
- Move the folder “bp-youtube-feed” to wp-content/plugins
- Copy/ move the folder “yt” from bp-youtube-feed to your active theme.
- Login to WordPress dashboard and go to dashboard->Plugins
- Activate the “BP-Youtube Feed”
- That’s it.
Customizations:-
Change the slug:-
Please put the following line in your bp-custom.php
define("BP_YT_SLUG","your-slug");
Disable Bp-Youtube Feed For Users
Please put the following code in your functions.php or bp-custom.php
add_filter("bp_yt_is_enabled_for_members","disable_yt_for_members");
function disable_yt_for_members(){
return false;// default:true which enables the members YouTube Feed By default.
}
Enabling The Youtube feed for Groups:-
By default, the plugin is disabled for group, you can enable it by adding the following line of code to your bp-custom.php or the functions.php
add_filter("bp_yt_is_enabled_for_groups","enable_yt_for_groups");
function enable_yt_for_groups(){
return true;//return false for disabling
}
Localization:
You can generate an mo file from the po file included with the plugin. Move your mo file to bp-youtube-feed/languages directory and rename the file to bp-yt_YourLocal.mo
Well, that’s it for now. I am looking forward to your suggestions for improving the plugin. Please do let me know in comments if you find any problem or want to suggest a feature.
Happy BuddyPressing
Related posts:
- BP Flickr Plugin- Allow your users to show their latest flickr images on their BuddyPress profile
- BP Wire plugin updated
- Buddypress Recent Profile Visitors Plugin
- Introducing BuddyPress Simple Google Map Plugin
- Introducing Facebook Like User Activity Stream(Home activity feed) for BuddyPress Based Social Network

Nice one, Brajesh. It’s looking good
Hi Mercime,
Thanks. I am glad you liked it
I’ve followed the instructions but I only see ‘My Youtube’ under the tab and no ‘settings’ link. Any ideas?
Hi Ross,
If possible, please check using firebug, I guess, It is most probably a css issue.
It’s okay, it was a css issue in my theme! Sorry!
Great plugin by the way!
thanks for this plugin, it is really cool!
I am struggling with the translations.
Ive tried both using filenames:
bp-yt-nb_NO
and
bp-yt_nb_NO
but it wont read em. just stays in english. The translations are correctly made through poedit. Halp? =)
Hi Carl,
Thanks for the comment.
Is your wordpress local set to nb_No.
You should name the mo file “bp-yt_nb_NO.mo” and put it inside the bp-youtube-feed/languages directory.
Please let me know if you have already tried this ?
Hey Brajesh, thanks for quick reply!
yeah my wp-config locale is nb_NO
My filename is bp-yt_nb_NO.mo / .po
It’s really weird that it isnt working… ive cleared my own caches, could it be an sql cache or tough cookie?
Was also wondering, do you know how to embed a youtube video in a user profile field? ive been browsing like crazy trying to find a way.
Oh, and if you want, i can send you the norwegian translation for future releases. If we get it working that is =)
-carl
Hi Carl,
Just checked, yes, there was a small bug left in the loading function causing not to load the language file.
Just editing it, will put online soon(I have also edither the theme file to make it fully translatable now).
Will post here soon and I will appreciate you sending the mo file once we get this running for you
Sweet, will do!
Hey Brajesh,
Great plugin. Every plugin by you adds that one good to have feature.
I am just using this for the groups. What files can i get rid off in the theme “yt” folder.
Thanks.
Hello,
Is it possible to display the user’s favourite videos instead?
How hard would it be to do a friendfeed sync?
When I click the youtube button on my profile I get this error message:
Fatal error: Call to undefined function bp_yt_is_settings() in /home/ab9988/public_html/wp-content/themes/LabSecrets/yt/index.php on line 26
I tried putting the yt folder in my theme as well as the BP Default folder. Neither work.
Please check the forum post I replied. Most probably the plugin was not uploaded completely.
Can we change the number of videos to be something other than 25?
Hi Gwu,
You can lower that limit but can not increase. Youtube public feed(without authentication) does not allow more than 25 items in the feed as far as I remember.
Where is the setting or code to change the number of videos?
I still can’t get this plugin to work. I’ve tried Brajesh suggestion in the forum and I still get this same error message
Fatal error: Call to undefined function bp_yt_is_settings() in /home/ab9988/public_html/wp-content/themes/LabSecrets/yt/index.php on line 26
I activate the plugin, and I get the My Youtube and Setting links, but when i click in any of the links, it just takes me to the homepage…
WHat could be the problem?
Thanks
Hi,
seems you have not moved the “yt” folder from bp-youtube-feed to your current theme. Please move “yt” to your current theme and It will work.
Brajesh,
I am YouTube challenged. The plugin is installed and all seems to working well. I put the my YouTube user name in the settings tab. But it says, “Sorry, there were no items found in the stream.” What exactly is the stream? How do videos get added to the stream?
Sorry in advance for the ignorant question.
Miguel
Hi Miguel,
I am sorry I missed your comment. The stream is the youtube feed for the user. Please check your feed on youtube. If you have a public feed, the videos will be automatically get added to your profile when you visit it.
Hi Brajesh, I’m getting the same problem as Miguel – “Sorry, there were no items found in the stream”.
I’ve checked my YouTube account settings and it all appears to be set up for public viewing, not private. But I’m not that familiar with YouTube so I’m not sure exactly what I should be doing? I have viewed lots of videos and have a playlist and subsciptions on YouTube so there ought to be content?
Your plugins are great, by the way!
Jeremy
Hi,
I have made Japanese Translation, which can be available at http://staff.blog.bng.net/downloads/bp-youtube-feed-1.0.1.zip
When uncompressing the zip, there are some plugin scripts that I fixed in order to call the function “bp_yt_load_textdomain”, because original scripts did not call this function so that language files were ignored.
I hope you will accept and include them for the next version.
Thanks in advance.
Hi Chestnut,
Thanks for the heads up. I will be glad to Include it in the next update. I have got your mail too and will put the credentials there
Also, will make sure to update the plugin to allow text domain loading/naming easily with just LocalName.mo file.
Thanks
Brajesh
Neat Plugin. Most users in my community don’t have YouTube accounts, so I’d like to see the YouTube tab not show up by default in member accounts, instead have it as an option for the member to enable in the “General Settings” area (password reset page). Then it would be useful to those who have a youtube account and not be a wasted tab for thos who don’t.
Cheers
Hi Michael,
A very good Idea indeed. Liked it much. It will be much better to allow users to enable/disable. Will come for sure in the update. I am working on updating almost all plugins this week, so please keep an eye over this plugin. Hope to have an update by weekend.
I’ve installed this plugin on WordPress 3.1.1 running buddyPress 1.2.8. When I click on YouTube Feed Settings, it redirects to the root of the site or home page. Any suggestions you could provide would be fantastic.
Just got a tweet from @buddydev “move the “yt” folder from plugin to your active theme. That should fix it.” It did fix my issue.
Hello..
I’m using the BPMag theme and i get this error when i go to My YouTube:
Warning: _() expects exactly 1 parameter, 2 given in /home/arcticpe/public_html/wp-content/themes/bp-mag/yt/yt.php on line 39
Any idea?
@all,
The issue Rune pointed is fixed in update 1.0.8 of bp-mag. It was related to bp-mag template.
Hi Brajesh,
I am looking for a plugin that would allow users to be able to display user’s youtube video on the sidebar on their profile page (just like they do on tagged). this plugin works nice, but I would like to know if there is a way to modify it as a widget so that I’ll just add the widget and the user can just paste the video link and have it display on the user’s profile page on the sidebar. Do you know of any such plug in?
thank you,
in the feed_link you can put max-results=50, this is the max number of videos one can get.
$feed_link=”http://gdata.youtube.com/feeds/base/users/”.$yt_userid.”/uploads?v=2&alt=json&max-results=50″;
When I enter a username, I don’t think it is saving. When the page refreshes, it always says “Array”. And then it never pulls my videos.
Hi TJ,
There was a change in wp3.x which needs get_usermeta to paszs a third argument as true to retrieve single value. Please test the BuddyPress 1.5 version from here
https://github.com/sbrajesh/bp-youtube-feed
That should fix it.
Installed on BP 1.5
when I click on the youtube tab on my profile I get “Oops! This link appears to be broken.”
I used the bp 1.5 update.
thank you in advance.
Hi Nosoura ,
have you moved the “yt” folder from the plugin to your currently active theme. Please move that and It will work.
I noticed that the pluggin stoppped working under buddypress 1.5. It won’t allow me to save the Youtube account userid
Hi Scott,
Can you please give a try to this version on github?
https://github.com/sbrajesh/bp-youtube-feed
Is that working ?
This did work! So great! Love this script. Just sent you a feature request. See below.
There is a major flaw with this plugin. It seems to be corrupting our DB and causing white pages in our admin. To be sure we wiped out our DB 3 times and every time we installed the plugin the white pages came back.
Interesting update – I wanted to use this plugin so bad that I stayed up all night to figure it out. I must have wiped out the DB and deleted all WP files 6 -7 times before I narrowed it down. BP-Youtube Feed works perfectly with the buddypress default theme. When combined with the theme “Frisco for BuddyPress” I get white pages in the admin and public side.
With that being said, id rather use BP-Youtube Feed if it means not using “Frisco for BuddyPress”. Is anyone successfully using an alternate theme with this plugin?
Feature request. If you could display a specific playlist from a YouTube account rather than all videos on account, that would be amazing.
Looks cool…It would be very nice of u if u create a media plugin like the BP Media which looks good…It actually misses 1` option ie. phototagging…
Hi Brajesh!
Are there any updates due on this plugin?
The embeds don’t have the ‘Full screen” or the “Play on YouTube” links that regular embeds do. Any way to have them?
Ross
Hi Ross,
Thank you for the comment.
That was intentional in the plugin. I wanted to give users a feeling that the videos are just like the normal uploaded videos.
I am noting down your suggestion and will be updating this plugin soon to have that
Thanks for the update Brajesh! GREAT plugin!