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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 202
  • Total: 202

Aion Status in webpage

Started by nitrotrike, September 30, 2009, 10:37:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Freddy

#10
LOL, well not bad - you can't use PHP in an HTML document, it needs to be a PHP document.

But all is not lost, you can leave your working status page where it is and use an iframe to grab it.

So first set the width of the DIV like I said to about 200px (in the PHP file).

Then on your HTML page you can do something like this :

<iframe src="http://yoururl.com/status.php" scrolling="no" frameborder="0" width="210" height="400">
</iframe>

So that needs to go in the body and where you need to use it - you'll probably need to do some shuffling around with your existing HTML to accommodate it.

You will just need to fiddle with the DIV width and the iframe's width and height to get it how you like.

nitrotrike

You, sir, are a genius.. I was about to just scrap the whole idea.

Now.. is there a way to have this thing refresh without reloading the home page?

Not a big deal I suppose, but it would be neat to watch the numbers change =]

Gax

Updated with new servers.

Wasn't sure about him doing it outside of TP, but I knew he didn't have it in a php file/block. ;)

Freddy

#13
Yes there is a way...

Assuming your PHP page is called 'status.php'...add the bold line to the first echo statement and before the style tag, like so.

echo'
<meta http-equiv="refresh" content="5;url=status.php">
<style type="text/css">
body, table {
   font-family: Tahoma, Verdana, Arial, sans-serif;
   font-size: 11px;
   font-weight: bold;
}

The 5 in there is the number of seconds for each refresh, so just change that to whatever works best.  I just did 5 seconds because it's fast and that way you can see it works.  You won't be able to refresh a lot quicker than that because you have to account for the actual page loading, even though it's a little iframe it still has to do a bit of work.

Freddy

Quote from: Gax on September 30, 2009, 02:57:25 PM
Updated with new servers.

Wasn't sure about him doing it outside of TP, but I knew he didn't have it in a php file/block. ;)

Hehe, I am on the ball today ;)  I'm still undecided about trying this game, it looks good though.

nitrotrike

#15
Freddy... sorry to be a pest on this subject, but I was just testing this using IE.. and I can't seem to get rid of the white background no matter what I do. In FF, it looks great!

*ok, i figured out the transparency issue - used the allowtransparency="true" in the iframe code you gave me freddy*

But, now, when it auto-refreshes, on FF I still get the flicker of a white window, and on IE I do not... I can't win here  :tickedoff:

The height is also off on IE.

I haven't tried it on Safari yet, but I feel like I am in for a rude awakening.

You are great help for a noob like me!

Any Ideas on the height differences?

Freddy

Hi Nitro,

No problem...  the height issues are probably being caused by the different browsers adding margins to the PHP generated page.  That can be fixed.  I don't know how well you know HTML, but you can attach your PHP file and I will take a look at it.

Basically I would just be setting the margins to zero, which should make it the same in all browsers, then you'd just have to tweak the iframe a bit.

The flicker in FF is probably caused because the background of oyour PHP generated file is white.  So I would look to set up a background colour for that.

But yeah I can take a look at it.  I'm running late here and have to rush out.  I'll post back later what I need from you.

Cheers.

Freddy

Ok if you want me to look at it I need :

  • Your php code.
  • Your iframe code.
  • The colour code for the background you want
  • A link to your site might be handy so I can see how you are using it.

nitrotrike

#18
Sorry for not getting back to you sooner, but here's the down n' dirty.. and I'm about to give up..

I wanted to change the background picture to a scroll of old paper, because they changed the theme of the main page. I am lost. I can get the image behind it (a jagged piece of paper in .gif format), but cannot get rid of the background flicker around the border of the jagged paper when it reloads.

The site is aionhelios.com (don't laugh, it's a freebie for someone)

The iframe code I am using is:

<iframe src="http://aionhelios.com/status.php" scrolling="no" frameborder="0" width="200px" height="425px" style="border:1.0px #DFBD99 solid;" cellpadding="0" cellspacing="0" vspace="0" hspace="0" allowtransparency="true"></iframe>


As you can see, i've been trying everything imaginable to get this flicker to stop (i know, the code is a mess - that's why I am asking for help!). I also was able to shift the text down once before, but now I cannot remember how I did it?? Thsi is driving me nuts, and I KNOW it's something stupid that I am overlooking..

Also, I always forget - does it have to be a gif, or a png to do the transparency? (just want to make sure when they decide to change the background picture again)

I was able to get the left border to stop flickering - somehow, but then I changed something, and now it's back...

The things i changed in the php file is:

table {
   font-family: Tahoma, Verdana, Arial, sans-serif;
        color:#3F2109;
        font-size: 12px;
        font-weight: fine;
        text-align: center;
        text-indent: 2px;
}
body {
        background-image:url(images/bg_wrap.gif);
        width:100%;
        height: 100%;
        background-color:transparent;
 
     
}


IchBin

What version of FF are you using? I don't see an flicker of white when it reloads at all in my 3.0.10 and 3.5.3 version of FF.

This website is proudly hosted on Crocweb Cloud Website Hosting.