TinyPortal

General => Chit chat => Topic started by: fenris_w0lf on January 29, 2006, 11:19:43 PM

Title: iframe woes
Post by: fenris_w0lf on January 29, 2006, 11:19:43 PM
I have this HUGE html that i have iframed, and it seems to get all garbled up whenever I scroll beyond a certain "limit":

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.federationofkings.com%2Ffiles%2Ftemp%2FImage9.jpg&hash=25ae6eb1f9938a7416775bcca643b8b755060583)

Whenever I (using same browser Firefox 1.0.7 - in same session) open the same html file directly, or use Internet Explorer it displays just fine:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.federationofkings.com%2Ffiles%2Ftemp%2FImage10.jpg&hash=868d1d3980465bebc8eaa7ae603fea0690243132)

I've used the javascript-fix for adjusting the height. My iframe tag is this one (alltho I've tried many versions, removing variables like frameborder, align, scrolling, height etc, also tried to change them like "no" and "yes" for scrolling etc)

<iframe id="ircchatstats"
src ="/files/irc/irc_stats.html"
align="left"
frameborder="1"
height="100%"
scrolling="auto"
width="100%">
</iframe>


Any ideas ?
Title: Re: iframe woes
Post by: Rasyr on January 29, 2006, 11:50:20 PM
Where is it pulling its information from?

You might be better off making it into a PHP article maybe. I am not sure but it would seem that loading it into the iframe is apparenty causing some wierd things.

And if you are wanting it to scroll in the php or html article, that is not a problem,  I am sure we can fix that as well (using a div tag with overflow set to auto should work - it is what I did on my site for the list of users online (I tend to have 20-50 online at any given time)).
Title: Re: iframe woes
Post by: gerrymo on January 30, 2006, 12:07:04 AM
Change scrolling to yes, not auto. Change the height to a fixed number of pixels, it shouldnt be a percentage (that doesnt work for height, only width).
Title: Re: iframe woes
Post by: fenris_w0lf on January 30, 2006, 01:05:53 AM
Rasyr,
the html file gets updated every 15mins by ftp. Is it still possible with php ?

gerrymo,
I use the javascriptfix for height. I'd like it to show the entire html even tho its loooooooong. Using scroll=yes and height=xxxpixels wont do what it does with the javafix. I just tested and it works with no garble the way you say (without the javascriptfix) but it wont display the way I'd like it to... ://

both:
as mentioned it works fine with IE
Title: Re: iframe woes
Post by: Rasyr on January 30, 2006, 02:35:17 AM
Quote from: fenris_w0lf on January 30, 2006, 01:05:53 AM
Rasyr,
the html file gets updated every 15mins by ftp. Is it still possible with php ?

Not sure. Would have to see the page code.

Updated by FTP? What are you doing. running some sort of search on things, and it builds the page and uploads it for you?

Title: Re: iframe woes
Post by: fenris_w0lf on January 30, 2006, 11:18:11 AM
QuoteNot sure. Would have to see the page code.
The iframe is here:
http://www.federationofkings.com/index.php?page=10

Direct url to the html is here:
http://www.federationofkings.com/files/irc/irc_stats.html

its quite large :)

QuoteUpdated by FTP? What are you doing. running some sort of search on things, and it builds the page and uploads it for you?

I'm running a irc-bot (windrop) on my home-pc that logs our irc channel. Every 15mins I run a script on my pc that run a program that will turn the regular irc-logs into the statistics seen on that page I linked above. After this a ftp script gets run which upload the resulting html. (the irclog->html program only exists for windows platform)
Title: Re: iframe woes
Post by: Rasyr on January 30, 2006, 11:36:32 AM
ok, you are definitely past my realm of experience here...

I don't see any reason why it should act different inside the iframe than outside it.

What does the code for irc_stats.html look like?

Title: Re: iframe woes
Post by: crip on January 30, 2006, 11:50:18 AM
Your have a nice Forum fenris_wOLF.
    ;)
Title: Re: iframe woes
Post by: fenris_w0lf on January 30, 2006, 11:57:09 AM
Rasyr,
I think I'll just leave it as it is (or perhaps use the fixed height with pixels thing) its ok. To see the code for the file just visit the direct link and choose "View Source" (its HUGE)

crip,
Thanks :) As mentioned other places on these forums, I've only just inherited the admin role (couple of weeks now) All the work before then was done by another person. I've only fixed the chat and a few links here'n'there oh and the members ranks is kinda neat I think :)
Title: Re: iframe woes
Post by: Rasyr on January 30, 2006, 12:42:14 PM
When I tried to look earlier, I got page not found errors... hehe

Found it this time, and it looks like you changed the layout and stuff with it. recently as well.

It also looks like it is working now (other than it is super long, and the iframe isn't scrolling).

Attached is a screen shot of how it is displaying in my browser.


[attachment deleted by admin]
Title: Re: iframe woes
Post by: fenris_w0lf on January 30, 2006, 01:00:35 PM
I see you use Firefox. Does it gets garbled up if you scroll waaaaay down ??  (I see there's no iframe scrollbar, but you can use the one in Firefox to see the bottom of the stats)
Title: Re: iframe woes
Post by: Rasyr on January 30, 2006, 01:12:09 PM
Yes, I can see the whole page in Firefox, I just have to use the main window's scrollbar. It shows up as a single, very long article.

Title: Re: iframe woes
Post by: fenris_w0lf on January 30, 2006, 01:22:36 PM
...and no garbling up near bottom ?

edit: oh..and what version of Firefox you using ??
Title: Re: iframe woes
Post by: Rasyr on January 30, 2006, 02:07:37 PM
There is something wierd going on near the bottom, though I am not sure it is garbling or if it might be an IFRAME issue.

Couple of things I would try.

1) Get rid of that automatic resizing script for the IFRAME (yes, I did a view source ;D ).
2) Don't use percentages for the height and width of the IFRAME - use a static number of pixels.
3) Make sure that scrolling is set to yes.

Alternatively, you might want to take a look at the script that creates that file, and see if perhaps it might be possible for it to create several different files. Split it up into smaller units (i.e. have the personal stats on a separate page (or pages even).

As I said before, this is past my experiences, so all I can do is make guesses here.

It is also possible that perhaps there is some sort of style conflict between the stats page and SMF/TP.  Or perhaps there is a limitation within the IFRAME that we do not know about. I have never really worked with the IFRAME before, so I am not sure.

Title: Re: iframe woes
Post by: fenris_w0lf on January 30, 2006, 02:12:09 PM
I now use:

<iframe id="ircchatstats"
src ="/files/irc/irc_stats.html"
align="left"
frameborder="1"
height="800pixels"
scrolling="yes"
width="100%">
</iframe>


Works fine. I'd rather have the looooooong auto-size-height, but this is ok too :)

Thanks !

Them IRC stats r really nifty eh !??

Here's an example of a chan thats has lived a while longer:

http://home.online.no/~kefriber/gamers/html/irc_stats.html
Title: Re: iframe woes
Post by: Xarcell on January 30, 2006, 02:39:19 PM
Have you tried using this in a php article?



include('files/irc/irc_stats.html');



-Xarcell
Title: Re: iframe woes
Post by: fenris_w0lf on January 30, 2006, 03:33:53 PM
Xarcell,

yes, and for some reason the images linked wont show ://
Title: Re: iframe woes
Post by: Rasyr on January 30, 2006, 04:02:46 PM
Quote from: fenris_w0lf on January 30, 2006, 03:33:53 PM
yes, and for some reason the images linked wont show ://

path issues....

Your scripts place all of the images in the same folder as the stats page. When you use the IFRAME, it is loading the page from the folder, and thus the path to the actual page is the same.

However, when you use the PHP include, the resulting page is in the forum's root directory, thus it is looking for the images in that root directory as well. and since they are two more levels down, the images cannot be found.

If you can alter the script so that it gives an absolute path to the images rather than a relative path, that would fix the image problem when using a PHP include.

For example, when it shows the image pipe1v.png, the script writes the image tag and puts the source as src="pipe1v.png". So you would want to change the script if you can so that it writes in src="http://www.federationofkings.com/files/irc/pipe1v.png" instead. If you can do that, the file should work as a PHP include
Title: Re: iframe woes
Post by: fenris_w0lf on January 30, 2006, 05:44:07 PM
Ah - yes ofcourse. Another "workaround" would be to move the images to the root ?

..but really, I think I'm gonna leave it as it is now - and move on to my next "mini-project" (mebbe I even manages to fix that without bothering you guys...it COULD happen!!! lol )

Thanks anyways :)
Title: Re: iframe woes
Post by: Xarcell on January 31, 2006, 04:52:36 AM
Do you want the stats to show up on a page by itself, but with SMF? No blocks? So it would hsow the whole page?
Title: Re: iframe woes
Post by: fenris_w0lf on January 31, 2006, 09:20:46 AM
Xarcell,

I originally wanted it to show as it did in the ultraloooong iframe, with SMF and blocks etc around, with 100% widht and 100% height - auto-scrollbars, only without the garbling at the end. But really - I've left this now and I'm quite happy with how it is.
Thanks tho! :)
Title: Re: iframe woes
Post by: Xarcell on January 31, 2006, 08:27:41 PM
maybe you should try this. I think you would like it better, but your left/right blocks aren't gonna show.

Go to SMF and d/l the "static page mod". Use that, and create a link to it in your menu.