• 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 - 31 through 45 (of 67 total)
  • Thread Starter ehouben

    (@ehouben)

    Tested it a moment ago and it does some strange things now;

    1. Resize on click does not take place when ‘reply’ button is clicked. It does however resize when i click outside the activity stream (page margin) after clicking the reply button.

    2. Clicking load more still resizes (jquery resize), but it gives system popup saying; the page on *url* reports; Ajax

    3. On a related note; When i click inside the reply box (which opens after clicking the reply button), the page also resizes. This causes it to jump to the top of the framed page, making it very confusing as this lands the user on top of the main activity update box.

    Plugin Author mdempfle

    (@mdempfle)

    1. Seems that maybe the click event is added dynamically later on or the propagation of the event was stopped.

    I have now used another way to attach the event.
    which WordPress version do you use?

    2. This was a debug line for me. I have removed this now.

    3. This should be gone as well if you have wordpress > 3.0 because I now only add this at links.

    http://www.tinywebgallery.com/dl.php?file=advanced-iframe

    Thread Starter ehouben

    (@ehouben)

    Ok, seems this took us a step back in the thread. The system popup (2) was solved, but resize on click does not function anymore. Using WP 3.5.

    P.S. Resize at ‘load more’ also jumps to top of iframed page

    Plugin Author mdempfle

    (@mdempfle)

    I checked the code of the page you use.
    the problem is that an onclick event handler is added.
    I also one (I can see while debugging that it is there).

    But the event from your script does return false – This means that no other action is done. And it has to be that way because otherwise the link itself gets executed. And this is not wanted.

    I found out that a solution is not possible with jQuery because you cannot change the order of the events very nicely. Seems each jQuery version does store this info differently and a solution would only work for one version.
    But the basic Javascript event handler have a way to attach to the event earlier.
    I’m testing this version right now but it is a little bit more complicated because the event is fired for each click and I have to filter them first.

    I’ll let you know when this is done…

    Plugin Author mdempfle

    (@mdempfle)

    So. I do now use the Javascript event handler that is before the jquery one. By default all links are intercepted. But you can now specify the id as well.
    I also do now save the scroll position and set it again after the resize.

    So please try again.

    Thread Starter ehouben

    (@ehouben)

    Ok, tested again. Results are good, if somewhat inconsistend (see 1);

    1. On first page-load, clicking reply, followed by ‘load more’ seemed to disable the resize on load more. Refreshing the page strangely solved this, after the refresh both options worked in perfect harmony. edit: I ran into this issue twice, but have since been unable to reproduce it in further testing.

    2. The ‘read more’ option no longer resizes the iframe height, most likely because the ‘is jquery’ option needs to be turned off for the ‘reply’ resize to work

    3. Resizing no longer causes the page to jump to top πŸ™‚

    Overall, this seems to be a huge step forward.

    Plugin Author mdempfle

    (@mdempfle)

    you need to turn is jquery on because your AJAX events are jquery.

    Reply is done by jquery and the click uses a Javascript handler jquery does not use. So in my opinion they should not interfere.

    Maybe the loading time of the page is an issue here. After clicking reply the page is loaded quicker which solves the timing issues.

    What maye is an issue: the load more is also a link – so click does also work here. Go to the configuration and use a:acomment instead of a only. then only the reply links get the onclick event.

    I have some debug alerts in the code you can enable if you like.
    set $debug = true; in line 432 of advenced-iframe.php then you see when a click was intercepted and a Ajax call returns.

    Plugin Author mdempfle

    (@mdempfle)

    I just tested an the onclick does also work for the load more… So this only work now because the click does trigger the resize – but if the ajax request takes a little bit longer it does not work…

    I tested with Firefox btw.

    Plugin Author mdempfle

    (@mdempfle)

    So I think it is important to use a:acomment

    Best, Michael

    Thread Starter ehouben

    (@ehouben)

    You were right. I added a:acomment and enabled ‘is jquery’ and everything works fine now. I will be conducting some further tests with the other elements of buddypress (group forums, profile and such) after the weekend. As it stands now, you have done something I (and a lot of people who’s support threads i read) thought imposible; merging buddypress and wordpress pages.

    I simply cannot thank you enough for your help on this issue. You sir, went above and beyond with your support.

    Plugin Author mdempfle

    (@mdempfle)

    Great. If you find any problems please let me know.

    I will now release this as version 3.1.

    It would be nice if you vote for it or write a small review..

    Best, Michael

    Thread Starter ehouben

    (@ehouben)

    I voted a 5/5 and left an honest review. It was really the least I could do to thank you for all your help. I will let you know if run into any issues after further testing.

    Plugin Author mdempfle

    (@mdempfle)

    Thanks,

    You did good testing and provided access to your platform as well.
    So hopefully this version gets really successful.

    Plugin Author mdempfle

    (@mdempfle)

    3.1 is now online. Can you please mark that this version works?

    Thread Starter ehouben

    (@ehouben)

    Just did. Tested other buddypress components a little; so far everything works perfectly. If you are interested in tweaking the plugin even more, i may have another support question for you (white flash on load related). Seems there are some easy css solutions for this that you could implement. Just a thought.

Viewing 15 replies - 31 through 45 (of 67 total)

The topic ‘Dynamic Height Reload’ is closed to new replies.