Support » Plugin: Advanced iFrame » Dynamic Height Reload

  • Resolved ehouben

    (@ehouben)


    Hi there,

    I’m thinking of installing your plugin, but I have question about functionality. I’m trying to capture buddypress groups inside a wordpress static page using iframes (same domain). The problem with other iframe plugins is the fact that the buddypress activity stream relies on AJAX to expand/retract when one of the following takes place;

    New activity is posted
    Read more/Load more is clicked

    In these cases the height of the iframe cannot adjust dynamically, causing older content to drop below the frame border. I’m aware of certain scripts on stackoverflow that will solve the problem, but i’m looking for a plugin that can handle this. So my question would be: Can Advanced Iframe dynamicaly resize height when the iframed page expands?

    http://wordpress.org/extend/plugins/advanced-iframe/

Viewing 15 replies - 1 through 15 (of 67 total)
  • Plugin Author mdempfle

    (@mdempfle)

    The resize is only done when an onload event does happen. And this is then the inner page gets a new url. When an AJAX call happens this does not happen right now.

    Can you point me to the scripts that do this? I can then add this to the next version of the advanced iframe.

    Thanks for your quick reply. Don’t see many plugin authors that resolve all their support issues like you do. As for the scripts, i’m afraid i spoke out of turn. I’m sure i came about some solutions when browsing the web (using onclick? pageloaded? events), but i’m unable to find them again. I don’t have enough knowledge to filter the working solutions from the unsolved ones.

    Anyway, I’m sure someone will find a workaround one of these days. For now, you’ve answered my question so i’ll mark this as resolved.

    Plugin Author mdempfle

    (@mdempfle)

    Can you modify the page in the iframe? Because then you can simply call the javascript function of the advanced iframe when the ajax call has finished.

    Plugin Author mdempfle

    (@mdempfle)

    I’m thinking about something like catching all onclick events. But then there would have to be a timeout as well because Ajax call take some time.
    But the onclick solution would catch stuff like expanding divs…

    Plugin Author mdempfle

    (@mdempfle)

    hi, I just did a few test yesterday an it is possible to catch the AJAX events in the iframe. I already have a version where the resize works nice.
    do you want to test it?

    Plugin Author mdempfle

    (@mdempfle)

    Do you want to test it?

    I’d like to test it on a site I’m interfacing with.

    Plugin Author mdempfle

    (@mdempfle)

    Cool,

    I have upload it to
    http://www.tinywebgallery.com/dl.php?file=advanced-iframe
    This is then version 3.1 already.

    Look for the setting “Resize on AJAX events”. There you have to enter a number. This is the timeout the resize is called. 0 should be fine for most cases because I catch the call after the callback is executed which normally does the replace.
    I added this timeout for e.g. pages which do some scroll down when loaded.

    I will also be testing it. Can hardly believe how quick you came up with a solution. If it works, your plugin will finaly bridge the gap between buddypress and wordpress.

    Plugin Author mdempfle

    (@mdempfle)

    Be ware that both page must be on the SAME domain.
    If it does not work please tell me which Javascript framework is used on the page you want to include. Because maybe they overwrite this as well.

    Best,
    Michael

    Right now it’s not working. I’m testing on a single domain using the follwoing shortcode:

    [advanced_iframe securitykey=”key” src=”source” resize_on_ajax=”tried 5 to 5000″] with the option ‘Resize iframe to content height’ turned on.

    jQuery framework

    Plugin Author mdempfle

    (@mdempfle)

    o.k. – I’ll setup an example page with jquery only and test there. I only took a quick look in the jquery sources and they seem to overwrite my stuff. So I might have to hook into jquery somewhere…

    My test page was using the XMLHttpRequest object directly…

    Btw. it is best to use only [advanced_iframe securitykey=”key”] and set the defaults in the administration.

    Ok, I’ll wait for your update then. Thanks for your quick support. I’ll limit the use of shortcode parameters in the future.

    Thanks. I tried it out on my end and it didn’t work. It maybe worth noting the site I’m using in the Iframe is on another domain, but I am using the XSS workaround.

    Plugin Author mdempfle

    (@mdempfle)

    Have you extracted my code that intercepts the AJAX call and added it to the remote site?
    Because this has to be done here.

    But as mentioned before. My current solution does not work with jquery sites because jQuery does overwrite theis calls as well.

    I’ll try to find a jquery (jquery on the page you want to include) compatible solution as well.

Viewing 15 replies - 1 through 15 (of 67 total)
  • The topic ‘Dynamic Height Reload’ is closed to new replies.