The following can be accessed via <your tracker directory>/admin by default. It is recommended that either the directory is passworded via .htacces, or renamed.
A listing of all server events that are stored in the database, including server/LFS messages, users leaving/pitting in the race, errors, penalties, etc. with a timestamp and also the time elapsed since the start of the race. These are colour coded to make it easy to spot, for example, driver chat (where the first 3 digits of the message are a number). You can also link directly to an event ID by appending "#ID" to the url.
type | lfsworld | example value | filtered | description |
---|---|---|---|---|
RACE_START | - | 1 | ||
LEAVE | yes | 248 (time in seconds since the race start) | Produced when a driver leaves the race, e.g. loses connection, spectates | |
SHIFTS | yes | 3708 (time in seconds since the race start) | Produced when a driver telepits | |
MSG | - | 27 - N. Kiss : :-( | driver chat | Counts as driver chat when the first 3 characters of the message are > 0 |
MSG | - | MoE|B.Keough : GT1, double file now | admin chat | Matches names or admin name prefixes |
MSG | - | Can't load skin : FZR_sraston24_gt2 | chat | All other messages containing " : " count as chat |
MSG | - | SAFETY CAR DEPLOYED | rcm / msg | Messages which match common race director phrases |
MSG | - | Fastest lap : 2:39.43 by 21 - M. Gassner (FZR) | fastest lap | Fastest lap (does not work on replays) |
MSG | - | 44 - T. Nogieć : DRIVE-THROUGH PENALTY | dt penalty | Drive-through penalty |
MSG | - | 44 - T. Nogieć : completed drive-through penalty | dt complete | Drive-through penalty completed |
MSG | - | 11 R. Mroz : STOP-GO PENALTY | sg penalty | Stop-go penalty |
MSG | - | 11 R. Mroz : completed stop-go penalty | sg complete | Stop-go penalty completed |
MSG | - | MoE|J.Palmer blocked messages | msg blocked | User blocked messages |
MSG | - | MoE|J.Palmer unblocked messages | msg unblocked | User unblocked messages |
MSG | - | FATAL TCP ERROR : CONNRESET | tcp error | TCP Error |
MSG | - | › MoE|C.Wilkinson : JOOS - CAR ENG | joos error | JOOS error |
Information about each of the teams is stored in teams.yaml, using YAML markup or in teams.csv, using CSV.
Indentation must be preserved otherwise it will break the tracker. Blank values will be ignored; however, teamName, car, number (leading zeros may be added by the tracker), and drivers are mandatory values. To enable multi-class tracking, class must also be filled in. To show positions gained and the grid before the race, grid needs to be filled in. Also, where the team's class is GT2 or GT3, or where GT1 is not the fastest class, the final "R" in the car code will be replaced by numbers 1, 2 or 3 - e.g. FZR will become FZ2 for GT2.
It is advisable to keep the teams in numerical order, to find them easily to make changes or mark them as retired for instance. Also, if any text contains spaces and does not display correctly in the tracker, you may need to add quotation marks around the "text".
The tracker also uses the names (and numbers) to work out who has finished the race, and to count pit stops and DT/SG from each team by reading the server messages - therefore numbers and names should be exactly as they appear in LFS, and vice-versa.
# This is a comment, useful for noting which race these teams are for
-
teamName: Example Motorsports
class: 3 letter class code
car: 3 letter car code
number: Number
server: Number
grid: Number
penaltyLaps: -/+ Number
penaltyTime: -/+ Number
teamStatus: RET/DQ/DNS
drivers:
- {username, Forename Surname, Country}
- {srdjanmilasinovic, Srđan Milašinović, Serbia}
List of countries as of 29/06/2011: albania, argentina, australia, austria, belarus, belgium, bolivia, bosnia and herzegovina, brazil, bulgaria, canada, chile, china, colombia, croatia, czech republic, denmark, ecuador, england, estonia, finland, france, georgia, germany, greece, grenada, hong kong, hungary, iceland, india, ireland, italy, jamaica, japan, latvia, lebanon, lithuania, luxembourg, macedonia, mexico, netherlands, new zealand, northern ireland, norway, peru, poland, portugal, romania, russia, san marino, saudi arabia, scotland, serbia, slovakia, slovenia, south africa, south korea, spain, sri lanka, sweden, switzerland, taiwan, turkey, ukraine, united kingdom, uruguay, usa, uzbekistan, wales
3 letter ISO 3166-1 alpha-3 country names can also be used.
UTF-8 characters can be used. With the encoding of the input page and the tracker set as utf-8 this should work without a problem; if utf-8 characters are not displayed correctly, you may have to create the file in a text editor, save as UTF-8, and upload to the tracker directory.
To use a csv file, $useTeamsCSV must be set to true in the config. All columns must be in place, regardless of whether they are used or not - they must still be kept blank to preserve the CSV file structure. The CSV option is especially useful for exporting from a spreadsheet. A header must be present for each column.
teamName,class,car,number,server,grid,penaltyLaps,penaltyTime,teamStatus,username #1,driver name #1,country #1,username #2,driver name #2,country #2
Used to manually set the track status. The tracker will automatically get the track status from the GREEN FLAG, SAFETY CAR DEPLOYED, SAFETY CAR IN THIS LAP, RED FLAG and CHEQUERED FLAG server messages, and check the timecode of these against the last modified timestamp of the trackstatus.txt file - using the most recent update. The tracker does not refresh on PRE-RACE or CHEQUERED FLAG, but should once it receives a server message - if not you may have to set it to GREEN FLAG as the race starts.
The configuration options have been set up so that most, if not all, of the tracker's features and settings can be changed without editing any of the PHP files. Config.php is loaded when the tracker is updated, so can also be used to run execute PHP code. There are 55 config items in total.
variable | type | description | example/default value |
---|---|---|---|
$trackerMode | text | Switches between race, qualifying and practice modes, defaults to race mode if empty | race/qual/prac |
variable | type | description | example/default value |
---|---|---|---|
$useTeamsCSV | boolean | Use teams.csv instead of teams.yaml | false |
$addZeros | boolean | Add zeros to car numbers 0 to 9 | false |
$trimFinished | boolean | Match drivers names to "xxx has finished" and cut off laps, splits and pit stops after that point | true |
$refreshTime | number | Meta refresh time in the html pages - minimum of 30 seconds | 45 |
$raceFinishOffset | integer | Offset in minutes, to move the countdown, usually in the case of a server crash | 0 |
$timeOffset | integer | Time offset in hours, if the last pit column is say, an hour out | 0 |
$sortStatus | boolean | Sort by team status first - RUN, NC, RET, DQ, DNS if true | false |
$inactiveTime | integer | Number of seconds since a teams last lap to mark them as not completing laps | 300 |
$driverPercentMax | integer | Maximum percentage allowed to be completed by one driver | 75 |
$driverTimeMax | integer | Maximum time in seconds allowed to be completed by one driver | 3600 |
$standingStart | boolean | Set to not show the rolling start status message on lap 1 | false |
$showServer | boolean | Show the server value for each team, if set | false |
$showStatus | boolean | Show the teamStatus column | true |
$showSector | boolean | Show the sector graphics | true |
$showHourly | boolean | Show links to hourly standings pages - remember to delete the hour_xx files before each race | true |
$teamstatsComparisonLaps | integer | Number of laps for the teamstats pages | 10 |
$teamstatsComparisonNumber | integer | Number of teams above/below on the teamstats pages | 2 |
$updateNumber | integer | Number to prefix update.php for added security | random 6 digit number |
$showCar | boolean | Show small car images for each team in this format: <number><class>.png | false |
$showCarBaseUrl | text | Base url to the small car images | "http://mastersofendurance.eu/images/cars/thumb_"; |
$thumbCar | array | Used to add a suffix to a specific car image | [23] = "r3"; |
$dbServers | array | List IPs that will be shown in the DB server page | array("127.0.0.1 - my IP"); |
$debugArrays | boolean | Displays print_r($XMLRACE) and print_r($XMLTEAM) - the main arrays in the tracker for debugging purposes | false |
$averagelap | percentage | Displays an average time for each driver if true, excludes laps over the percentage value, or does not display if false | 107 |
variable | type | description | example/default value |
---|---|---|---|
$trackerRoot | text | Value prepended to the image sources for the flags, sector and expand images. | false, "/" or URL |
$windowTitle | text | Title for all of the tracker pages - team/lapchart and #xx will be added | "Tracker - Round 0: 2 hours of Rockingham" |
$faviconFilepath | option | Not required if favicon is in tracker directory | false, leader, or "faviconTracker.ico" |
$jsFilepath | option | Not required as JavaScript is in the HTML | false |
$cssFilepath | option | Filepath to the tracker's CSS stylesheet | false, "css/tracker.css" or "http://file.path/style.css" |
$mainLogoSrc | text | Filepath of the main logo | false or "images/tracker_logo.png" |
$mainLogoLink | text | Where the main logo should link to | false or "http://lfs.net" |
$topInfoCars | text | Car class information | "<strong class='gt2dd'>GT2: </strong><a href='http://en.lfsmanual.net/wiki/Cars:RWD_GTR'>FXR+24%, XRR+25%, FZR+21%</a>" |
$topInfoTrack | text | Track name/weather | "<a href='http://en.lfsmanual.net/wiki/Tracks:Aston#Cadet'>Aston Cadet</a>, Clear Day, High Wind" |
$showtoplinksbar | boolean | show-hide the top links bar | true |
$numtoplinksbar | number | number of links | 1 |
$toplinksbar[] | array | Name of the link | [1] = "LFS IRC" |
$toplinksbarhref[] | array | URL of the link | [1] = "irc://irc.gamesurge.net/liveforspeed" |
$showfooterlinks | boolean | show-hide the footer links | true |
$numfooterlinks | number | number of links | 1 |
$footerlinkshref[] | array | URL of the link | [1] = "http://www.lfs.net" |
$footerlinksimg[] | array | Filepath to the link image | [1] = "/images/LFS_S2_logo.png" |
$footerlinksalt[] | array | Alternative text for the image | [1] = "Logo: Live For Speed" |
variable | type | description | example/default value |
---|---|---|---|
$eventFull | text | Full event name, used for the grid/points standings links | "LFS Endurance Event 2011" |
$h2eventName | text | Number of classes in the race | "LFS Endurance Championship 2011 - Round 1 of 3" |
$finalGrid | text | Link to final grid | false or "http://linkto.com/final/grid/image.png" |
$championshipStandings | text | Link to championship standings | false or "http://lfsec.net/standings" |
$championshipRound | integer | Number of previous championship rounds | 2 |
variable | type | description | example/default value |
---|---|---|---|
$futureRaceStart | timestamp | Timestamp for race start - see http://4webhelp.net/us/timestamp.php | 1287244800 |
$raceNumSectors | integer | Number of sector in the lap, to show the correct split position graphic | 3 |
$raceTrackLengthKm | number | Used for fastest lap speed, and for distance countdown | 7.4 |
$raceHours | integer | Number of hours in the race | 6 |
$raceLaps | integer | Number of laps in the race - $raceHours must be set to 0 to use! | 0 |
$raceClasses | integer | Number of classes in the race | 1 |
$raceClassName[] | array | Name of each class | [1] = "GT1"; |
variable | type | description | example/default value |
---|---|---|---|
$futureRaceStart | timestamp | Timestamp for race start - see http://4webhelp.net/us/timestamp.php | 1287244800 |
$raceNumSectors | integer | Number of sector in the lap, to show the correct split position graphic | 3 |
$raceTrackLengthKm | number | Used for fastest lap speed, and for distance countdown | 7.4 |
$raceHours | integer | Number of hours in the race | 6 |
$raceLaps | integer | Number of laps in the race - $raceHours must be set to 0 to use! | 0 |
$raceClasses | integer | Number of classes in the race | 1 |
$raceClassName[] | array | Name of each class | [1] = "GT1"; |
variable | type | description | example/default value |
---|---|---|---|
$numServers | integer | Number of servers the local tracker is connected to (unlimited) | 1 |
$manualIdServer1 | integer | Race_id in the database of server 1 (not normally set unless there are problems) | 3 |
$manualIdServer2 | integer | Race_id in the database of server 2 | 7 |
$manualIdServer3 | integer | Race_id in the database of server 3 | 5 |
$serverCrash | boolean | - | false |
$allRaceids | boolean | - | false |
Since the number of servers is unlimited, you can create however many $mannualIdServerXX variables as you require.
Set the IP address of the database to access; you may also add the default MySQL port (:3306) and a prefix if necessary.
The page will display the contents of the race table in the database if it is able to connect to the IP/port, if not it will display a MySQL error (this may take some time for it to timeout).
This will update the tracker at most every 30 seconds, and links to the update page including any security numbers in the filename to prevent just anyone running update.php.