WordPress.org

Ready to get started?Download WordPress

Forums

oEmbed in Comments
Suggestion: Add a New Size for Embeds in Comments (6 posts)

  1. Syed Balkhi
    Member
    Posted 1 year ago #

    Hey Evan,

    First of all, I want to say that it's a pretty cool plugin that you created here. I love plugins that work out of the box and have no settings panel.

    In this case, I think adding a small field under Settings > Media for Maximum Comments Embed size would be very helpful.

    The main reason is because most sites use oEmbeds to embed items in the post thus making it full post width. Comments content area usually have less width to begin with. Then you add threading on top of it. This breaks the layout.

    Hope you will consider that request. Thanks :)

    http://wordpress.org/extend/plugins/oembed-in-comments/

  2. Evan Solomon
    Member
    Plugin Author

    Posted 1 year ago #

    Can you give me a link to an example of this happening? I tested it in some threaded comments, but I think I have max width for media set to 100%, so it never overflows its container. If you give me an example, I'm happy to take a look and see if there's a good solution. I also like not having a settings screen and would love to avoid adding one if possible.

  3. kilwag
    Member
    Posted 1 year ago #

    I have the same problem.

    Embed in the parent site's options is set for 640px. (It won't take a percent value)

    Videos embedded in comments are 640pixels wide too, but the comments area is not as wide as the main content so it get's clipped. I tried not setting anything in the settings, and it doesn't seem to have any effect, outside of making my main embeds a little smaller.

    Here's a link with videos in the post content and comments.

    http://features.skateandannoy.com/ebaywatch/ebay-watch-october-2012/

  4. kilwag
    Member
    Posted 1 year ago #

    I realize It might be fixable with the edition of extra stylesheet rules. I'm going to give that a shot.

  5. Evan Solomon
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the link. I'll have to look into this a bit, I'm not sure what the best answer is yet.

  6. Evan Solomon
    Member
    Plugin Author

    Posted 1 year ago #

    As a starting point, you should define a CSS rule along the lines of this:


    iframe {
    max-width: 100%;
    }

    That will limit the width, and you'll end up with embeds that fit your comment area but might look a bit off (the container might be too tall). I think there are 3 possible solutions to that part, each with downsides.

    • I include some JavaScript with the plugin that resizes embeds. Downside is that it's very likely to not work well in some combination of themes/embed sources/etc.
    • Individuals write their own JavaScript to do the resizing. Downside is that more people have to do work. On the other hand, it only has to support one theme.
    • Embeds just end up being a little too tall sometimes and that's okay.

    I'm hesitant to do #1 because I think it might cause more problems than it solves. I'm also not really entertaining the idea of juggling the theme's $content_width setting because the "right" width is very hard to predict based on comment nesting.

    There may be another idea I haven't thought of, but that's what I came up with so far.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.