Usage of <iframe> in joomla

Contact the Development Working Group here: http://groups.google.com/group/joomla-dev-general

This forum is now closed and archived.
Locked
Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Usage of <iframe> in joomla

Post by Markyboy » Fri Jun 13, 2008 4:10 pm

Hi,

i am adding an <iframe> peace of code in the html editor of an article. It doesn't seem to like it as it will remove the iframe and leave the rest of the code which contains only table info.

How can you make an iframe work within an article???

Thanks
Marc

<table cellpadding="0" cellspacing="0" border="0">
<tr><td> <iframe src="http://mywebsite.com/Affiliate/SearchBo ... tryCode=GR" frameborder="0" scrolling="no" width="500" height="427"></iframe> </td></tr>
<tr><td align="right" style="font:xx-small verdana,sans-serif"><a style="text-decoration:none;color:Black" href="http://www.mywebsite.com/?a_aid=13aec11 ... ></td></tr>
</table>

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Re: Usage of <iframe> in joomla

Post by Markyboy » Sat Jun 14, 2008 12:50 pm

Something that cannot be too hard for someone with joomla experience, but i find it hard too beleive that there is no one who knows an answer to this issue.

:(

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: Usage of <iframe> in joomla

Post by ircmaxell » Sat Jun 14, 2008 1:46 pm

TinyMCE (the editor) is stripping it out. You can either disable all editors, or edit the tinyMCE plugin, and set it not to strip bad tags...
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST

http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs

Markyboy
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Jun 12, 2008 11:21 am

Re: Usage of <iframe> in joomla

Post by Markyboy » Sat Jun 14, 2008 5:30 pm

Hi, Thanks for your reply. I tried to edit the tinyMCE plugin, but i cannot find any setting that gives me the right configuration. Is there another editor maybe which will work for me??? I cannot disable the editor as i will need it.

Thanks

pawblo
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jul 08, 2008 10:55 pm

Re: Usage of <iframe> in joomla

Post by pawblo » Tue Jul 08, 2008 11:08 pm

go to Plugins-->editor Tinymce-->parameters

Make sure all of the buttons are chosen on the left from "Code Cleanup on Startup" to "Compressed Version" and you will be able to insert any html you want.

Code Cleanup on Startup Off On
Code cleanup on save Never Front Only. Always
Do not clean HTML entities. Yes No
Save Warning Off On
Compressed Version Off On

HTH

coaster101
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Tue Jul 08, 2008 5:49 am

Re: Usage of <iframe> in joomla

Post by coaster101 » Wed Jul 09, 2008 12:36 am

^ I am trying to do the similar thing and I edited the Tinymce parameters and it's still not working. Any ideas?

User avatar
webmonkiee
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat May 12, 2007 3:34 pm
Location: Los Angeles, California
Contact:

Re: Usage of <iframe> in joomla

Post by webmonkiee » Fri Jul 25, 2008 11:59 pm

I'm having the same issue.
I've set all the TinyMCE settings in the Plugin Manager (Code cleanup OFF, Do not clean HTML entities YES, etc). Now it keeps the iFrame but it is loosing the Read more... hr. The hr is still there but the system is not registering it as a read more hr.

Any ideas? I'm running J! 1.5.2
Zuno Studios - full service interactive design studio
http://zunostudios.com

jrlawson
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Sep 26, 2008 8:17 pm

Re: Usage of <iframe> in joomla

Post by jrlawson » Fri Sep 26, 2008 8:21 pm

I would love to know a solution to this as well.

User avatar
stutes
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu Aug 28, 2008 3:34 pm

Re: Usage of <iframe> in joomla

Post by stutes » Fri Sep 26, 2008 9:24 pm

I also tried the above, and ran into the same problem as webmonkie (was able to get the iframe to show, but then the read more headers didn't work).

This is what I did as a work around:
1. Restored tinymce's plugin parameters to their original default settings: off, always, no, off off (this brought the use of the read more headers back to normal, but not for articles that had been posted when the tinymce settings had been adjusted---I have to go back to those articles and repost them)
2. Created a new user and set the User Editor to "Editor - No Editor"
3. Logged in as this new user that doesn't use tinymce to post nor edit articles, I create a new article and paste the iframe into it.

And that is that. So whenever I want editing ability in my post, I log in as my usual self. Whenever I want to post an article with an iframe, I log in as this special user that doesn't use tinymce. This way the read more headers still work and I'm still able to post iframes in my articles without having necessary elements stripped out.
Andy
[temp removed]
Joomla install: 1.5.2

jamesp135
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Dec 24, 2008 10:03 am

Re: Usage of <iframe> in joomla

Post by jamesp135 » Wed Dec 24, 2008 10:08 am

has anyone found a solution to this year? i knw its a old problem but id still like to know

Jarn
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Dec 24, 2008 8:10 pm

Re: Usage of <iframe> in joomla

Post by Jarn » Wed Dec 24, 2008 8:28 pm

Hmmm... not sure, but there used to be an article on this at http://exoph.com But I'm not sure if it's still there after the site upgrades. Perhaps try looking on Digitalpoint?
My favorite sites:
http://exoph.com - free scripts and stuff
http://adoptalicious.com - for free adoptables

abhicho
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Nov 14, 2008 1:48 am

Re: Usage of <iframe> in joomla

Post by abhicho » Thu Dec 25, 2008 1:35 am

Even I have a similar problem has anyone found a solution yet.

Sanzrao
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Dec 25, 2008 2:20 am
Contact:

Re: Usage of <iframe> in joomla

Post by Sanzrao » Thu Dec 25, 2008 2:28 am

stutes wrote:I also tried the above, and ran into the same problem as webmonkie (was able to get the iframe to show, but then the read more headers didn't work).

This is what I did as a work around:
1. Restored tinymce's plugin parameters to their original default settings: off, always, no, off off (this brought the use of the read more headers back to normal, but not for articles that had been posted when the tinymce settings had been adjusted---I have to go back to those articles and repost them)
2. Created a new user and set the User Editor to "Editor - No Editor"
3. Logged in as this new user that doesn't use tinymce to post nor edit articles, I create a new article and paste the iframe into it.

And that is that. So whenever I want editing ability in my post, I log in as my usual self. Whenever I want to post an article with an iframe, I log in as this special user that doesn't use tinymce. This way the read more headers still work and I'm still able to post iframes in my articles without having necessary elements stripped out.
Thanks that really helped
Internet Leashed http://www.sanzrao.com, the Internet News Blog

Quadaple
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Dec 25, 2008 10:02 am

Re: Usage of <iframe> in joomla

Post by Quadaple » Thu Dec 25, 2008 10:08 am

abhicho wrote:Even I have a similar problem has anyone found a solution yet.
Hopefully we will get problem resolved in coming year...Merry X-mas

http://quadapletechnologies.com/

User avatar
jen4web
Joomla! Intern
Joomla! Intern
Posts: 94
Joined: Sat Dec 27, 2008 2:34 pm
Location: Arlington, MA
Contact:

Re: Usage of <iframe> in joomla

Post by jen4web » Sun Dec 28, 2008 3:30 pm

Shame no one has answered this -- it's straightforward.

Joomla 1.5:

In Joomla, iframes are called wrappers.

There's one in the menu manager, which is designed for an iframe to take up a whole page.

In the module manager, there's a wrapper module. Set up the module with your iframe settings, assign it a module position (I recommend using a position not in use on the site elsewhere), and assign the module to your content item. I usually use a position like "inset" but you can call it whatever you want.

Now in your content item, add this piece of code:

{loadposition inset}

where "inset" is the name of the module position.

Save the content and take a peek.

The piece of code above is based on a plugin that comes with Joomla called Content - Load Module. You can find it in the plugin manager. There is a setting there for changing the style. By default your module will be wrapped in a table. You may want to get in there and change it to wrapped by a div or no wrapper.

Jen Kramer McKibben
Jen Kramer
lynda.com author, instructor, and curriculum designer
http://www.jenkramer.org

sandeept
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Sep 15, 2008 8:18 am

Re: Usage of <iframe> in joomla

Post by sandeept » Mon Jan 05, 2009 9:17 am

Thanks Jen, u r a life saver :)
Congrats 4 the award btw !!

bobstevens
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Mon Dec 29, 2008 4:15 pm

Re: Usage of <iframe> in joomla

Post by bobstevens » Sat Jan 10, 2009 7:04 pm

Jen:

OK. I'm a newby to Joomla! however I do have some experience in HTML.

I'm responsible for www.fpjonesboro.com and want to put a blog (www.fpjonesboro.com/alpha) in an article (http://fpjonesboro.com/ministries/sunda ... -2009.html).

I've assigned the position for the Wrapper to "insert" as you suggested. I did a "Menu Assignment" to an page and the block does show up when looking at the template positions. The Content-Load Module is activated and set to "Wrapped by Divs".

I put the <div>{loadposition inset}</div> command at the bottom of the article. It shows up as text in the editor. It is invisible ordinarily.

The menu wrapper does fine, I just don't want to put an entire blog page in the left "frame".

I'm missing something here in embedding portion. Suggestions?

lguilherme
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Feb 14, 2008 6:45 pm

Re: Usage of <iframe> in joomla

Post by lguilherme » Wed Jan 21, 2009 6:00 pm

Could anyone give a tip on how to achieve this in Joomla 1.0.15 ?
Tks a lot !

bobstevens
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Mon Dec 29, 2008 4:15 pm

Re: Usage of <iframe> in joomla

Post by bobstevens » Wed Jan 28, 2009 1:57 pm

Here's an answer I found that works very well. It is the mosiframe for Joomla 1.5 Plugin - http://extensions.joomla.org/extensions/4144/details

Simple to install and easy to configure. All it takes after installing the Plugin is the following in an article: {iframe}URL{/iframe}. No muss, no fuss. Just works.

User avatar
stgeorge
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 208
Joined: Fri Jan 30, 2009 4:32 pm
Location: UK

Re: Usage of <iframe> in joomla

Post by stgeorge » Wed Feb 11, 2009 2:54 pm

The problems with putting an iframe into joomla are numerous.

As did bobstevens I used mosiframe.

The problem is that I could still not get it to work initially because of TinyMCE 2.0.

So I have created a guide that will work without the Administration backend in Joomla.

For those that are interested get it from http://winfoes.co.uk/docs.html.

plzkillme
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sat Sep 20, 2008 11:15 pm

Re: Usage of <iframe> in joomla

Post by plzkillme » Thu Feb 19, 2009 9:12 pm

I also have had great results with mosiframe. One note, if you try to see the article with Preview it won't work (or didn't for me). It has to be live. Hope that helps someone.

Funny story: After 4 hours of trying to get JCE to install properly (I got so darned angry they deleted my posting asking for help from the forum for coarse language-- I didn't realize abbreviations for bad words count! Sorry if I offended anyone!) Rather than retype the entire posting as G instead of PG-13, I gave up on that and did one more search and found this posting, which thankfully did NOT include any coarse language, and gave me the answer I needed. So I guess I really do owe that mod some props for snapping me out of it, or I wouldn't have found this.

So now I have learned my lesson and I'm having a super day and I hope everyone here is feeling really positive and constructive, and just super! If only I could send you all a rainbow and a bunny and a lollypop and a big hug. Don't forget to smile!

Oh my gosh, they won't ban me for being a little sassy will they?

User avatar
rich1
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 190
Joined: Sun Apr 05, 2009 2:17 am
Location: London SE
Contact:

Re: Usage of <iframe> in joomla

Post by rich1 » Sun Apr 05, 2009 2:32 am

Well I must admit that putting an iframe into Joomla was not simple until I came here.
Thanks stgeorge for the doc.
Made it kiss.
(keep it simple stupid).

That site, Practical is it one of yours?
If you have no 'Coeur de Lion' do not ask why you fail.

cpthaddock
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Thu Jan 29, 2009 3:54 pm

Re: Usage of <iframe> in joomla

Post by cpthaddock » Sat Apr 11, 2009 11:56 am

I must be totally daft. I've followed Jen's post to the dot and sure, an ifram shows up but it shows the apache setup success page instead of the content. What Am I missing?

martyp
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jun 08, 2009 5:25 am

Re: Usage of <iframe> in joomla

Post by martyp » Mon Jun 08, 2009 5:28 am

Hey guys, had exactly the same problem. I installed JCE with the iFrame plugin, disabled all other editors and made sure that JCE configuration settings turned OFF clean up HTML, not a problem now. Running Joomla 1.5.11, JCE 1.5.2

User avatar
stgeorge
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 208
Joined: Fri Jan 30, 2009 4:32 pm
Location: UK

Re: Usage of <iframe> in joomla

Post by stgeorge » Sun Aug 16, 2009 4:33 pm

Since I have had alot of hits on my little doc, I thought I would post the new link with some other links with the wrapper methods.

I still think the wrapper methods Joomla give with the default install are, easy and quick to implement but we do not always have the Module position we require when using the Module Method. Obviously the Menu Method is easy enough for external sites or internal alternative php Scripts not available as Joomla extensions.

Anyway here are two links:

Mosiframe:
http://winfoes.co.uk/dldocs/JoomIframe.php

Module Wrapper:
http://cybercapital.co.uk/j-module/joomla-wrapper

The above Module wrapper has the guide to both Module and Menu methods in a scrolling frame.

Grim Reaper
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Aug 24, 2009 8:43 am

Re: Usage of <iframe> in joomla

Post by Grim Reaper » Wed Sep 02, 2009 6:21 pm

I still have this problem!
The mosimodule also does not work!
I have a page that works 100% and I want to bring it into joomla.
It is a drop calculator for a mmo where a user searches for an item and it returns the name of the mob that drops it. I am now exhausted...surely something like adding a iframe to joomla should be easer that rocket sience?

Here is the html that needs to work....

<html>
<body>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery_json.js" type="text/javascript"></script>
<script src="jquery_form.js" type="text/javascript"></script>
<script src="dimensions.js" type="text/javascript"></script>
<script src="autocomplete.js" type="text/javascript"></script>
<script type="text/javascript">// <![CDATA[
function searchDB() {
$("#results").html("<div style="margin:50%" mce_style="margin:50%"><img src="images/circle.gif" mce_src="images/circle.gif" /></div>")
$.post("dropcalc.php?itemname="+$("#itemname").val(), function(res) {
var returnValue = $.json.decode(res)
var replacement = ""
for(var i in returnValue) {
replacement += "<h2>"+i+"</h2><table><tr><th>Monstername</th><th>Chance of Drop</th></tr>"
for(var j in returnValue) {
replacement += "<tr><td>"+returnValue[j][1]+"</td><td>"+(returnValue[j][2]*100).toFixed(2)+"%</td></tr>"
}
replacement += "</table>"
}

$("#results").html(replacement).fadeIn("normal")
});
}
$(function() {
setAutoComplete("itemname","hint","dropcalc.php?names=");
});
// ]]></script>
</p>
<div>
<div id="page">
<div id="content">
<div id="box4" class="box">
<h1 id="heading4" class="heading">Drop Calculator for the 5x server</h1>
<p class="heading">You can use this drop calculator to find which mob drops which item with the % chance.<br /> Simply insert the name of the item you are looking for, and click on search.<br /> The results will be displayed below. ~ Enjoy ~<br /> Thank you to Cyfreeze for this custom script.</p>
<div id="form" class="content"><label for="itemname">Itemname:</label> <input id="itemname" name="itemname" type="text" /> <button onClick="searchDB()">Search</button></div>
</div>
</div>
</div>
</div>
</body>
<html>

User avatar
stgeorge
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 208
Joined: Fri Jan 30, 2009 4:32 pm
Location: UK

Re: Usage of <iframe> in joomla

Post by stgeorge » Fri Sep 04, 2009 9:58 pm

Code: Select all

<script src="jquery.js" type="text/javascript"></script>
<script src="jquery_json.js" type="text/javascript"></script>
<script src="jquery_form.js" type="text/javascript"></script>
<script src="dimensions.js" type="text/javascript"></script>
<script src="autocomplete.js" type="text/javascript"></script>
<script type="text/javascript">// <![CDATA[
function searchDB() {
$("#results").html("<div style="margin:50%" mce_style="margin:50%"><img src="images/circle.gif" mce_src="images/circle.gif" /></div>")
$.post("dropcalc.php?itemname="+$("#itemname").val(), function(res) {
var returnValue = $.json.decode(res)
var replacement = ""
for(var i in returnValue) {
replacement += "<h2>"+i+"</h2><table><tr><th>Monstername</th><th>Chance of Drop</th></tr>"
for(var j in returnValue[i]) {
replacement += "<tr><td>"+returnValue[i][j][1]+"</td><td>"+(returnValue[i][j][2]*100).toFixed(2)+"%</td></tr>"
}
replacement += "</table>"
}

$("#results").html(replacement).fadeIn("normal")
});
}
$(function() {
setAutoComplete("itemname","hint","dropcalc.php?names=");
});
// ]]></script>
</p>
<div>
<div id="page">
<div id="content">
<div id="box4" class="box">
<h1 id="heading4" class="heading">Drop Calculator for the 5x server</h1>
<p class="heading">You can use this drop calculator to find which mob drops which item with the % chance.<br /> Simply insert the name of the item you are looking for, and click on search.<br /> The results will be displayed below. ~ Enjoy ~<br /> Thank you to Cyfreeze for this custom script.</p>
<div id="form" class="content"><label for="itemname">Itemname:</label> <input id="itemname" name="itemname" type="text" /> <button onClick="searchDB()">Search</button>
Make a file with the above in it.

Ensure paths are correct.

IN GLOBALS, 'NO EDITOR' in Modules disable the bloody thing. Better still uninstall it altogether.

Make a custom module.

Point your frame to it in the Module using normal html.

Assign it to a position that does not exist. (type whatever you want into module position select list).

Insert

Code: Select all

{loadposition 'your named module position'}WITHOUT THE QUOTES
into the position you want in the article.

Hope that helps.

One way but I can think of a few more.

And you are right, inserting an iframe into ANY CMS is a nightmare if you enable ANY WYSIWYG editor. They are designed for those that want to write ARTICLES, not for those that want to code or script.

Not seeing the complete layout I gues you might need the:

Code: Select all

<script src="jquery.js" type="text/javascript"></script>
<script src="jquery_json.js" type="text/javascript"></script>
<script src="jquery_form.js" type="text/javascript"></script>
<script src="dimensions.js" type="text/javascript"></script>
<script src="autocomplete.js" type="text/javascript"></script>
sections as separate includes leading to a separate folder ie, your js folder on root.
You may have to include those in you chosen template head.

Check with:
http://validator.w3.org/
to see how the page validated as you go.
You should not include the:

Code: Select all

<html>
<body>

CONTENT

</div>
</div>
</div>
</div>
</div>
</body>
<html>
In the include, better to use the div's if they are required in the module you are making.
The rest is a no go.
You already have head and body in your joomla template, throws browsers into a turmoil.
You are putting the head and body tags into the body.

People forget who are using iframes in CMS that essentially it is an include.

Why would you repeat scripting that is already there?

Either use:

Code: Select all

<script src="whatever.js" type="text/javascript"></script>
in your page content to call a file, or within the page content to show what the script is.
Not twice, ie not in the called file and the page calling the file.

I know I keep doing this but see:

http://winfoes.co.uk/dldocs/JoomIframe.php

and:

http://cybercapital.co.uk/j-module/joomla-wrapper

look into source, it might help you out.

Follow all the links too.

Grim Reaper
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Aug 24, 2009 8:43 am

Re: Usage of <iframe> in joomla

Post by Grim Reaper » Sat Sep 05, 2009 5:37 am

Thank you so much for this tutorial.
Worked like a charm :p


Locked

Return to “Development”