oEmbed for BuddyPress plugin – out now!
-
You’ll have to register uStream and TED Video as handlers like @levin did
If you know a little code, you can make them both as embed handlers.
Here’s the code WP uses for PollDaddy as a guide:
function wp_embed_handler_polldaddy( $matches, $attr, $url, $rawattr ) {
return apply_filters( 'embed_polldaddy', '<script type="text/javascript" charset="utf8" src="http://s3.polldaddy.com/p/' . esc_attr($matches[1]) . '"></script>', $matches, $attr, $url, $rawattr );
}
wp_embed_register_handler( 'polldaddy', '#http://answers.polldaddy.com/poll/(d+)(.*?)#i', 'wp_embed_handler_polldaddy' );I still have to add WP_Embed support though, which I forgot to do!
—
I forgot to check for WP_Embed handlers that aren’t part of the default oEmbed class.
I’ve just got this working on my sandbox. This will work its way into the new version.
—
Looking at releasing v0.6 sometime next week. Sorry about the delay.
Thank you so much for your effort!! Looking forward on your new version
Sounds good Looking forward to it.
Scenario:
1. User uploads a video to their blog on my wpmu install. (could be subdomain blog or domain mapped blog)
2. Another user sees the video on another users blog and wants to embed it into either their group/forum or activity stream.
Brings up the question:
How do you ‘whitelist’ the wpmu install so that any of my user blogs are ‘pre-approved’ for oembed so the above scenario works?
Try this plugin:
https://wordpress.org/extend/plugins/oembed-provider/
It seems to only work for images though. Contact the plugin author to ask for video support.
You’d also need to add your site to WP’s oEmbed whitelist, read this:
https://codex.wordpress.org/Embeds#How_Can_I_Add_Support_For_More_Websites.3F
@r-a-y – thanks for your help. I don’t feel confident playing around with the code
Can you add uStream and TED to your next version, or is that not feasible?
Thank you.
It’s feasible, but I wouldn’t bundle it with this plugin.
I’ll probably create an “Embed” plugin pack to extend the list of website providers.
Don’t know if I’ll add uStream and TED support to this new plugin pack though.
r-a-y, does this plugin enable embed features on extended profiles, so users can paste, for example youtube videos?
is it possible to ask for support and to add another site in this plugin?
or I have to do it myself?
kind regards
Kris
@socialpreneur
This plugin does not support xprofiles. Not sure if I want to add it.
I still have to post an update to the plugin first, which will allow users to support non-oEmbed sites (you’ll have to write the script to add support yourself… please read the FAQ). This will come in the next day or two.
I’m not really taking requests for sites at the moment, sorry.
This plugin rocks. It does exactly what I needed — and I’ve been looking for a while! Thanks.
Question: My blog is about people uploading their videos, then allowing comments that may or may not include video. (Video Comments)
With Oembed for BuddyPress, the video comments are shown properly in the activity stream, which is really awesome.
However, in the actual comment on the blog post, all I see is the link to the youtube video, for example. It’s not showing the video as embedded within the comments.
Is there a way that I can do this?
I assume I must customize “comments.php” in my theme, but I’m at a loss.
Thanks much for the help and the great plugin!
Todd
A few people have asked for this; this plugin doesn’t work for blog comments.
I’ll be releasing a separate plugin for that late this week as I don’t want to bundle it with the oEmbed BP plugin.
That’s *awesome* news! You rock.
awesome plugin ray. How can I use this with images for smugmug though?
You have to add support for Smugmug to WordPress’ embed provider whitelist yourself.
Smugmug offers oEmbed support so this should be quite easy.
—
You can either add Smugmug support via wp_oembed_add_provider():
https://codex.wordpress.org/Function_Reference/wp_oembed_add_provider
Or if you can’t wait, you can upgrade your copy of /wp-includes/class-oembed.php to the latest trunk version:
https://core.trac.wordpress.org/changeset/13203
As the next version of WP will offer oEmbed support for SmugMug natively.
Thanks I added the truck version to my site but its still not working. Please see my test site here. You will see the link that I am trying to use.
You should be linking to the URL of the SmugMug page and not the JPG.
ahhh ok that worked. What about a way of linking to the original size of the image?
Wrap it around a hyperlink:
<a href="YOUR IMAGE URL">download this awesome image</a>
Ok Ray but what I need is for the smaller image to appear in the activity stream and when a user clicks on it it goes to a bigger size. What am I missing here?
This plugin doesn’t do that.
You could try using MrMaz’s BP-Links plugin.
It’s more robust.
ahhh i see ok. Anyway to build that into it in further releases?
@putnum01 was just gonna suggest the same thing. that would be so ninja (just like this plugin
I’ll look into it; no guarantees though.
- The topic ‘oEmbed for BuddyPress plugin – out now!’ is closed to new replies.
r-a-y
@r-a-y
14 years, 8 months ago
Hey gang,
Here’s the oEmbed plugin that I’ve been working on for BP:
http://wordpress.org/extend/plugins/oembed-for-buddypress/
BP Group: http://buddypress.org/community/groups/oembed-for-buddypress
I’ve only tested this on WPMU 2.9.1.1 and BP 1.2. But it should work on single WP as well. Hope it works for you!
Please list any bugs you come across.
*This plugin would not exist without the coding expertise of Viper007Bond, who created the WP_oEmbed class. Props go out to him first and foremost.