(X)Aseco+RASP Website Stats v2.3

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Website Stats for TMF XAseco+RASP v2.3

Post by Ant » 28 Jul 2010 16:00

sn3p wrote:Back from holidays! 8)
Welcome back :)
sn3p wrote:Updated the download package according to the problems described below.
Fisch.666 wrote: 1. The stats are trying to open the flag of a homezone but this flag doesn't exist on the trackmanianforever.com page.
I noticed some homezone flags could not be retrieved from the TMNF webserver because they simply don't exist. I updated the code: if a nation/homezone flag doesn't exist on the webserver it skips including the flag in the banner.
I'm sure this was solved in v2.2 with the use of the OTH.png flag - which is a "?" flag icon that gets used for any flags it doesn't have.

EDIT--> All flags are found in the xaseco-stats/img/flags directory.

sn3p
cyclist
cyclist
Posts: 37
Joined: 05 Jul 2010 23:52
Owned TM-games: TMNF
Location: Groningen, The Netherlands

Re: Website Stats for TMF XAseco+RASP v2.3

Post by sn3p » 28 Jul 2010 20:01

Ant wrote: I'm sure this was solved in v2.2 with the use of the OTH.png flag - which is a "?" flag icon that gets used for any flags it doesn't have.

EDIT--> All flags are found in the xaseco-stats/img/flags directory.
For some banners the flags are fetched from trackmanianforever.com, and some banners use the flags from /img/flags directory. Not sure why that is, but i'm too lazy to fix that atm ;) So I'll leave the check for now. This is especially needed for the homezone flags, since they are not included in the /img/flags directory, and some of them are not available online. IE:
http://flags.trackmaniaforever.com/static/Londen.jpg
http://flags.trackmaniaforever.com/static/Hannover.jpg

I also noticed UKN.png is a "?" flag, prolly has the same purpose as OTH.png?
(X)Aseco+RASP Website Stats v2.3
DOWNLOAD | EXAMPLE

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Website Stats for TMF XAseco+RASP v2.3

Post by Ant » 28 Jul 2010 23:16

I think UKN might stand for unknown so yeah maybe it does. By the way, is it possible that if no homezone flag can be found either on trackmaniaforever.com or in the flags directory, that OTH.png or UKN.png is displayed instead ?

User avatar
Fisch.666
happy cruiser
happy cruiser
Posts: 136
Joined: 18 May 2006 01:13
Owned TM-games: TMU, TMN, TMUF, TMNF
Location: Germany
Contact:

Re: Website Stats for TMF XAseco+RASP v2.3

Post by Fisch.666 » 29 Jul 2010 06:33

Hi sn3p,

thanks for this update. Most of the errors are gone, but there is another new one. You are using a function "getNationFlagUrl()" in the playerstats.php which can't be found:

Code: Select all

[29-Jul-2010 08:31:16] PHP Fatal error:  Call to undefined function getNationFlagUrl() in /tmnfstats/playerstats.php on line 183
[29-Jul-2010 08:31:16] PHP Fatal error:  Call to undefined function getNationFlagUrl() in /tmnfstats/playerstats.php on line 162

sn3p
cyclist
cyclist
Posts: 37
Joined: 05 Jul 2010 23:52
Owned TM-games: TMNF
Location: Groningen, The Netherlands

Re: Website Stats for TMF XAseco+RASP v2.3

Post by sn3p » 29 Jul 2010 11:47

Updated files in the download package:
/includes/functions.php
/playerstats.php
Ant wrote:I think UKN might stand for unknown so yeah maybe it does. By the way, is it possible that if no homezone flag can be found either on trackmaniaforever.com or in the flags directory, that OTH.png or UKN.png is displayed instead ?
Done! It now also displays the flag on a variable x position depending on the length of the homezone text.
Fisch.666 wrote:Most of the errors are gone, but there is another new one. You are using a function "getNationFlagUrl()" in the playerstats.php which can't be found
My bad, forgot to update functions.php in the download package ;)
(X)Aseco+RASP Website Stats v2.3
DOWNLOAD | EXAMPLE

User avatar
Fisch.666
happy cruiser
happy cruiser
Posts: 136
Joined: 18 May 2006 01:13
Owned TM-games: TMU, TMN, TMUF, TMNF
Location: Germany
Contact:

Re: Website Stats for TMF XAseco+RASP v2.3

Post by Fisch.666 » 29 Jul 2010 12:19

Thanks again, works now without a problem. :thumbsup: :3

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Website Stats for TMF XAseco+RASP v2.3

Post by Ant » 29 Jul 2010 14:45

Nice one man, just gotta get me a London flag now !

Image

sn3p
cyclist
cyclist
Posts: 37
Joined: 05 Jul 2010 23:52
Owned TM-games: TMNF
Location: Groningen, The Netherlands

Re: Website Stats for TMF XAseco+RASP v2.3

Post by sn3p » 30 Jul 2010 09:35

Updated files in the download package:
/includes/functions.php
/playerstats.php
/readme.txt
Ant wrote:Nice one man, just gotta get me a London flag now !
Oh you mean you want the possibility to add a flag yourself if it doesn't exist?
Had to make some adjustments for that to work.

MISSING HOMEZONE FLAGS:
Some homezone flags seem to be missing on the tmnf webserver. Missing homezone flags can be added manually in the /img/flags/zone directory. Make sure they are in PNG format and have the same name as the zone they represent, IE: London.png. For the best result make sure the flags are square images with dimensions of 12x12 pixels, if not they will be automatically resized. If a flag is missing and not found in this directory, banners show the unknown flag "?".
(X)Aseco+RASP Website Stats v2.3
DOWNLOAD | EXAMPLE

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Website Stats for TMF XAseco+RASP v2.3

Post by Ant » 30 Jul 2010 15:28

sn3p wrote: Oh you mean you want the possibility to add a flag yourself if it doesn't exist?
Had to make some adjustments for that to work.

Well I didn't mean that, but that is very handy - nice work man :thumbsup:

Image

Also the homezone flags that you have as 12x12, I think would be better to have as 18x11 like the others.

sn3p
cyclist
cyclist
Posts: 37
Joined: 05 Jul 2010 23:52
Owned TM-games: TMNF
Location: Groningen, The Netherlands

Re: Website Stats for TMF XAseco+RASP v2.3

Post by sn3p » 30 Jul 2010 15:59

Ant wrote:Also the homezone flags that you have as 12x12, I think would be better to have as 18x11 like the others.
I thought the same, but then I noticed all homezone flags are square images, IE:

Image

12x12 isn't really necessary since the script will resize, but square images will give you the best result. In version 2.2 the homezone flags were stretched which didn't look so great imo.
(X)Aseco+RASP Website Stats v2.3
DOWNLOAD | EXAMPLE

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Website Stats for TMF XAseco+RASP v2.3

Post by Ant » 30 Jul 2010 16:17

Well that image is 128x128 - I don't think it will look that bad scaled down to 18x11.

EDIT--> Just found this though

Image
http://flags.trackmaniaforever.com/static/England.jpg

Which could be problematic for a lot of people in England or UK anyway with these stats, cos my homezone in the banner says London but the flag for London will obviously be Englands flag - same for a lot of other English citys.

sn3p
cyclist
cyclist
Posts: 37
Joined: 05 Jul 2010 23:52
Owned TM-games: TMNF
Location: Groningen, The Netherlands

Re: Website Stats for TMF XAseco+RASP v2.3

Post by sn3p » 31 Jul 2010 13:00

Ant wrote:Well that image is 128x128 - I don't think it will look that bad scaled down to 18x11.
I'm no fan of unproportional scaling, but if you think it's nicer I can change it ;)
Ant wrote:Which could be problematic for a lot of people in England or UK anyway with these stats, cos my homezone in the banner says London but the flag for London will obviously be Englands flag - same for a lot of other English citys.
I'm not sure if i understand what you mean. England is a country flag and will never be used as a zone flag if I'm correct, unless you save it as ie. London.png in the img/flags/zone/ directory. Is that what you did? Not sure when the England flag is used since your banner shows GBR flag, not England.
(X)Aseco+RASP Website Stats v2.3
DOWNLOAD | EXAMPLE

azra
highway camper
highway camper
Posts: 4
Joined: 12 Apr 2010 17:01
Owned TM-games: tmo,tmu,tms

Re: Website Stats for TMF XAseco+RASP v2.3

Post by azra » 31 Jul 2010 14:17

Hi I have a problem with some firms and others are not, the error code gives me is as follows:

<b>Warning</b>: imagecreatefromgif() [<a href='function.imagecreatefromgif'>function.imagecreatefromgif</a>]: Filename cannot be empty in <b>C:\xampp\htdocs\azra\playerstats.php</b> on line <b>163</b><br />
<br />
<b>Warning</b>: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: Filename cannot be empty in <b>C:\xampp\htdocs\azra\playerstats.php</b> on line <b>164</b><br />
<br />
<b>Warning</b>: imagecopy() expects parameter 2 to be resource, boolean given in <b>C:\xampp\htdocs\azra\playerstats.php</b> on line <b>173</b><br />
<br />
<b>Warning</b>: imagecopyresampled() expects parameter 2 to be resource, boolean given in <b>C:\xampp\htdocs\azra\playerstats.php</b> on line <b>174</b><br />
‰PNG


this is in local for taste all, im have the same problen in the web stats in internet.


Could someone help me? thx ^^

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: Website Stats for TMF XAseco+RASP v2.3

Post by Ant » 31 Jul 2010 18:08

sn3p wrote:
Ant wrote:Well that image is 128x128 - I don't think it will look that bad scaled down to 18x11.
I'm no fan of unproportional scaling, but if you think it's nicer I can change it ;)
Cool man i'll wait for that change then - if you do it that is.
sn3p wrote:
Ant wrote:Which could be problematic for a lot of people in England or UK anyway with these stats, cos my homezone in the banner says London but the flag for London will obviously be Englands flag - same for a lot of other English citys.
I'm not sure if i understand what you mean. England is a country flag and will never be used as a zone flag if I'm correct, unless you save it as ie. London.png in the img/flags/zone/ directory. Is that what you did? Not sure when the England flag is used since your banner shows GBR flag, not England.
I know England is a country flag, thats why I get the unknown flag for london - other places like yorkshire, east midlands etc will also probably have this problem - they'll need to use the England flag for their zones. Look at the banner below - 3rd time I'm posting it now though - it has london as my zone and needs to get a flag for it, so yes i'm using the St Georges Cross as London.png.


Image

I hope you know what I mean now. :)

EDIT--> For example, look at this one

Image

EDIT--> I have updated the English Zone flags on my site now - got em from Maniazones :thumbsup:
Last edited by Ant on 03 Aug 2010 17:38, edited 1 time in total.

sn3p
cyclist
cyclist
Posts: 37
Joined: 05 Jul 2010 23:52
Owned TM-games: TMNF
Location: Groningen, The Netherlands

Re: Website Stats for TMF XAseco+RASP v2.3

Post by sn3p » 03 Aug 2010 12:02

azra wrote:Hi I have a problem with some firms and others are not, the error code gives me is as follows:
...
this is in local for taste all, im have the same problen in the web stats in internet.
I'm not sure what the problem is, but I think it may be your xamp installation that's having problems. What countries/flags have problems loading?
Ant wrote:I know England is a country flag, thats why I get the unknown flag for london - other places like yorkshire, east midlands etc will also probably have this problem - they'll need to use the England flag for their zones. Look at the banner below - 3rd time I'm posting it now though - it has london as my zone and needs to get a flag for it, so yes i'm using the St Georges Cross as London.png.
I think I understand now: all England players should get a England flag for their zone? Tbh I think this is a TMNF issue, their webserver should provide the flags but it doesn't. The only solution I can think of is adding the flags manually in the /img/flags/zone directory or provide them preinstalled so they are already there. Let me know what you think I should do so.
(X)Aseco+RASP Website Stats v2.3
DOWNLOAD | EXAMPLE

Post Reply