BP Social Theme: YouTube Embeds in FORUM posts have wrong dimensions...


I upgraded my Buddypress test site http://jazzheavenproducts.com to the latest BuddyPress version 1.5.1 (and also updated the Social Theme to 1.2.9 and the Activity Plus plugin to 1.2.1).

Here (http://codex.buddypress.org/releases/version-1-5/) it mentions this:
"Easier Embeds (http://codex.wordpress.org/Embeds ) with oEmbed support – It’s now super easy to embed videos, images, and other content into the Activity Stream, Forums, and Private Messages."

So, I tried it out in a FORUM POST, the way the suggested it, like so:

"Check out this cool video:


That was a cool video."

BUT... for my site the dimensions are not correct when embedding this; see here:

=> Any idea where to change what to make youtube embeds in FORUM POSTS show correct dimensions?
(With the activity plus plugin, this works perfectly on the Activity Stream Wall... :wink:

Thanks in advance!


PS: As you may notice, on the last link above from my test site, there is also another error message showing after my upgrades:

"Warning: include(/home/jhproduc/public_html/wp-content/themes/bp-social/navigation.php) [function.include]: failed to open stream: No such file or directory in /home/jhproduc/public_html/wp-content/themes/bp-social-child/lib/templates/wp-template/top-bar.php on line 28"

This must be related to my BuddyPress Social Theme (child theme) CUSTOMIZATIONS...
I already sent the person who did that custom work for me an email about it.
In case you have something to mention about that issue as well, I will not say no. :wink:

  • tapswinkler
    • Design Lord, Child of Thor

    Hi James,

    thanks for the pointers!

    No jetpack installed over here...

    Going to the Settings/Media and then changing the MAX HEIGHT in the EMBED section from 600px to 400px changed the HEIGHT in the right direction and removed that crazy height:

    I was just guessing with the 400px, but that seems about right...


    Also, re your other suggestions:
    I went into the PARENT THEME'S functions.php file: and I saw this:


    set_post_thumbnail_size( 200, 150, true ); // Normal post thumbnails
    add_image_size( 'single-post-thumbnail', 650, 9999 ); // Permalink thumbnail size
    add_theme_support( 'menus' ); // new nav menus for wp 3.0
    if ( ! isset( $content_width ) ) $content_width = 900;


    But that's talking about WIDTH, so I am not sure I understand how changing that value of 900px there to 500 (as you suggested) would help me with my HEIGHT issue of the video player.

    Am I missing something?

    Also: would I have to do that in the CHILD THEME, I assume, to make that change for good, and not lose it when I upgrade again?
    If so, honestly, I wouldn't know how to...

    Currently, in the functions.php file of my SOCIAL CHILD THEME it shows only this:


    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 50 );


    Lastly: any thoughts on the PS of my last post (the error message I got after upgrading)?

    Thanks very much!


  • Mason
    • DEV MAN’s Sidekick


    I've asked the theme developer to respond here as well.

    But that's talking about WIDTH, so I am not sure I understand how changing that value of 900px there to 500 (as you suggested) would help me with my HEIGHT issue of the video player.

    Changing the width value should make the height readjust accordingly. Unfortunately, I'm not sure how to do this from within the child theme - I'd test it in the parent theme and see if it works, then we can go forward on making sure you're upgrade proof.

    As the error - it happens because something in your child theme's top-bar.php is looking for a file called navigation.php in the parent theme. There is no such file in the parent theme, so it fails.

    If you could post the top-bar.php to pastebin.com and provide us with a link we ~might~ be able to assist, but if it's too involved you'll have to have the original dev sort it for ya.


  • tapswinkler
    • Design Lord, Child of Thor

    Hello back,

    you were right, :wink:, adjusting the width in the functions.php file of the parent theme from the existing 900px down to 500px DID then also adjust the height! Cool.

    See here now:

    So, 2 questions remain re this:

    1) How can I edit this in the CHILD THEME of the Social Theme, so that I am safe for theme upgrades?
    As said above, in the current CHILD THEME functions.php it only says this right now:


    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 50 );


    2) How can I make it that ALL embedded YouTube videos then appear wiht the same dimensions, no matter if embedded in a FORUM post (like here: http://jazzheavenproducts.com/groups/drum-world/forum/topic/cymbal-talk/?_wpnonce=d1c9741bee#post-7 ) or in the ACTIVITY STREAM, like here:
    => Actually the home page link shows displays both types of youtube videos I just mentioned (from Forum AND Activity Stream) - and you can see the different dimensions...

    3) How can I make sure the aspect ratio of the video player stays intact?
    Does that happen automatically?

    Lastly, re my other issue (error message after upgrading), as seen here:

    You wrote:

    "... As the error - it happens because something in your child theme's top-bar.php is looking for a file called navigation.php in the parent theme. There is no such file in the parent theme, so it fails."

    I checked/compared the newest version of the Social Theme (1.2.9) against the older version (1.2.7) I had before that:
    The OLD version (1.2.7) of the Social Theme Parent Theme DID have a file called "nagivation.php".
    The NEW version (1.2.9) of the Social Theme Parent Theme does NOT.

    So, that probably explains that error message at the top of http://jazzheavenproducts.com ...

    As you requested, here is pastebin.com link of the top-bar.php of the child theme:

    (Originally at http://jazzheavenproducts.com/wp-content/themes/bp-social-child/lib/templates/wp-template/top-bar.php )

    Thanks! I appreciate your support. ***


  • Richie_KS
    • HummingBird

    hi tapswinkler
    best way to make all embed vid had the same dimension would be add this to child css

    /* set your own width and height */
    object, embed { width: 400px; height: 300px; }

    in new buddypress 1.5+, there's no need for navigation.php since all bp component pages ( members, activity, groups..etc) are now controlled by wordpress pages.

    if you have the top-bar.php in child theme..just comment out the navigation like this

    <?php /* include(TEMPLATEPATH . '/lib/templates/wp-template/top-bar.php'); */ ?>


  • tapswinkler
    • Design Lord, Child of Thor

    Thanks for your response, Richie!

    Me no coder... ;(

    I can follow instructions, though!

    Could you (or MasonJames) please specify WHERE EXACTLY to paste the 2 code snippets you gave me?

    For the first one you mean the child's style.css, correct?
    (And just pasting it at the bottom of the doc, right?)

    And for the top-bar.php in the child theme (yes, I have that - see my pastebin.com link above with the exact code I have there; or here again: http://pastebin.com/JxP15GdT ): WHERE EXACTLY should I paste the code you kindly gave me?
    -> I tried pasting it at the bottom, above the last three


    (And with a line of space above & below)

    But that didn't do the trick. (I did clear my cache, too.)

    Thanks so much for your assistance!


  • tapswinkler
    • Design Lord, Child of Thor

    UPDATE: I needed to get this done, and now hired an outside person to fix this error message already.

    If somebody else with the same error message reads this: here is how the guy I hired fixed this now:

    "If you go here:


    Then go to line 27, you will see this:

    <?php /* include( TEMPLATEPATH . '/navigation.php'); */ ?>

    This is the code he was telling you to comment out. All I did was add in "/*" before the code and "*/" after it. Anything in between those two sets of characters (including multiple lines if you want) is commented out and skipped over as if it were never there - you will still see it of course."

    I don't mean to be negative, but, if you don't mind me thinking out loud:

    I pay over $400/year to wpmudev.org, a larger part of which is the attraction of the ability to get support.

    I guess my points being, if you are open to constructive feedback:

    1) I am not a coder (well..., that's why I need support from sites like this one! :wink:, so it would be great if the feedback from the developers (like Richie, the Social Theme dev) would keep that in mind, when giving feedback.
    Apparently, he already delivered "the solution", but I, as a layman, didn't know what to do with it, since it wasn't clear enough for a non-programmer.
    Too bad, since Richie already made the effort of giving me the solution, but I still was in the dark re how to actually implement it.

    2) Would be nice if I got a response quicker than 3 days later, which it is now.
    I am not saying 24 hours. But 2 days would be nice. :wink:

    Was I allowed to say this without being an a**hole? :wink:

    Please don't get me wrong: I DO appreciate the feedback I am getting here.

    Re my other point/question in my last post: I assume I am correct thinking that Richie meant the style.css of the child theme.



  • Richie_KS
    • HummingBird

    hiya falk
    my mistake there..should be commented out navigation.php like
    <?php /* include( TEMPLATEPATH . '/navigation.php'); */ ?>
    and not the top bar
    <?php /* include(TEMPLATEPATH . '/lib/templates/wp-template/top-bar.php'); */ ?>

    yes..in child theme, you should see a child-style.css its renamed from child-style-sample.css


  • Mason
    • DEV MAN’s Sidekick

    Hiya Falk,

    We're continually working on making our internal processes here quicker and more efficient. We've had a huge influx of new members recently and are still working to get things in order. We're hoping to achieve initial responses within an hour and followup in less than 24 hrs. thereafter.

    Thanks for your patience with us and for posting the solution and your feedback here.

  • Mason
    • DEV MAN’s Sidekick

    Hiya @808,

    First off, welcome to WPMU DEV!

    Thanks for chiming in here. This thread is referring to a rather old version of both BuddyPress and the theme. The code has changed dramatically since this time.

    Would you kindly open up a new ticket and explain your issue (I saw a video overlapping in the profile area and I bet we can help get that sorted for you. You can even provide a link back to this thread for reference, but that way we can address your specific need in a brand new area.

    On first glance it seems like the iframe is loading the width which goes outside the area so it may just be a matter of choosing different settings from the embed options from youtube.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.