Archived

This topic is now archived and is closed to further replies.

  • 0

Resolved Responsive Iframe Embeds


Question

Posted · Report post

1.

How do I make an iframe (e.g. video, form, anything in an iframe) embed code responsive? Might there be a shortcode or php code to say "make whatever is in this area responsive"?

2.

(Not 100% related, but a similar question)

I see pl_video at http://demo.pagelin.co.in/framework/tools/ and see examples of Vimeo and YouTube. Are any other providers supported?

Thank you.

Share this post


Link to post
Share on other sites

12 answers to this question

Posted · Report post

I have no idea regarding iFrames, as the technology is older than me and I have never used them. But you could try adding your iFrame within the PageLines Grid, this may make it responsive but I am unsure.

For example:


<div class="row">
<div class="span12">

Add iFrame here

</div>
</div>
[/CODE]

If that doesn't work, I suggest you ask this question on a web design forum.

Share this post


Link to post
Share on other sites

Posted · Report post

The topic was marked as resolved.

Share this post


Link to post
Share on other sites

Posted · Report post

Great idea, but there was no difference in how it worked. I feel like we've considered this in all possible ways for the way the theme is right now so I think you can close this. But I do wish it could resize any iframe proportionately, not just cutting off the width and leaving the height. Thank you.

Share this post


Link to post
Share on other sites

Posted · Report post

similar to http://fitvidsjs.com/ -- I thought that was already in PageLines somewhere... no?

Share this post


Link to post
Share on other sites

Posted · Report post

It should be, but I'm not sure why the functionality is misbehaving on your site. Have you already tried deactivating active plugins?

Share this post


Link to post
Share on other sites

Posted · Report post

if fitvids is in PL, then I'm not sure if it's not acting properly. if fitvids is NOT in PL, then everything regarding iframe resizing is fine (it just covers/cuts off when resizing browser window).

Ultimately, here's what I'm trying to do and it's not working... not really related to resizing iframes, but you can see from this code whether or not you think the iframe video embed code should be triggering fitvid functionality or not...

(Maybe @simon can help here)...

On a brand new PageLines install (no plugins enabled other than the Sections), I created a custom section with this as the code (only this section is enabled on drag-and-drop for the page template): http://paste.pagelines.com/6k2

If I put the pl_raw version in the content box (WYSIWYG/HTML), it works great.

But if I put the pl_raw or non-pl_raw version in the section (notice I've tried both in the code), neither works.

If I try apply_filters('the_content',____) or the do_shortcode() on pl_raw, it doesn't work (nothing's displayed at all). If I do the non-pl_raw version, it displays messed up or not at all (depending on the variation of code, which you can see in the paste).

Can you please test and/or fix for me. How can I get pl_raw to work (is there a way to tell WP that this and only this should be in the_content area and to override or append to whatever's already in there) or how do I get the non-pl_raw version to work?

Thank you.

Share this post


Link to post
Share on other sites

Posted · Report post

  1. You can control the size of the iframe, but the content is usually remote.
  2. pl_video only supports vimeo and youtube.

Share this post


Link to post
Share on other sites

Posted · Report post

How do I control the size of the iframe?

Are you saying I can make the iframe 300x200 but the sourced file could be 500x400 and thus only about half of it is shown and half is cut off?

Share this post


Link to post
Share on other sites

Posted · Report post

You cant control the sourced file as its remote, you can control the size of the frame, and whether to enable scrollbars.

Share this post


Link to post
Share on other sites

Posted · Report post

i understand. but are you talking about within the iframe's actual embed code (iframe height and width tags) or within pagelines (e.g. a shortcode or targeting a css element or something)? I just want to make sure I'm not missing something. Thanks, Simon.

Share this post


Link to post
Share on other sites