[ Back to install ]
TeamStats
Setting parameters
Parameters can be of two types. They control either the league or the
program. The parameters that control the league can, instead of being set in the HTML-code, be placed in a parameterfile.
The only parameter that has to be set is Matchfile. All the others
can be skipped. If a parameter is not set it will be given a default value.
1. League parameters
1.1 LeagueName
- Description
- Gives the name of the league.
- Default
- -
- Example
- <PARAM NAME=LeagueName VALUE="Premier League">
1.2 Season
- Description
- Gives the season of the league. This is a string and
it can be given in any format, for example: 1996-97, 96/97, 1997 etc.
- Default
- -
- Example
- <PARAM NAME=Season VALUE="1996-97">
1.3 Matchfile
- Description
- The name of the file that contains the matches for
this league (here is a description of the
matchfile). The filename is relative to the HTML-document.
- Default
- -
- Example
- <PARAM NAME=Matchfile VALUE=premier.txt>
<PARAM NAME=Matchfile VALUE=soccer/italy/serie_A.txt>
<PARAM NAME=Matchfile VALUE=../../files/matches.ser>
1.4 LineX
- Description
- Gives the position of one or more qualifying lines
in the table. A line is placed after the table position that is given by
VALUE. You can set this parameter several times but the 'X' in LineX must
be replaced by a number. The first line is called Line1 the second one
Line2 and so on.
- Default
- -
- Example
- <PARAM NAME=Line1 VALUE=1>
<PARAM NAME=Line2 VALUE=2>
<PARAM NAME=Line3 VALUE=10>
<PARAM NAME=Line4 VALUE=12>
- Description
- Use this parameter to specify that the league uses Sudden Death. Here is information on how to specify Sudden Death-matches in the matchfile. Use the ShowSDInTable-parameter if you do not want to see columns for Sudden Death in the table.
- Default
- False
- Example
- <PARAM NAME=SuddenDeath VALUE=true>
- Description
- This parameters specifies if you want to see extra columns for sudden death results in the table. If you don't want to have extra columns set this parameter to false. Note that this parameter has no meaning if SuddenDeath is not set to true.
- Default
- True
- Example
- <PARAM NAME=ShowSDInTable VALUE=false>
1.7 Winpoints
- Description
- Sets the number of points a team gets for winning a match.
- Default
- 3
- Example
- <PARAM NAME=Winpoints VALUE=2>
1.8 Drawpoints
- Description
- Sets the number of points a team gets when a match ends in a draw.
- Default
- 1
- Example
- <PARAM NAME=Drawpoints VALUE=2>
1.9 Losspoints
- Description
- Sets the number of points a team gets for loosing a match.
- Default
- 0
- Example
- <PARAM NAME=Losspoints VALUE=1>
1.10 SDWinpoints
- Description
- Sets the number of points a team gets for winning a match in Sudden Death.
- Default
- 3
- Example
- <PARAM NAME=SDWinpoints VALUE=2>
1.11 SDLosspoints
- Description
- Sets the number of points a team gets for loosing a match in Sudden Death.
- Default
- 0
- Example
- <PARAM NAME=SDLosspoints VALUE=2>
1.12 GDiffSort
- Description
- A parameter that tells TeamStats how to separate two
teams when they have the same amount of points. If the parameter is missing
or set to "true", TeamStats will use goal difference to separate
the teams. If the value is "false", scored goals is used to separate
the teams. (As far as I know this is only used in the English 1st Division).
- Default
- True
- Example
- <PARAM NAME=GDiffSort VALUE=false>
1.13 HideX
- Description
- This parameter is used to hide teams. In some leagues
teams are degraded or promoted during the season. Then you don't want the
team to show in the table but their results should still count. To hide
a team just give the name of the team after VALUE. When a team is hidden
two things happens: the team doesn't show in the table and is not selectable
in the dropdown-boxes where you select teams. Other than that nothing changes.
You can hide several teams. Note that TeamStats doesn't give any
feedback to the user when a team is hidden. So it could be a good idea
to place an explanatory text in connection to TeamStats.
- Default
- -
- Example
- <PARAM NAME=Hide1 VALUE="Leeds">
<PARAM NAME=Hide2 VALUE="West Ham">
1.14 PointsX
- Description
- With this parameter you can give bonus- or penaltypoints
to a team. In some leagues teams can bring points from earlier leagues
or get other kind of bonus points. It also happens that teams get penaltypoints
for different reasons. To give extra points just write the teams name followed
by the points within parenthesis. To give penalty points give a negative
number. These extra points will only affect the current table, i.e. when
All matches and All rounds is selected. The home, away, first and last
tables will not be affected by extra points.
- Default
- -
- Example
- <PARAM NAME=Points1 VALUE="Arsenal(3)">
<PARAM NAME=Points2 VALUE="Aston Villa(-2)">
1.15 MarkX
- Description
- Parameter for marking a team. The team will
be displayed in bold in the table.
- Default
- -
- Example
- <PARAM NAME=Mark1 VALUE="Ipswich">
<PARAM NAME=Mark2 VALUE="Liverpool">
1.16 DateChar
- Description
- This parameter decides which character is to be used as a date-separator. If no character is specified (default) TeamStats will assume that the matchfile doesn't contain any dates. Read more about dates here.
- Default
- not specified
- Example
- <PARAM NAME=DateChar VALUE="/">
<PARAM NAME=DateChar VALUE=".">
Program parameters
2.1 Image
- Description
- The name of the image that is to be used as a background image. The name of the image file is relative to the HTML-document. The image format should be either GIF or JPEG.
- Default
- -
- Example
- <PARAM NAME=Image VALUE="myPic.gif">
<PARAM NAME=Image VALUE=pics/league.jpg>
<PARAM NAME=Image VALUE=../../files/bgpic.gif>
2.2 HideBorder
- Description
- Give the value "True" if you don't
want a border drawn around the applet.
- Default
- False
- Example
- <PARAM NAME=HideBorder VALUE=True>
2.3 NoPrevSeason
- Description
- Give the value "True" if you don't want TeamStats
to look for previous matches between teams in other leagues. Read more
about this parameter here.
- Default
- False
- Example
- <PARAM NAME=NoPrevSeason VALUE=True>
Color parameters
The following parameters can be used to change the colors of TeamStats. Color values are specified in the same way as in HTML i.e. in hexcode. It's important to know that these parameters can behave very differently on different platforms and with different browsers. For instance, the ButtonCol and ButtonTextCol parameters don't work at all with version 3 and earlier of both Navigator and Internet Explorer on Win95. On those systems the buttons will always be gray. So if you use these parameters it's very important that you test the applet on a couple of different systems because what might look nice on your system might not look so nice on another system.
2.4 Backcol
- Description
- Parameter that sets the background color.
- Default
- White
- Example
- <PARAM NAME=Backcol VALUE=1a34ef>
2.5 Forecol
- Description
- Sets the foreground color. This is the color that controls (drop-down-boxes, radio buttons etc.) use.
- Default
- Black
- Example
- <PARAM NAME=Forecol VALUE=1a34ef>
2.6 Primcol
- Description
- Sets the primary drawing color. This color is used for most of the data that is drawn on the screen.
- Default
- Blue
- Example
- <PARAM NAME=Primcol VALUE=1a34ef>
2.7 Seccol
- Description
- Sets the secondary drawing color. This color is used for headlines and labels.
- Default
- Black
- Example
- <PARAM NAME=Seccol VALUE=1a34ef>
2.8 ButtonCol
- Description
- Sets the color of the four main buttons on the top of the screen.
- Default
- Light gray
- Example
- <PARAM NAME=ButtonCol VALUE=1a34ef>
2.9 ButtonTextCol
- Description
- Sets the color of the text in the main buttons.
- Default
- Black
- Example
- <PARAM NAME=ButtonTextCol VALUE=1a34ef>
2.10 ButtonSelectCol
- Description
- Sets the color of the rectangle that is drawn around the selected button.
- Default
- Blue
- Example
- <PARAM NAME=ButtonSelectCol VALUE=1a34ef>
Setting parameters in a parameterfile
League parameters can also be given in a parameterfile. The main reason
to use a parameterfile is that it makes it possible to use the TeamStats-functions
setLeaguefile() and loadLeaguefile() from JavaScript (here
is all information on how to use TeamStats with JavaScript).
The parameterfile is a normal text file. Each parameter is placed on
a single line that contains the parameter name, an equal sign (=) and finally
the parameter value, for example:
Matchfile=files/pl97.txt
Note that there can be no spaces on either side of the equal sign
or in front of the parameter name. You should also not use any quotation marks.
When you have created a parameter file you give it's location with the
Leaguefile parameter:
<PARAM NAME=Leaguefile VALUE=pl97params.txt>
Example:
If you have HTML-code looking like this:
<APPLET CODE="embe.ts.TeamStats.class" WIDTH=560 HEIGHT=480>
<PARAM NAME=Matchfile VALUE=../data/myleague.txt>
<PARAM NAME=Line1 VALUE=4>
<PARAM NAME=Line2 VALUE=17>
<PARAM NAME=Winpoints VALUE=2>
<PARAM NAME=Hide1 VALUE="Leeds">
<PARAM NAME=Points1 VALUE="Ipswich Town(3)">
<PARAM NAME=Backcol VALUE=1a34ef>
</APPLET>
You can create a textfile named, for instance, LeagueArgs.txt with
the following contents:
Matchfile=../data/myleague.txt
Line1=4
Line2=17
Winpoints=2
Hide1=Leeds
Points1=Ipswich Town(3)
Then change the HTML-code to this:
<APPLET CODE="embe.ts.TeamStats.class" WIDTH=560 HEIGHT=480>
<PARAM NAME=Leaguefile VALUE=LeagueArgs.txt>
<PARAM NAME=Backcol VALUE=1a34ef>
</APPLET>
[ Back to install ]
Copyright © 1998 Mats Bovin.
Comments can be sent to mats-bov@dsv.su.se