[ Back to install ]

PlayerStats

The datafile

The datafile is a text file where all the data about the team are stored. The datafile is divided into three sections, one for parameters, one for player information, and one for match information. The parameter section is started by writing the word Params on its own on a single row. In the same way the player and match sections begin with the words Players and Matches respectively. The sections need to be specified in the order just mentioned. The content of each section is described below. It could also be a good idea to take a look here and here for examples of datafiles.

Params

Parameters are specified with the following syntax:

Name of parameter=value of parameter

The following parameters can be set:

PlayerImageBaseURL

Description
PlayerStats can show an image of each player along with the statistical information. This parameter specifies the directory where the player images can be found. The position of the directory should be given either relative to the HTML-document or as a complete URL to the directory. The names of the specific images to be used for the different players are specified in the Players section (see below). Images should be in either GIF or JPEG format and not wider than 125 pixels. Note that this is an optional feature.
Default
same directory as the HTML-document.
Example
If the player images are placed in a directory called 'images' which is in the same directory as the HTML-document, write like this:
PlayerImageBaseURL=images/
Or, to specify a complete URL, write like this:
PlayerImageBaseURL=http://www.site.com/players/images/

PlayerInfoBaseURL

Description
PlayerStats can show a link to a web page with more information about a player. The link is shown in the top right corner of the applet (when a player is selected). This parameter specifies the directory where the player pages can be found. The position of the directory should be given either relative to the HTML-document or as a complete URL to the directory. The names of the specific files to be used for the different players are specified in the Players section (see below). Note that this is an optional feature.
Default
same directory as the HTML-document.
Example
If the player pages are placed in a directory called 'players' which is in the same directory as the HTML-document, write like this:
PlayerInfoBaseURL=players/
Or, to specify a complete URL, write like this:
PlayerInfoBaseURL=http://www.site.com/myteam/players/

PlayerInfoTarget

Description
Specifies where to show the player information pages. Use any of the following values:
Default
_self
Example
PlayerInfoTarget=_blank

MatchLength

Description
Specifies the length of a match in minutes.
Default
60
Example
MatchLength=40


A snippet from the Params-section of a datafile could look like this:

Params
PlayerImageBaseURL=images/
PlayerInfoBaseURL=players/
PlayerInfoTarget=_blank
MatchLength=40

Players

The player section is quite simple. You just list all the players following this syntax:

PlayerID;Last Name;First Name;Position;URL to player image;URL to more info
PlayerID
A number that uniquely identifies the player. No two players can have the same number. The PlayerID is used later in the Match-section of the datafile. A suggestion is to use the player's shirt-number as PlayerID. The PlayerID is only used here in the datafile and is not displayed anywhere in the applet.
Last Name
The player's last name.
First Name
The player's first name.
Position
The position of the player. The following letters can be used:
URL to player image
Should point to an image file of the player. This is an optional item.
URL to more info
Should point to a HTML-file containing more information about the player. This is an optional item.


A snippet from the Player-section of a datafile could look like this:

Players
1;Riddervall;Rolf;g;riddarn.gif;riddervall.html
5;Salming;Börje;d;king.gif;salming.html
2;Fetisov;Vjatislav;d
99;Gretzky;Wayne;f;gretzky.gif;gretzky.html
22;Södergren;Håkan;f;hakan.gif
13;Sundin;Mats;f;sudden.gif;sundin.html

Matches

The match-section is a bit more complicated than the player-section. It contains information about all the played matches. Each match is described by seven rows where every row is one piece of information about the match. The headlines for the rows are:

Match

Description
The Match-part gives general information about the match. The match is specified by entering the date of the match, the opponents, and the place (home or away). For the date, any format can be used but it's recommended to use a short format like date/month (for example: 15/5). The place is specified by entering h for home and a for away (road).
Example
Match=24/10;Colorado Avalanche;h
Explanation: The match was played at home against Colorado Avalanche on October the 24:th.

Played

Description
Here you enter the players that participated in the game. To identify players you use the PlayerIDs specified in the player section. Just enter the PlayerIDs of all the players separated by semicolons.
Example
Played=1;2;4;6;7;8;10;11;14;15;16;17;20;21;22;24;25;26;27;28

Goals

Description
This is where you enter information about goals scored. Goals are specified by entering the PlayerID of the scorer. You specify assists by entering the PlayerIDs of the assisting player(s), within parenthesis, after the scorer. If the goal was a power-play goals you attach pp at the end, and if it was a shorthanded goal you attach sh.
Example
Goals=28(20);21(26,16)pp;16;2sh
Explanation:

Penalties

Description
Penalty minutes for each player are entered here. You specify penalty minutes by entering the PlayerID of a player, followed by a *, and the number of penalty minutes. If you don't specify a minute value the default value will be two minutes.
Example
Penalties=22*4;21;2*12;24
Explanation:

Plus

Description
Plus is the number of goals the own team scored when a player was on the ice. You specify it in the same way as penalties, by entering the PlayerID, then a *, and finally the number of goals. If you don't write a number the default value will be one goal.
Example
Plus=22;12*2;2;9*3
Explanation:

Minus

Description
Minus is identical to plus except it concerns goals scored by opponents when a player was on the ice. You specify it in the same way as plus, by entering the PlayerID, then a *, and finally the number of goals. If you don't write a number the default value will be one goal.

Goalies

Description
Information about goaltenders is entered here. You enter the PlayerID of the goalie followed by the number of shots against (including goals), number of goals against, and the number of minutes played (if he didn't play the entire game). You can also enter goals in empty net by writing en and the number of empty net goals.
Example
Goalies=31(23,3)
Explanation: Goalie number 31 played the entire game (60 minutes). He faced 23 shots and let 3 goals in.
Example
Goalies=31(12,5,20);1(25,1)
Explanation: Goalie number 31 played 20 minutes of the game. He faced 12 shots and let 5 goals in. Goalie number 1 played the remainder of the game (60-20=40 minutes). He faced 25 shots and let 1 goal in.
Example
Goalies=1(26,2);en(1)
Explanation: Goalie number 1 played the entire game. He faced 26 shots and let 2 goals in. One additional goal was conceded in empty net (the total number of goals against were 3).


A snippet from the Match-section of a datafile could look like this:

Matches
Match=Luleå;21/9;a
Played=1;2;4;6;7;8;10;11;14;15;16;17;20;21;22;24;25;26;27;28
Goals=21(26);10(17,2);24(17,10)pp;16(28,2)sh;21(16,2)pp
Penalties=28;14*4;21;24;7
Plus=2*3;4;6*2;7*3;24;10*2;14;16*3;17*2;21*2;26*2;28
Minus=4;6*2;24;10*2;14;17*2
Goalies=15(25,2)

Match=AIK;25/9;h
Played=1;2;4;6;7;8;10;11;14;15;16;17;20;21;22;24;26;27;28;29
Goals=6(21,16)pp;7(16)
Penalties=21*4;7
Plus=2*2;6;7;16*2;21*2;26*2
Minus=2;6;7;29;10;16;17;21;26
Goalies=15(18,2)

Important notes

There are a few things that are important to remember when entering the data.

PlayerStats does not perform any logical control of the data entered. For instance, it's possible to credit goals to players who weren't specified in Played (i.e. didn't play in the match) without getting an error message. So you need to be very careful when you enter the data.

It's safe to omit rows if that event didn't occur. For instance, if there were no goals in the game you don't have to enter an empty Goals-row.

[ Back to install ]
Copyright © 1998 Mats Bovin.
Comments can be sent to mats-bov@dsv.su.se