Skip to:

Plugin: YouTube in bbPress

  • First off, an example can be found here. Download the bbPress YouTube plugin! Now the disclaimer…….

    This plugin will only Key Masters and Administrators to put YouTube videos into posts. Why only those two groups you might ask? Well, because this plugin right now allows ALL embeds and objects out there to be put into your forum posts and I thought this might be a bit much for the general public! This plugin was started by myself and then mdawaffe finished it off for me. Nothing special, but the next version will have the code to only only YouTube videos in an easy way, but for now you need the entire embed code from YouTube, like this:

    <object width="425" height="350"><param name="movie" value=""></param><param name="wmode" value="transparent"></param><embed src="" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>

    If you decide to take out the conditional for adminstrators, do so at your own risk! It is nothing special, but at least will do until we can get a better version!



Viewing 24 replies - 1 through 24 (of 24 total)
  • I have managed to embed all kinds of things! Fun actually!


    So in the next version like:

    <youtube>linktothevideo</youtube> ??

    It will be more like how does it:



    Hey Trent,

    How can I set this so Moderators can also post youtube videos.



    Off the top of my head, change this line:

    if (bb_current_user_can('administrate')) :

    to something like this:

    if (bb_current_user_can('moderate')) :

    That should get it working!


    Beautiful! It works, thanks.

    How does that help integrate youtube into bbPress? That is just a site that now allows its members to integrate youtube into their site. I would recommend just using this one.


    Testing it out here:

    Will come in handy for the site as it grows. Thanks!



    has anyone tried hacking this to limit the types of embeds.. say, make sure it’s only from x-tube/youtube/etc… maybe a url check?

    I second nolageek’s request :)



    Anyone have The link at the top is 404’ing.


    i don’t think it’s just that link the entire plugin database seems to be down. but hopefully back up soon?

    I use this plugin ported from a Vanilla Extension:

    Plugin Name: Video Tags
    Plugin URI:
    Description: Ported from SirNot's HtmlFormatter for Vanilla
    Author URI:
    Version: 0.1

    //allow youtube and google videos to be posted, tags are:
    //<video type="google">docid</video> (google video) -or-
    //<video type="youtube">video id</video> (youtube) -or-

    function video_embed($texto){
    $sReturn = preg_replace_callback(





    return $sReturn;


    function VideoLink($Matches)


    $Type = strtolower(trim($Matches[2]));

    $ID = $Matches[3];



    case ‘google’ : return (‘<embed style=”width: 400px; height: 326px;” id=”VideoPlayback” ‘.

    ‘type=”application/x-shockwave-flash” src=”;.$ID.'”></embed>’);

    case ‘youtube’ : return (‘<object width=”425″ height=”350″><param name=”movie” value=”;.$ID.'”></param>’.

    ‘<embed src=”;.$ID.'” type=”application/x-shockwave-flash” width=”425″ height=”350″></embed>’.


    default : return $Matches[0];



    function allow_video_tags( $tags ) {

    $tags = array(‘type’ => array(‘maxlen’ => 10));

    return $tags;


    add_filter( ‘bb_allowed_tags’, ‘allow_video_tags’ );

    add_filter( ‘post_text’, ‘video_embed’ );



    It allows you to embed video only from YT or Google Video.

    Link doesnt work. 404 error. Anyone have the plugin somewhere else?

    I managed to destroy this one and with a server crash and just haven’t rewrote it yet, but if you head over to that plugin will do the same thing ;)


    Great , Thanks trent

    How to change it to all user can post embed object?



    If you look at the plugin, it’s pretty simple. Line 12:

    if (bb_current_user_can('administrate')

    If you want to allow other users to do everything that this plugin allows, you would need to change ‘administrate’ to whatever permission your users have. I am not going to post exactly how to do it, since I think it could be a potential security hole, but that line right there is the key. Take a look at the plugin and see what I mean.



    The Youtube plugin isn’t available for download anymore? The webpage you posted has changed. Where can I download it?

    Ivaylo Draganov


    I’d suggest using this plugin instead:


    It works for bbPress 0.9.4 (except for the plugin admin page but that’s bearable). It is easy to add other video sources and even modify the RegEx that pulls the link so that videos are embedded with their own tag – [video=the_video_url] for example.



    can you set so only moderators and admin can post the you tube videos in bbpress

    Ivaylo Draganov


    Maybe you can take a look at this plugin:

    I’m not sure if it works on current bbPress versions though.



    This one works great on bbPress 1.02 Easy Video Embed for YouTube and other tube videos



Viewing 24 replies - 1 through 24 (of 24 total)
  • You must be logged in to reply to this topic.
Skip to toolbar