Página Inicial > wordpress > insereIframe: a simple wordpress plugin to insert iframe in posts

insereIframe: a simple wordpress plugin to insert iframe in posts

English

A simple way to insert iframes in your wordpress posts

How to install

Download http://wordpress.org/extend/plugins/insere-iframe/

Unzip the file to your /wp-content/plugins/ directory

Activate plugin

Usage

To insert an iframe in your post, insert the code below in the place that you want the iframe (without spaces between [ and iframe: ):

[ iframe: src="http://www.example.com" frameborder="0" width="100%" height="200" scrolling="no"]

You can set any attribute that you want (see a list of possible attribues in http://www.w3schools.com/TAGS/tag_iframe.asp).

Enjoy!

Português

Uma forma muito fácil de inserir iframes nos seus posts do wordpress

Como instalar

Faça o download em http://wordpress.org/extend/plugins/insere-iframe/

Descompacte o arquivo na pasta /wp-content/plugins/

Ative o plugin pelo wordpress

Como usar

Para inserir um ifame em seu post, no local em que você quer que o iframe apareça, insira o código como no exemplo abaixo (sem espaços entre [ e iframe: ):

[ iframe: src="http://www.exemplo.com" frameborder="0" width="100%" height="200" scrolling="no"]

Usando esse plugin, você pode usar todos os atributos de um iframe (veja http://www.w3schools.com/TAGS/tag_iframe.asp).

Lincense / Lincença

GNU GENERAL PUBLIC LICENSE

Deixe seu comentário

  1. Ricardo
    16, novembro, 2009 em 19:26 | #1

    Este plugin só funciona em páginas?

    • 16, novembro, 2009 em 22:43 | #2

      Atualmente não funciona em páginas, mas somente em posts. Em breve vou fazer uma atualização para funcionar em páginas também.

      Abraço!

  2. 16, novembro, 2009 em 22:23 | #3

    In WordPress 2.8.6, I tried your plugin and it doesn't insert the iframe, just displays the code as text. I have [iframe: src="http://www.google.com/calendar/hosted/gci.org/embed?src=gci.org_rqhl5tddnbi8fjt6620je79ns0%40group.calendar.google.com&ctz=America/Los_Angeles" width="800" height="600" frameborder="0" scrolling="no"] as the code.

    • 16, novembro, 2009 em 22:42 | #4

      Hi Bret!

      I did a test and it works with your attributes…

      I used

      [iframe: src="http://www.google.com/calendar/hosted/gci.org/embed?src=gci.org_rqhl5tddnbi8fjt6620je79ns0%40group.calendar.google.com&ctz=America/Los_Angeles" width="800" height="600" frameborder="0" scrolling="no"]

      Can i see were you have tried to insert it?

      thanks!

  3. 19, novembro, 2009 em 03:39 | #5

    I have also tried it and all I see is the code. No iframe.. Please help.

  4. 25, novembro, 2009 em 21:17 | #7

    Hi Wellington!
    I’m using WP 2.8.6. Activating insereIframe I get the message:
    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /mnt/web5/53/16/5920416/htdocs/wp-content/plugins/insere-iframe/insereIframe.php on line 15
    I tried both versions, 1.0 and Development.
    Greetings from Berlin
    Wilhelm

  5. 26, novembro, 2009 em 13:15 | #10

    Hi Wellington!
    Thanks a lot. It’s PHP 4.4.9. After editing activation was fine.
    But using the plugin (as Chris above) I only get the code, for example:
    [ iframe: src="http://www.schachfieber.de/inline/20091125mousetrapper1.htm" width="100%" height="390" frameborder="0" scrolling="no"]
    Therefore – for the moment – I have to return to my former solution.
    Best wishes
    Wilhelm

  6. 26, novembro, 2009 em 15:52 | #11

    @wilhelm
    You can’t use spaces between ‘[‘ and ‘iframe’…

  7. 26, novembro, 2009 em 17:00 | #12

    I like the plugin, only 1 problem, it only works on new posts and nog on new pages.
    when i use the code on a new page then i see the code.
    when i use it whitin a post it works great.
    So i wait for an update so it works on pages and new pages too. till then its de-activated.

  8. 26, novembro, 2009 em 19:14 | #14

    For those who just can’t wait:

    Plugin directory, insereIframe.php, line 37. Change it to:

    if( ( is_single() || is_home() || is_page()) && !is_feed() )

    Other than that, nice, clean and usable plugin, Wellington. Thank you very much!

    • 27, novembro, 2009 em 09:43 | #15

      Thanks Matthias!

      The plugin was updated to work in pages too…

      Any suggestion to update the plugin and to do it more useful, please let a comment or send me an e-mail.

  9. 14, dezembro, 2009 em 22:31 | #16

    Hi, very nice plugin.
    Can you make it work like widget with multi-instance?

    Greetings from Belgrade
    Sasa

  10. 17, dezembro, 2009 em 06:27 | #18

    I’ve try it…it works…

    Thnks…

  11. Xin
    11, janeiro, 2010 em 01:28 | #19

    Hi Wellington,

    Thanks for the plugin. I have problems.
    I am using PHP 4.3.9, and I updated the php file with http://blog.idealmind.com.br/exemplos/plugins_wordpress/insereIframe/insereIframe.txt and activated OK.
    But when I put
    [iframe: src="http://www.controlite.co.il/default.asp" width="800" height="600" frameborder="0" scrolling="no"]
    into a page and only display the code.
    http://www.danpalon.info/controlite/

    Can you help? Thanks.
    b.tw: my wordpress is 2.8

    Thanks,
    xin

    • 11, janeiro, 2010 em 09:57 | #20

      Hey Xin!

      I take a test using the same code that you, [iframe: src="http://www.controlite.co.il/default.asp" width="800" height="600" frameborder="0" scrolling="no"], and it works fine…

      The link that you send me it’s working… are you still using the insereIframe plugin?

      Best regards,

  12. Xin
    14, janeiro, 2010 em 09:32 | #21

    Hi Wellington,

    Thanks a lot for your reply. Not sure why is not working on my Server, Maybe related to WP version or maybe the Server settings. The working one is using html iframe tag, sorry, my mistake. I will give it a go with WP2.9. Thanks again for your great work!

    xin

  13. 18, janeiro, 2010 em 20:05 | #22

    I am using wordpress and I installed your plugin. Since this is the first time I am using it, I can’t be sure if it is working properly. When I upgraded automatically inside wordpress, I see this error:

    Plugin failed to reactivate due to a fatal error.

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /webroot/d/e/democ001/primary/www/wp-content/plugins/insere-iframe/insereIframe.php on line 15

    Even if I edit the plugin and add the code from one of the comments above (and it activates properly), the following code does not seem to work. If you have a moment to lend a hand to this, I would be honored.

    Thank you.

    • 19, janeiro, 2010 em 09:25 | #23

      Hi Nathan!

      The first error ocurred cause you are using an older version of php (like php 4).

      Now, with the correct version of InsereIframe plugin, i think that it will work. It seems that you are not putting the correct code to insert the iframe.

      Try use the code below:

      [iframe: src="http://www.eventbrite.com/r/ecal" width="800" height="600" frameborder="0" scrolling="no"]

      Personalize with your oun atributes.

      Best regards!

  14. 18, janeiro, 2010 em 20:06 | #24

    Here is the code:

  15. 20, janeiro, 2010 em 13:26 | #25

    Thank you for writing back…I am getting closer…I also realize your product is free, but I really want to make this work. Would you mind looking at this code one more time and lead me to the answer or show me???

    Here is the code that Eventbrite is giving me to use with their widget. What do I need to do to make this work with your iframe software in a Post? I put the brackets in so that the code would show up in this post. I realize they don’t belong there in the post.

    {{{{{{{}}}}}

    Thank you for your help on this…Nathan

  16. 20, janeiro, 2010 em 13:27 | #26

    Darn…here is is again:

    [iframe name="countdown" id="mgframe" src="http://www.eventbrite.com/countdown-widget?eid=379061784" width="250" height="338" marginheight="0" marginwidth="0" scrolling="no" frameborder="0" >]

  17. 20, janeiro, 2010 em 13:28 | #27

  18. 20, janeiro, 2010 em 13:28 | #28

    One more time…

    !!!!!!!!

  19. 20, janeiro, 2010 em 13:30 | #29

    Maybe I can email you the code since the posts keep stripping it out?

    <!––>

  20. John
    22, janeiro, 2010 em 05:58 | #30

    Hi Wellington

    Many thanks for your WP plugin – it’s done the job nicely and simply!

    Obrigado!
    John

  21. azarimy
    22, janeiro, 2010 em 22:07 | #32

    Hi Wellington,

    I’m trying to get this to work with dynamic heights. I want to show a forum in the iframe, but i can’t get the heights to work dynamically. Do you have any suggestion to work around this?

    • 23, janeiro, 2010 em 14:31 | #33

      Hi azarimy!

      You can insert a javascript function in the content of you post/page, and in the code of insertIframe, put a javascript atribute that runs the function.

      Try to do this:

      [ iframe: src=”http://www.example.com” width=”100%” height=”340″ scrolling=”no” frameborder=”0″ id=”dynamic_iframe” onLoad=”resizeIframe();”

      < script type=”text/javascript” >
      // Firefox worked fine. Internet Explorer shows scrollbar because of frameborder
      function resizeFrame() {
      document.getElementById(“dynamic_iframe”).style.height = document.getElementById(“dynamic_iframe”).contentWindow.document.body.scrollHeight + “px”;
      }
      < /script >

      Best regards!

  22. 23, janeiro, 2010 em 14:16 | #34

    @Nathan

    the code you send me is wrong!

    [iframe name="countdown" id="mgframe" src="http://www.eventbrite.com/countdown-widget?eid=379061784" width="250" height="338" marginheight="0" marginwidth="0" scrolling="no" frameborder="0" >]

    you have an error in the last two characters ” >] “. Try to use only ” ] ” without ” > “.

    Best regards

  23. azarimy
    23, janeiro, 2010 em 22:10 | #35

    Hello again, Wellington. Thanks for the assist.

    However, I still could not get it to work. I’m not very well versed in programming, so please excuse my lack of understanding. I checked your code, and saw a few issues.

    i. I assume you forgot to close the iframe bracket.
    ii. The function name is different from the onLoad thingy (not sure what to call it :D ).

    I copy and pasted your codes into the html of a WP Page. I’ve adjusted the two issues above and deleted the spaces between the brackets. But I still couldn’t get it to work. Perhaps I am missing something?

    For reference:
    WordPress Page I’m working on: http://www.tanggam.com/v4/?page_id=74
    Forum I want the iFrame to view on: http://www.tanggam.com/v3/forum/

    Another question:
    Will the height readjust itself every time I click on a link inside the iFrame? If it doesn’t perhaps this is more complex than I imagined.

    I really appreciate your time in this.

    • 24, janeiro, 2010 em 01:31 | #36

      Hey azarimy.

      Thanks for your corrections in the code.

      I’m sorry, but i have few time to think about your question…

      If you want that the iframe height adjust itself every time you click on a link inside it, you have to put a javascript code inside the forum, that will run another javascript function in the parent page.

      In a google search, i found this site that i hope it will be useful for you: http://www.pixelmedia.com/blog/dynamic-iframe-height/

      But to do so, you may have to edit the WP template to add jquery script.

      Best regards

  24. azarimy
    24, janeiro, 2010 em 11:00 | #37

    Thanks for your advice and the links.

    I will attempt this, and if I’ve found the solution, I’ll share it with you ;) .

  25. Delfy
    17, fevereiro, 2010 em 08:13 | #38

    My private installation is on MyPrivateIP

    I’m creating a new page and if I use
    [iframe: src="http://www.google.com" frameborder="0" width="100%" height="200" scrolling="no"]
    it works but if I use
    [iframe: src="http://MyPrivateIP/wordpress/mydocs/index.html" width="100%" height="200" scrolling="yes"]
    I’ve a problem, this is the error:
    “Not Found
    The requested URL /wordpress/<a href= was not found on this server.

    Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g mod_perl/2.0.3 Perl/v5.8.8 Server at MyPrivateIP Port 80"

  26. 17, fevereiro, 2010 em 22:09 | #39

    @Wellington Ribeiro

    Hi, I have the exact same problem as everyone else. Only the code is displayed. I checked the syntax its 100% correct. I am trying this on a post not a page.
    WP 2.9.2 PHP 5.x
    Did anyone ever resolve this problem ?

  27. Paulo
    11, março, 2010 em 15:37 | #40

    It really not work.. SHIT PLUGIN

  28. 15, março, 2010 em 12:13 | #42

    There is more elagant solution without using plugins. I use it on my site and it’s worked well. http://www.vividvisions.com/2009/02/11/wordpress-add-iframes-to-your-post/

  29. 22, março, 2010 em 16:07 | #43

    Was hoping that 2.9 would solve this but no luck – was very happy to find your page.

    thank you for making the widget available to the community

    ;-)

    Andrew

  30. Michelle
    26, abril, 2010 em 20:14 | #44

    Upgrade to v. 1.3 broke the plugin on my site – now the page shows only the shortcode. Can you share what changed and why so I can fix? For now I am downgrading back to version 1.1. Thanks!

  31. CG
    27, abril, 2010 em 01:06 | #45

    I did an automatic upgrade (v1.3) when I tried to go back to the dashboard after this was reactivate, my admin section was broken. Now all I get is this “” …. PLEASE HELP!

    It only does this in the ADMIN Section (wp-admin) /// regular site is fine

  32. CG
    27, abril, 2010 em 12:14 | #47

    I don’t think that worked, as it was the only thing on my site that was edited in the last 4 days. Everything else was working when I did the last edits on Friday Afternoon. Is there any more solutions to get this to work

  33. DFW
    28, abril, 2010 em 01:03 | #48

    The 1.4 update still doesn’t work. Not sure what change, but it’s busted now.

  34. Michelle
    28, abril, 2010 em 12:34 | #50

    I see from the above comment that I will need to edit the plugin to make it work on Pages. Yet, it used to work on Pages in version 1.1. Is there a reason you removed this feature in the latest version of the plugin? It’s making it difficult to upgrade because a lot of my client sites use this on Pages.

    In any case, thank you for the wonderful plugin!

  35. Anon
    1, maio, 2010 em 07:47 | #51

    why do you need a plugin for a simple iframe? Just use this code and post as HTML..

    If you can see this, your browser doesn’t
    understand IFRAME. However, we’ll still
    link
    you to the file.

  36. Anon
    1, maio, 2010 em 07:49 | #52


    If you can see this, your browser doesn't
    understand IFRAME. However, we'll still
    link
    you to the file.

  37. 26, maio, 2010 em 11:03 | #53

    Hi Wellington

    you made a nice job with this plug-in.

    Just to remind people that they have to create an excerpt, it will display the code if not !

    Thanks again

  38. 26, maio, 2010 em 15:31 | #54

    Muito bom o plugin, resolveu meu problema. Muito obrigado!

  39. 8, junho, 2010 em 15:30 | #55

    Wellington.. I just found and installed the insere iframe plugin .. Kudos for this plugin. We’ve been needing a clean way to put iframe references into WP. Now I have a question for you.

    The page on which I’m use your plugin is a Password Protected WP PAGE (not a Post). In the initial testing, the PAGE loaded in Password Entry mode just fine. But now I cannot get it to remain ‘hidden’. Linking from the WP Page Header renders a ‘full-open’ version of the page – no Password required! Not what I need.

    I have turned off all Password saving elements on the browsers (Firefox and GoogleChrome) and have flushed all cache. Closed out URLs and shut browser down.

    Still the page comes up unprotected.

    I even deactivated the insere iframe plugin. The page still comes up unprotected.

    Are you aware of any code from your plugin that would render the password protection null..?

    Thanks for the assist.

    Other than this the insere iframe plugin is a fabulous!!

    • 9, junho, 2010 em 11:32 | #56

      The code of insereIframe plugin is very simple and short… I really don’t believe that the insereIframe plugin is causing the pass problem, especially because you turned it off, and the issue remained. You can also try to uninstall it.

      Best regards

  40. 28, junho, 2010 em 11:38 | #57

    I am still trying to get my iframe to adjust the height dynamically in WordPress – I tried all the suggestions listed here – but none seem to work. Have you found any new solutions? Thanks for the plugin!

  41. Admin
    5, julho, 2010 em 22:00 | #58

    Dear Sir:

    Just installed Insere Iframe 1.5 plugin in our WP3MS, BP 1.2.5 installation. After creatin a page and include [iframe: src="http://www.webpage.com" width="100%" height="100%" scrolling="no" frameborder="0"], frame is not showing correnctly. Height value is assumed as 100 px.

    How we fix this ?

    Regardsm

    • 6, julho, 2010 em 10:49 | #59

      Hi!

      I did an upgrade on my blog to version 3 of WP, and I didn’t find any problem. Be sure that you inserted the code correctly.

      Best regards!

  42. 6, julho, 2010 em 23:03 | #60

    Dear Sir:

    Please visit the website page included. The code we insert is:

    [iframe: src="http://www.website.com" width="100%" height="100%" scrolling="no" frameborder="0"]

    Regards,

    @Wellington Ribeiro

  43. 7, julho, 2010 em 01:09 | #62

    Hi,

    Thanks a lot for the plugin. This seems to be the only one that works.
    A reason why lot of people are complaining is because they are copying the ‘usage’ code present right at the top of this page. That code has an error. There is an extra space between the opening square bracket and iframe: keyword.

    As a result of the space, WP Editor automatically encloses the code in SPAN tags and hence the iframe shows up as code in post.

    Can you fix this please?

  44. John C
    7, julho, 2010 em 23:03 | #63

    Hi, your plugin is the closest to working so far, BUT, the result is the page loads as complete redirect!
    When I used
    [iframe: src="http://www.google.com" frameborder="0" width="100%" height="500" scrolling="yes"] Google displayed perfectly in the iframe.
    This is the code that is REDIRECTING
    [iframe: src="http://madill.promocan.com/Products.htm" frameborder="0" width="100%" height="500" scrolling="yes"]

  45. 8, julho, 2010 em 10:51 | #65

    @Wellington Ribeiro If we use – height=”500″ – as you suggest and our calendar listing exceed this height, will it automacally adjust, or should be use schroll ?

  46. 8, julho, 2010 em 11:30 | #67

    @Wellington Ribeiro Dear Mr. Ribeiro: Thanks for your reply, as see on the link sent, height=”100%” should work, and it isn’t with your plugin, is there a way to fix this ?

    Regards,

  47. John C
    8, julho, 2010 em 11:32 | #68

    Wellington,
    I think you hit the nail on the head! THANKS
    The site I was trying to frame breaks out of theme! I was going insane trying to figure this out!!

    Be Awesome!
    John Cussons

  48. 8, julho, 2010 em 12:56 | #69

    Dear Sir:

    We recently found another issue, [iframe: src="http://www.website.com/events/switchLang.php?l=german" width="100%" height="100%" scrolling="no" frameborder="0"] where website.com is our websu¡ite url indicated in our profile.

    The issue is that when page load it enter in a continue loop without end.

    To see what´s happening please visit http://www.website,com/agenda, where website.com is our websu¡ite url indicated in our profile.

    Hope to receive your help.

    Regrads,

  1. 8, abril, 2010 em 14:17 | #1
  2. 30, junho, 2010 em 12:06 | #2
  3. 5, julho, 2010 em 23:12 | #3
SEO Powered by Platinum SEO from Techblissonline