Auto iFrame

Beschrijving

A quick and easy shortcode to embed iframe’s that resize to the content of the remote site.

Auto iFrame shortcode is in the format of:

[auto-iframe link=xxx tag=xxx width=xxx height=xxx autosize=yes/no]

Waar:

  • link = the url of the source for the iFrame. REQUIRED.
  • tag = a unique identifier in case you want more than one iFrame on a page. Default = auto-iframe.
  • width = width of the iFrame (100% by default). Can be % or px. Default = 100%.
  • height = the initial height of the iframe (100% by default). Can be % or px. Default = 100%.
  • autosize = enable the auto sizing of the iFrame based on the content. The initial height of the iFrame will be set to “height” and then resized. Default = true.
  • fudge = a fudge factor to apply when changing the height (integer number, no “px”). Default = 50.
  • border = enable the border on the iFrame. Default = 0.
  • scroll = enable the scroll bar on the iFrame. Default = no.
  • query = pass the parent’s page query string to the iFrame. Default = no.

Note: Auto re-sizing of the iFrame for cross domain sites does not work, this is a security protection provided by the browser and there is no way around it.

Now supports (Shortcode UI)[https://github.com/fusioneng/Shortcake] (aka Shortcake)!

Schermafdrukken

  • Post with short code.

Installatie

  1. Extract the archive file into your plugins directory in the auto-iframe folder.
  2. Activate the plugin in the Plugin options.

FAQ

De autosize functie werkt niet, wat is er mis?

The first thing to check is that the source of your content is in the same domain namespace as your site, using a link from another domain name will not work as it would be a cross site scripting risk. This is part of your browsers security structure and cannot be worked around.

After that, check your browsers console for any JavaScript errors that may be happening, there may be conflicting JavaScript on the page causing an error.

Beoordelingen

20 april 2025
The plugin has auto size, which is a premium feature. However, thanks to the author, he generously offered it free without restriction.
28 juni 2023
This plugin works very fine! Because of caching issues in combination with user restrictions I made a page with 20 iFrames, each loading another small page offering download links. This was the only chance for me to handle it and Auto iFrame made it possible. The resizing of the iFrames works perfectly. Many thanks for this great plugin!
7 juli 2020 1 reactie
Very misleading description. Does not work with content from “remote sites” ie not on the same domain – As stated by others, and despite what the author may insist, “cross domain” is basically the same as a “remote site”.
11 juni 2020 1 reactie
I would assume for the non tech people you would supply a simple code where you only enter the link from Google sheets but no. What is this? [auto-iframe link=xxx tag=xxx width=xxx height=xxx autosize=yes/no] Says “link=xxx” but how do you insert the link above and where? Makes this an uninstall and waste of time, give a working sample at least not something we need to figure out
9 september 2018 1 reactie
Had to leave a review as I think this plugin deserves more praise and attention. I’d spent a few hours (hate to count how many exactly) trying to get a few other auto-resize iframe methods working with poor results. It looked like the solution was to simply accept several more hours of work would be needed… I was beginning to lose hope. Instead, why not search for a WordPress iframe resizer plugin? The result, within 5 minutes I had a perfect auto-resizing iframe working – and it was so easy I almost feel sick with how much time I wasted on the previous methods. Thank you Greg. Auto Iframe has genuinely made my day. (Small donation sent.)
13 februari 2018
Unlike many, I have seen no real issues with the plugin and find it very useful. In my tests, you simply follow the directions and it just works. No tweaking required in my experience. Best iFrame plugin I have found here on repository.
Lees alle 18 beoordelingen

Bijdragers & ontwikkelaars

“Auto iFrame” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

Vertaal “Auto iFrame” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

2.0

  • Releasedatum: 2 december 2022
  • Opgelost: escape alle link parameters.

1.9

  • Releasedatum: 23 oktober 2024
  • Fixed: Don’t allow links that are javascript code.

1.8

  • Releasedatum: 7 oktober 2024
  • Fixed: Escape tag attribute to avoid javascript injection.

1.7

  • Releasedatum: 10 juli 2022
  • Fixed: unset array key warning for php 8 when scroll is set but autosize hasn’t been.

1.6

  • Releasedatum: 21 februari 2018
  • Toegevoegd: naam attribuut aan iframe.

1.5

  • Releasedatum: 31 maart 2017
  • Fixed: WP_DEBUG and JavaScript errors when the auto resize option was not used.

1.4

  • Releasedatum: 11 november 2016
  • Toegevoegd: query ondersteuning

1.3

  • Releasedatum: 27 september 2016
  • Fixed: Fudge factor being ignored when autosizing the iframe.

1.2

  • Releasedatum: 6 november 2015
  • Fixed: Height parameter was being ignored, thanks vantron.

1.1

  • Releasedatum: 11 augustus 2015
  • Fixed: Make sure to check the frame element and sub-objects exist before using them later.

1.0

  • Releasedatum: 15 mei 2015
  • Added Shortcode UI support (see https://github.com/fusioneng/Shortcake for details)

0.5

  • Releasedatum: 25 maart 2015
  • Initiële release.