Your stats: 32 FRH Tomfuel : kler 32 FRH Julien V. : j'était déja pas hyper motivé avant la course 32 FRH C-quad : pourquoi le pit ? 32 FRH alucaRd : c'est pas pour faire mon rabas joie. mais y en a qui devrais ar HERE 32 FRH alucaRd : drapeu bleu 32 FRH Tomfuel : FRH _-Z-_ - belle bagarre ^^ 32 FRH _-Z-_ : FRH Tomfuel - yep j'ai ete plus prudent qu'avec jul HERE
Username
Nickname
date of PB
Time of PB
Car
Time
Track
Split1
Split2
Split3
You have a prgramm at FRH Team website who display this file on your website, it's lapperdisplay. I Update this archive with the new version tomorrow ( wait a bit ) . The last version can read the old PB file and the new.
There is one change to FRH mod lapper give by gwendoline.
I change the method of upload to FTP. Now the program use Thread instead of inline code. This is usefull when your ftpconnection is to slow. Lapper is not Blocked by FTP transmission and continue to work
First if you want display result on web using nickname from insim, you will have to set charset to utf-8. this work with all charset but japan no. it's not all. you will have to install in you XP asian charset.
1.Go to Control Panel.
2. Click on Date, Time, Language, and Regional Options.
3.Click on Regional and Language Options.
4.The Regional and Language Options applet appears.
5.Click on the Languages tab.
6.Under Supplemental language support, select the check box beside the applicable language collection: nstall files for East Asian languages
7.Click OK
I try to know how are coded the charset in nickname in the insim packet and i understand anything .
Some exemple:
^4^v^1C^7â„¢^4^v ^7Lolo
^3KñißáL^1þj^7™
^7SERT^4•^5Saturday
the ^# are the color, but for the rest i don't understand. if i look in cfg file the selection of charset are made bye ^J ( Japan ) ^C ( cyrillic ) etc..., but not on nickname in insim.
when an other application read PBfile, it's make a loop to get all line
loop to end of file [INDENT] read racer read car read totaltime read track read split1 read split2 read split3
... [/INDENT]end loop
If you add a line in your PBfile, the new line come in racer in the second iteration of loop and all the data are corrupted.
But if you have one line the prog who read your pbfile can look like this
loop to end of file [INDENT]read line racer = find_field(line, 1 ) car = find_field( line,2 ) totaltime = find_field( line,3 ) track = find_field( line,4 ) split1 = find_field( line,5 ) split2 = find_field( line,6 ) split3 = find_field( line,7 ) .... [/INDENT] end loop
in the future, if you add one or more field in your PBfile in this unique line, a programm can read your PB file without modification. in this case, the user can update Lapper without change anything on his web site .
I hope you understand why it's better.
i understand your point of view if you don't want to change the specification of your file . It's your program, not mine
Gwendoline ask me If it is possible to add in the database the top speed reached during a hot Lap? I say it's possible but i do add a new line in the PB file due to the specification of this file. I think it's not a good idea because one info is in one line, and if i add a new line all applications reading PBfile are desynchronised.
I think the solution is to make a modification of structure in PB file and put all info of pilote/track/car in one line. Then, in the future, when we add a new field, the application reading one line can't use whitout modification this new field and aren't desynchronised.
Exemple:
Now
then:
What do you think about this modification? The racer name must be quoted to prevent bad splitting of line ( because if racer have '|' in racername ) or you can also do 2 line, first for racername, the second containing the data to prevent this desagrement
it's the first time i post in this topic and i have two questions
1 - Can lfsstat save in a file a lap by lap time? Then i can use it to display the time of all laps of racer in my web site.
2 - what is the format of the tsv file?
I think it's not good have two branch, i prefere you merge my modifications with your programm if you want. Because Gwendoline have good ideas, in the future i can make another modifications and i send this modification to you for merge it.
I don't want have access to CVS server because i do this modifications for my friend and i have another project to finish for LFS. It is a championship application in PHP,Mysql.
Just a little function in PHP for Trimming zero in string:
function strip_zero( $chaine )
{
list($chaine,$rien) = explode(chr(0),$chaine);
return $chaine;
}
To remove color
function strip_color( $chaine )
{
return ereg_replace( "\^[0-9]","",$chaine);
}