TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 926
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 454
  • Total: 454

Wrapping another page within TP...

Started by glaberge, November 25, 2007, 04:11:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

glaberge

Hi~

I am looking for some advice on how to wrap some outside pages into TinyPortal. One of the pages I am looking to wrap in are:

http://www.surprisepull.net/phpRaider/index.php?page=wowevents

Now, I have searched the forums for any similar questions and did see a few. But, I really just want to know if anyone has figured out a way to do this. I have tried using a PHP article-- but I think I am doing something wrong there.

Thanks.

Zetan

Try searching Google for iFrames.

I have several on my site.


glaberge

Quote from: bluedevil on November 25, 2007, 05:22:45 PM
Something like this?

http://www.midwestavalancheclub.com/index.php?action=recalls

I wrapped safercar.gov im my site.

Yes. But, thanks to the iFrames comment. I got it working. Now to just get the autoresize script working and I am good to go. ^_^ Thanks all!

Ken.

Quote from: glaberge on November 25, 2007, 05:42:07 PM
Quote from: bluedevil on November 25, 2007, 05:22:45 PM
Something like this?

http://www.midwestavalancheclub.com/index.php?action=recalls

I wrapped safercar.gov im my site.

Yes. But, thanks to the iFrames comment. I got it working. Now to just get the autoresize script working and I am good to go. ^_^ Thanks all!

Do a search for the auto-resizing iframes and you should find topics about that here on TP... some time back G6 posted one that works great. (I think it was in a topic about the Coppermine gallery)
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

bluedevil

Ken...This is the code you provided to me from G6 awhile back.


/***********************************************
* 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(navigator.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)
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids] : document.getElementById(iframeids)
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+FFextraHeight;
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>

<iframe id="myframe" src="http://www.yoursitehere.com/page_to_display/" marginwidth="0" marginheight="0" vspace="0" hspace="0" style="width: 100%; display: none;" frameborder="0" scrolling="no"></iframe>

Ken.

That looks like the one bluedevil.  :up:
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

This website is proudly hosted on Crocweb Cloud Website Hosting.