Image that is charging?

If you have anything to say - or advice to give - on the creation or publishing of ManiaLinks, here is the place to do it!

Moderator: TM-Patrol

Post Reply
Pastis
sunday driver
sunday driver
Posts: 53
Joined: 21 Jan 2010 20:20
Owned TM-games: tmu
Manialink(s): LFT
Location: Nancy France

Image that is charging?

Post by Pastis » 01 Apr 2011 09:53

Hello

Here d like to put this image on my manialink!
I know how, but I love that image to recharge every time!

This image changes every 6 minutes!
I want when entering the page or image is located, which is charging!


My code now is

Code: Select all

<quad sizen="46.8 6" posn="0 0 1" halign="ceneter" valign="center"image="http://serverviewer.svenstucki.ch/render.682.png" />
I miss that on?

Thank you for your help

pastis

User avatar
Knutselmaaster
swift roadking
swift roadking
Posts: 692
Joined: 16 Feb 2007 01:40
Owned TM-games: TMO/TMN/TMNF/TMU
Manialink(s): intr
Location: Between DisneyLand and Paris
Contact:

Re: Image that is charging?

Post by Knutselmaaster » 03 Apr 2011 21:25

Well, the first time a players client gets the address, it will put the image in his cache.
Every next time the same "adress-file" is called, it will not download it but take it from the cache.
So, to make it work you will have to find a way that is automatically renames every time, and that surely won't be easy.

why don't you just connect to your server with xmlrpc to show the player information, and use the tmx api to get the track info?
That won't be easy neither, but i think it will be less hard to achieve than trying to rename the serverviewer image for every track..

User avatar
svens
speedy pilot
speedy pilot
Posts: 304
Joined: 05 Dec 2009 23:30
Owned TM-games: TMUF, TMS, TMO
Location: Bern, CH
Contact:

Re: Image that is charging?

Post by svens » 04 Apr 2011 16:06

You could try to add a timestamp parameter to the filename. This will require PHP for your manialink and I'm not sure if this is enough to trick the cache.

Code: Select all

<quad sizen="46.8 6" posn="0 0 1" halign="ceneter" valign="center"image="http://serverviewer.svenstucki.ch/render.682.png?time=<?php echo time(); ?>" />
Does anyone know if TM can handle caching related HTTP headers?

Pastis
sunday driver
sunday driver
Posts: 53
Joined: 21 Jan 2010 20:20
Owned TM-games: tmu
Manialink(s): LFT
Location: Nancy France

Re: Image that is charging?

Post by Pastis » 05 Apr 2011 14:37

Not not work.

Thank you to you: :)

pastis

User avatar
svens
speedy pilot
speedy pilot
Posts: 304
Joined: 05 Dec 2009 23:30
Owned TM-games: TMUF, TMS, TMO
Location: Bern, CH
Contact:

Re: Image that is charging?

Post by svens » 05 Apr 2011 17:43

Code: Select all

http://serverviewer.svenstucki.ch/render.682.<?php echo time(); ?>.png
You can now use an URL like this. This should definitely solve any caching problems. (But it of course requires PHP again.)

User avatar
Knutselmaaster
swift roadking
swift roadking
Posts: 692
Joined: 16 Feb 2007 01:40
Owned TM-games: TMO/TMN/TMNF/TMU
Manialink(s): intr
Location: Between DisneyLand and Paris
Contact:

Re: Image that is charging?

Post by Knutselmaaster » 05 Apr 2011 17:57

nice one!
Thanks Svens :thumbsup:

Post Reply