Forums

[Plugin: Embed Iframe] hacked to embed GET variables in url (3 posts)

  1. MiJaMu
    Member
    Posted 2 months ago #

    I hacked iframe.php to pass url encoded variables to the iframe
    Someone might find it useful. I did ;)

    <div class="iframe-wrapper">
    <?php
    if($_GET != NULL) {
    $encode_string = "?";
    foreach($_GET as $key => $value)
    {
    $encode_string .= $key."=".$value."&";
    }
    }
    ?>
    <iframe src="<?php echo $url.$encode_string; ?>" frameborder="0" style="height:<?=$height?>px;width:<?=$width?>px;">Please upgrade your browser</iframe>
    </div>

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

  2. mebenson
    Member
    Posted 1 month ago #

    What exact does this enable you to do?

  3. jake37
    Member
    Posted 1 month ago #

    MiJaMu, Thank you, That worked great. Before it was not pulling the Frame Size into my post, I wanted it to be 600 width and 500 height and it stayed at something like 300 x 300.

    Mebenson, what the code is for that MiJaMu" posted was to make the size of the IFRAME to be the size you specified when you embed your posts. ie: [iframe http://example.com 400 500] or [iframe http://example.com 600 500] etc. before it would not expand the iFrame to the size you specified.

    PS. The file that needs this code is in the "view" folder >> "embediframe" folder, code goes in this file "iframe.php" replace all the code with what "MiJaMu" posted above.

    Here is an example of my site with a test embed using iFrame.
    http://www.webexpressplus.com/blog/embedding-test.html

    Thank you,
    Jake

Reply

You must log in to post.

About this Topic