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

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 05:04:58 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 174
  • Total: 174

[How-TO]: World of Warcraft Website Design v1.3

Started by Inny, May 02, 2009, 11:11:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maldave

#30
Quote from: Inny on June 23, 2009, 04:36:19 PM
in Your index.template i can see:


<script type="text/javascript" src="http://www.skyline-mmo.eu/Themes/default/IframescriptII.js?fin11"></script>


So you need to fix that path.

Change it to:

<script type="text/javascript" src="http://www.skyline-mmo.eu/Themes/overview_tp10/IframescriptII.js?fin11"></script>



The line that I have in index.template is;

<script type="text/javascript" src="', $settings['default_theme_url'], '/IframescriptII.js?fin11"></script>';

I have put the script file both in the default theme and my own theme and still it doesn't work.

Inny

In your script file (IframescriptII.js) i see the <script> tags.

the script file should contain:

/***********************************************
* 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? 100 : 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+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

maldave

Quote from: Inny on June 23, 2009, 05:15:38 PM
In your script file (IframescriptII.js) i see the <script> tags.

the script file should contain:

/***********************************************
* 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? 100 : 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+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


Ok I updated IframescriptII.js with what you wrote and still have same problem ;(

maldave

#33
Hmm,

Ok I tried to reload the page serveral times and it worked 1 in 5 tries when I updated it, but once I updates the page again only the top is shown.

Inny

can you post me the code you use in article?

it seems it wont be fully functional with EQDKP Plus

maldave

Quote from: Inny on June 23, 2009, 05:40:32 PM
can you post me the code you use in article?

it seems it wont be fully functional with EQDKP Plus

The code that I use in the article is;

<iframe id="myframe" src="/eqdkp/" marginheight="0" vspace="0" hspace="0" scrolling="no" width="100%" frameborder="0">none</iframe>

maldave

#36
Quote from: maldave on June 23, 2009, 05:48:24 PM
Quote from: Inny on June 23, 2009, 05:40:32 PM
can you post me the code you use in article?

it seems it wont be fully functional with EQDKP Plus

The code that I use in the article is;

<iframe id="myframe" src="/eqdkp/" marginheight="0" vspace="0" hspace="0" scrolling="no" width="100%" frameborder="0">none</iframe>

Ok I solved it by inputting height="1200" in the code. I mainly wanted this script to adjust the width, since height has no real meaning since you can just scroll down if you are running on a lowres screen.

This is the new code I use now;

<iframe id="myframe" src="/eqdkp/" marginheight="0" vspace="0" hspace="0" scrolling="no" width="100%" frameborder="0" height="1200">none</iframe>

I tried to use height="100%" but that didn't work as I got the same problem as before.
Anyways I'm happy now, the autoconfiguration of the width was the most important part but I would like to have known what was wrong with it from the beginning and not beeing able to use height="100%" ^^

IchBin

Why does src=\"eqdkp\" have the escaping "\" character in it?

maldave

Quote from: IchBinâ„¢ on June 23, 2009, 11:24:45 PM
Why does src=\"eqdkp\" have the escaping "\" character in it?

Hehe no idea :D it works without them as well;

<iframe id="myframe" src="eqdkp" marginheight="0" vspace="0" hspace="0" scrolling="no" width="100%" frameborder="0" height="1200">none</iframe>


Inny

If you put height in the iframe then you dont need the iframe script.

Your problem with the automatic height lies on EQDKP Plus from what i can see.