WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. MiJaMu
    Member
    Posted 4 years 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 4 years ago #

    What exact does this enable you to do?

  3. jake37
    Member
    Posted 4 years 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

  4. PrimaryGoals
    Member
    Posted 3 years ago #

    This hack allowed me to use the code for embedding google calendar iFrames. Please note that in HTML, the code can span many lines, but in WordPress, it all has to go on a single line. The editor's auto word-wraps are OK, but no manual ones for readability.

Topic Closed

This topic has been closed to new replies.

About this Topic