PDA

View Full Version : p95 IFrame Wrapper


abcohen
07-25-2005, 08:26 PM
Here is IFrame Wrapper 1.0...

http://www.subdreamer.org/sd_plugins/p13_s.../3/p13_fileid/4 (http://www.subdreamer.org/sd_plugins/p13_sectionid/3/p13_fileid/4)

There wont be a screen shot from my end we all know what an IFRAME (aka inline frame) is...

Options/Settings
----------------
*point to source
*adjustable height
*adjustable width
*give target name
*set border on/off
*set scroll control
*set on/off Alt text
**alt text
**alt link
**set alt link to open new window

jennec
08-11-2005, 08:17 AM
Very usefull plugin. I use this for giving the impression that my KB is intergrated into my site. Thanks.

There is only one issue I have with t though, is that my KB can have varying page lengths depending on the amount of content within an article. is there anway to modify the plugin to adjust itself automatically to the length of the page it is displaying?

abcohen
08-11-2005, 01:10 PM
Originally posted by jennec@Aug 11 2005, 04:17 AM
Very usefull plugin.* I use this for giving the impression that my KB is intergrated into my site.* Thanks.

There is only one issue I have with t though, is that my KB can have varying page lengths depending on the amount of content within an article.* is there anway to modify the plugin to adjust itself automatically to the length of the page it is displaying?
496


Sorry, but iFrames dont work like that... you're required to place height (perhaps you can try a hieght with a % at the end (ie. 100%) but I dont think that'll work...

jennec
08-11-2005, 01:13 PM
Originally posted by abcohen@Aug 11 2005, 02:10 PM
Sorry, but iFrames dont work like that...* you're required to place height* (perhaps you can try a hieght with a % at the end (ie. 100%) but I dont think that'll work...
500



Yeah already had a go at that, and the results were that the page displayed in a box about 10 pixles high. Thanks anyway.

utw-mephisto
08-16-2005, 08:40 PM
Hi,

one question. Am I right that I can use the plugin only for one webpage within the iframe ?

I would like to use two URLs with two different iframes ?!?

Terminator1138
08-16-2005, 08:55 PM
u could clone the plugin if u had the pro version

utw-mephisto
08-21-2005, 10:39 AM
Originally posted by Terminator1138@Aug 16 2005, 08:55 PM
u could clone the plugin if u had the pro version
710


soon :)

tokenyank
08-21-2005, 07:51 PM
iframe is great, but a lot of new security packages (like NIS) and default IE security settings disable iframe's... Which kinda defeats the purpose of this...

I'd like to see what someone else requested on sd.com... For a specific header/footer file to be generated once the skin is inplace...

For example, when you skin your forums, it just takes the skin and wraps it around the forums using the forum's header and footer styles... Why couldn't another function be added to SD so that you click 'Generate Header/Footer'....

I don't know, don't mind me... I'm just now finally getting to the point where my SD site is near ready to go live and I'm doing too much thinking!

abcohen
08-24-2005, 03:13 AM
I'll look into a non-iframe solution (but I dont know if includes will work off site)

tokenyank
09-03-2005, 10:12 PM
Originally posted by abcohen@Aug 24 2005, 03:13 AM
I'll look into a non-iframe solution* (but I dont know if includes will work off site)
827

If you could get includes to work like the iframe wrapper, I'd give you a perverbial kiss! ;)

GhostHunter
05-25-2006, 03:49 PM
does this work with php as im trying to use it on a leaderboard index.php and it loads up but just shows the leader board not in a iframe :(

abcohen
05-25-2006, 06:41 PM
I dont really follow your post...
I've used the iframe to pull anything - from yahoo.com to a betmaker php page... worked fine for me.

GhostHunter
05-25-2006, 07:29 PM
http://bornkillersclan.com/

thats my site if u go to leaderboard you will see what i mean

abcohen
05-25-2006, 08:40 PM
the leaderboard page has a protection javascript to break out of iframes

GhostHunter
05-26-2006, 02:13 AM
Thank you abcohen
Removed java out of index works :)

<div class='quotetop'>QUOTE(abcohen &#064; May 25 2006, 09&#58;40 PM) 6223</div>
the leaderboard page has a protection javascript to break out of iframes
[/b]

buga
06-13-2006, 04:42 PM
Anyone try this with Overflow attribute on a div tag instead of IFrame?

&#60;div style=&#34;overflow&#58;auto&#34;&#62;Content or PHP Include&#60;/div&#62;

abcohen
01-18-2007, 01:46 AM
I've updated the code - so you can set different iframes and call them by links
ie: goto = http://www.google.com
site.com/plugins/p95_iframe/1
will then display google as the site in the iframe :)

micron
01-27-2007, 12:22 AM
hello,
could you make an example about how to use multiple iframe id's ?

It's not clear to me where site.com/plugins/p95_iframe/1 should be entered...

Thanks for help

Sal

baxterrj
01-27-2007, 05:17 AM
Ok, I'm very new to subdreamer and its plugins - not sure if its something I'm doing but I'm having an issue with Iframes. I think I have it loaded correctly - it seems to work once, then when you go back and click on the link a second time it seems to load the page in the same window replacing the format of the site.

www.reclamation-kt.com - click on the "roster" and you will see what I mean. Perhaps this PHP app also has some sort of script preventing iframes to work correctly or is it the brousers? (happens with IE and firefox - if I clear the cash and all secruity stuff the page load correctly, once).

abcohen
01-27-2007, 06:53 AM
hello,
could you make an example about how to use multiple iframe id's ?

It's not clear to me where site.com/plugins/p95_iframe/1 should be entered...

Thanks for help

Sal

this probally isnt correct

its probally like this...
site.com/category_where_iframe_is_being_loaded/p95_iframe/1

if you setup links like that it'll change the iframe source to the number that has been setup on the backend

baxterrj
01-27-2007, 06:10 PM
the leaderboard page has a protection javascript to break out of iframes

I think this might be happening here with my setup. I took a look into the .js files associated with the app. "One overlib_hideform.js" looked interesting when I opened it up - something about I frames. I have no idea what any of this is as I do not program can anyone help? I can provide the file, which is in the package from wowroster.net

part of it contains...
//\ See http://www.bosrup.com/web/overlib/ for details.
//\/////
//\ Added for CVS Versioning: * $Id: overlib_hideform.js 2 2006-07-04 03:21:48Z zanix $
//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.10))ale rt('overLIB 4.10 or later is required for the HideForm Plugin.');else{
function generatePopUp(content){if(!olIe4||olOp||!olIe55||( typeof o3_shadow!='undefined'&&o3_shadow)||(typeof o3_bubble!='undefined'&&o3_bubble))return;
var wd,ht,txt,zIdx=0;
wd=parseInt(o3_width);ht=over.offsetHeight;txt=bac kDropSource(wd,ht,zIdx++);txt+='<div style="position: absolute;top: 0;left: 0;width: '+wd+'px;z-index: '+zIdx+';">'+content+'</div>';layerWrite(txt);}
function backDropSource(width,height,Z){return '<iframe frameborder="0" scrolling="no" src="javascript:false;" width="'+width+'" height="'+height+'" style="z-index: '+Z+';filter: Beta(Style=0,Opacity=0);"></iframe>';}
function hideSelectBox(){if(olNs4||olOp||olIe55)return;var px,py,pw,ph,sx,sw,sy,sh,selEl,v;
if(olIe4)v=0;else{v=navigator.userAgent.match(/Gecko\/(\d{8})/i);if(!v)return;v=parseInt(v[1]);}


I don't know, this might be giberish to you too - but the part referencing the i frame and setting the absolutes seems suspicious.

Riki
11-12-2007, 04:19 AM
The thread seemed to start off with this question but I just want to make sure. Is there anyway to have the iframe resize with the page, like a %? I just want to embed some html inside an iframe or whatever frame, I just hate that its a fixed size. If there is anyway around this I would love to hear some ideas.
Thanks!!
Riki.us

Riki
11-12-2007, 04:21 AM
I was doing some searching and found this...is it possible to integrate this into the plugin??
http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

Riki

Riki
11-12-2007, 04:25 AM
I also just found this, I dont know much of what i am doing, but Ill try it and let everyone know.

Ever wonder how to create an iframe that fills the entire height (and width) of a page?
You probably tried writing something like:
<iframe width=100% height=100%></iframe>
and expected the iframe to fill up whatever it could.
The width=100% does what you expected and fills up the entire width of the page, but the height just stays about 200px.

Here's some easy JavaScript to do exactly this:


Put this in the head of your page: <script language="JavaScript">
<!--
function resize_iframe()
{

var height=window.innerWidth;//Firefox
if (document.body.clientHeight)
{
height=document.body.clientHeight;//IE
}
//resize the iframe according to the size of the
//window (all these should be on the same line)
document.getElementById("glu").style.height=parseInt(height-
document.getElementById("glu").offsetTop-8)+"px";
}
// this will resize the iframe every
// time you change the size of the window.
window.onresize=resize_iframe;

//Instead of using this you can use:
// <BODY onresize="resize_iframe()">


//-->
</script>
And inside your page's body create the iframe tag: <iframe id="glu" width="100%" onload="resize_iframe()">
</iframe>

Riki
11-12-2007, 04:35 AM
yeah I dunno what Im doing, i guess Ill just hope that someone who knows what to do will try :p

Riki
01-02-2008, 11:56 PM
anyone try this?

thomas
01-03-2008, 12:05 AM
I havent, but I will when i get a chance.

XhUnTeR
01-03-2008, 01:41 AM
anyone try this?

I used Dynamic Hight (http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm) for the mod "New CSS Menu for Admin Panel (http://www.subdreamer.org/forum/showthread.php?t=2829)" and it works fine on every browser I have tested it except for "Opera"

Riki
01-03-2008, 02:55 AM
interesting, thanks, I installed New CSS and love it! DO you think this would work for the iframe wrapper? I spent too many hours trying to get something like to work with the iframe wrapper, I mean, I put the code in my html file to load, but how do I find the iframe target name? is it the plugin name itself?

Riki
01-03-2008, 03:31 AM
ok, that last post was a dumb one, it has a setting in the plugin that says this

iframe name What should the name of the inline frame be? This will allow you to target links of cotent in the iframe to stay within the iframe.
so I name it, then I make sure in the Dynamic Height script its named the same.

But alas, with the height set to 100%, it still stays stuck with a very small height.

I even tested it with a basic html file

Riki
01-03-2008, 04:49 AM
FINALLY! I got it to work. So just to share how I did it. I turned off the WYSIWYG editor in the main settings, then I created a custom plugin and pasted this (just replace the red with whatever link you want). I tested it with the latest Firefox and IE7, works with my forum or anything. Thanks for all your help xhunter!

<html>
<head>
<title>Setting IFRAME Scrolling attribute using Javascript</title>
<script type="text/javascript">

/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigat or.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextr aHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

</script>
</head>
<body>
<iframe id="myframe" src="put_whatever_link_you_want_here" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>
</body>
</html>

XhUnTeR
01-03-2008, 07:35 AM
very good, happy to be of any help.

Maxxius
05-25-2008, 11:16 PM
I just foud this AMAZINGLY USERFUL! THANKS FOR RESOLVING THE ISSUE BEFORE IT HIT ME FIRST! :) Guys, you're awesome! Respect!

Dominic1966
08-26-2008, 10:05 AM
I tried to create a custom plugin with this code but it did not work as planned.

To see the result, please look at: http://tfmd.org/shooting-people

I'm going to be adding several hundred (!) of these iFrames and it would be invaluable if this worked.

Could you please help me to get it working?