This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

PrettyPhoto Iframe

  • Creator
    Topic
  • #6074
    5oclock
    Participant

    I know you made some adjustments to PrettyPhoto does the default theme still allow Iframe ability?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #6075
    Jason Bobich
    Keymaster

    Sure, I don’t see why you couldn’t use iframes. I just adjusted how prettyPhoto scales on mobile devices. I didn’t change anything else with it.

    #6076
    5oclock
    Participant

    That’s what I thought but wanted to make sure. I’m sure there’s a reason why it’s not working .
    Thanks for the reply

    #6078
    karlo
    Participant

    I have just been setting up PrettyPhoto to show links from a custom menu siting in Admin bar – as iframes. Works 100%. I use PrettyPhoto 3.15 but with Jasons fixes. They dont matter for this.

    Also a special attribute thingy so I can make new init section, separating it from default. Depending on what you do you might want to change markup for iframe and use sandbox http://www.sitepoint.com/how-to-safeguard-your-site-with-html5-sandbox/

    Think this is what worked

    jQuery(document).ready(function($) {
    	$("#wp-admin-bar-extra-menu-0 ul li").find("a").not('a[href^="https"],a[href^="#"]').attr("rel","prettyPhoto_admin[iframes]").each(function() {
    	$(this).attr("href", function(i, real_url) {
    		return real_url + "?iframe=true&width=95%&height=95%";
    	});
    });

    Then some init stuff to match iframes, modal to true etc. And the sandbox feature, what ever it is.

    If not working try version 3.15.

    Using default iframe code but with 3.15 is also working, like

    <a title="Google" href="http://www.google.com?iframe=true&amp;width=100%&amp;height=100%" rel="themeblvd_lightbox[iframes]">Google</a>
    #6080
    Jason Bobich
    Keymaster

    Something to note here, guys… On the prettyPhoto documentation page, for the longest time, they’ve used Google.com as the example. However, a couple years ago Google starting blocking iframe access to the site just in general.

    … Or at least this was the case last time I played with all this. We sat there trying to figure out why it didn’t work, only to figure out it was because of the google.com example we were using.

    #6082
    karlo
    Participant

    Think start page work but yeah this was why I got tuned in to HTTPS issues and the sandbox feature. For example you cant load Google Webmaster Tools in an iframe. A site can also block iframe viewing I think? Iframe busting or something. So “not working” can be natural.

    This is only for myself so not a worry but there can be security problems, not a place to do banking stuff!

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