Web tracker admin

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.

Contents

  1. Race Control
  2. Team Data
    1. teams.yaml
    2. teams.csv
  3. Track status
  4. Configuration options
    1. Tracker settings
    2. Championship information
    3. Race information
    4. Server Settings
  5. Database server
  6. Update tracker

Racecontrol

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.

typelfsworldexample valuefiltereddescription
RACE_START-1
LEAVEyes248 (time in seconds since the race start)Produced when a driver leaves the race, e.g. loses connection, spectates
SHIFTSyes3708 (time in seconds since the race start)Produced when a driver telepits
MSG-27 - N. Kiss : :-(driver chatCounts as driver chat when the first 3 characters of the message are > 0
MSG-MoE|B.Keough : GT1, double file nowadmin chatMatches names or admin name prefixes
MSG-Can't load skin : FZR_sraston24_gt2chatAll other messages containing " : " count as chat
MSG-SAFETY CAR DEPLOYEDrcm / msgMessages which match common race director phrases
MSG-Fastest lap : 2:39.43 by 21 - M. Gassner (FZR)fastest lapFastest lap (does not work on replays)
MSG-44 - T. Nogieć : DRIVE-THROUGH PENALTYdt penaltyDrive-through penalty
MSG-44 - T. Nogieć : completed drive-through penaltydt completeDrive-through penalty completed
MSG-11 R. Mroz : STOP-GO PENALTYsg penaltyStop-go penalty
MSG-11 R. Mroz : completed stop-go penaltysg completeStop-go penalty completed
MSG-MoE|J.Palmer blocked messagesmsg blockedUser blocked messages
MSG-MoE|J.Palmer unblocked messagesmsg unblockedUser unblocked messages
MSG-FATAL TCP ERROR : CONNRESET tcp errorTCP Error
MSG- › MoE|C.Wilkinson : JOOS - CAR ENGjoos errorJOOS error

Team data

Information about each of the teams is stored in teams.yaml, using YAML markup or in teams.csv, using CSV.

teams.yaml

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.

teams.csv

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

Track status

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.

Configuration options

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.

Session switch

variabletypedescriptionexample/default value
$trackerModetextSwitches between race, qualifying and practice modes, defaults to race mode if emptyrace/qual/prac

Tracker settings

variabletypedescriptionexample/default value
$useTeamsCSVbooleanUse teams.csv instead of teams.yamlfalse
$addZerosbooleanAdd zeros to car numbers 0 to 9false
$trimFinishedbooleanMatch drivers names to "xxx has finished" and cut off laps, splits and pit stops after that pointtrue
$refreshTimenumberMeta refresh time in the html pages - minimum of 30 seconds45
$raceFinishOffsetintegerOffset in minutes, to move the countdown, usually in the case of a server crash0
$timeOffsetintegerTime offset in hours, if the last pit column is say, an hour out0
$sortStatusbooleanSort by team status first - RUN, NC, RET, DQ, DNS if truefalse
$inactiveTimeintegerNumber of seconds since a teams last lap to mark them as not completing laps300
$driverPercentMaxintegerMaximum percentage allowed to be completed by one driver75
$driverTimeMaxintegerMaximum time in seconds allowed to be completed by one driver3600
$standingStartbooleanSet to not show the rolling start status message on lap 1false
$showServerbooleanShow the server value for each team, if setfalse
$showStatusbooleanShow the teamStatus columntrue
$showSectorbooleanShow the sector graphicstrue
$showHourlybooleanShow links to hourly standings pages - remember to delete the hour_xx files before each racetrue
$teamstatsComparisonLapsintegerNumber of laps for the teamstats pages10
$teamstatsComparisonNumberintegerNumber of teams above/below on the teamstats pages2
$updateNumberintegerNumber to prefix update.php for added securityrandom 6 digit number
$showCarbooleanShow small car images for each team in this format: <number><class>.pngfalse
$showCarBaseUrltextBase url to the small car images"http://mastersofendurance.eu/images/cars/thumb_";
$thumbCararrayUsed to add a suffix to a specific car image[23] = "r3";
$dbServersarrayList IPs that will be shown in the DB server pagearray("127.0.0.1 - my IP");
$debugArraysbooleanDisplays print_r($XMLRACE) and print_r($XMLTEAM) - the main arrays in the tracker for debugging purposesfalse
$averagelappercentageDisplays an average time for each driver if true, excludes laps over the percentage value, or does not display if false107

Page / Header / Footer design

variabletypedescriptionexample/default value
$trackerRoottextValue prepended to the image sources for the flags, sector and expand images.false, "/" or URL
$windowTitletextTitle for all of the tracker pages - team/lapchart and #xx will be added"Tracker - Round 0: 2 hours of Rockingham"
$faviconFilepathoptionNot required if favicon is in tracker directoryfalse, leader, or "faviconTracker.ico"
$jsFilepathoptionNot required as JavaScript is in the HTMLfalse
$cssFilepathoptionFilepath to the tracker's CSS stylesheetfalse, "css/tracker.css" or "http://file.path/style.css"
$mainLogoSrctextFilepath of the main logofalse or "images/tracker_logo.png"
$mainLogoLinktextWhere the main logo should link tofalse or "http://lfs.net"
$topInfoCarstextCar class information"<strong class='gt2dd'>GT2: </strong><a href='http://en.lfsmanual.net/wiki/Cars:RWD_GTR'>FXR+24%, XRR+25%, FZR+21%</a>"
$topInfoTracktextTrack name/weather"<a href='http://en.lfsmanual.net/wiki/Tracks:Aston#Cadet'>Aston Cadet</a>, Clear Day, High Wind"
$showtoplinksbarbooleanshow-hide the top links bartrue
$numtoplinksbarnumbernumber of links1
$toplinksbar[]arrayName of the link[1] = "LFS IRC"
$toplinksbarhref[]arrayURL of the link[1] = "irc://irc.gamesurge.net/liveforspeed"
$showfooterlinksbooleanshow-hide the footer linkstrue
$numfooterlinksnumbernumber of links1
$footerlinkshref[]arrayURL of the link[1] = "http://www.lfs.net"
$footerlinksimg[]arrayFilepath to the link image[1] = "/images/LFS_S2_logo.png"
$footerlinksalt[]arrayAlternative text for the image[1] = "Logo: Live For Speed"

Championship information

variabletypedescriptionexample/default value
$eventFulltextFull event name, used for the grid/points standings links"LFS Endurance Event 2011"
$h2eventNametextNumber of classes in the race"LFS Endurance Championship 2011 - Round 1 of 3"
$finalGridtextLink to final gridfalse or "http://linkto.com/final/grid/image.png"
$championshipStandingstextLink to championship standingsfalse or "http://lfsec.net/standings"
$championshipRoundintegerNumber of previous championship rounds2

Race information

variabletypedescriptionexample/default value
$futureRaceStarttimestampTimestamp for race start - see http://4webhelp.net/us/timestamp.php1287244800
$raceNumSectorsintegerNumber of sector in the lap, to show the correct split position graphic3
$raceTrackLengthKmnumberUsed for fastest lap speed, and for distance countdown7.4
$raceHoursintegerNumber of hours in the race6
$raceLapsintegerNumber of laps in the race - $raceHours must be set to 0 to use!0
$raceClassesintegerNumber of classes in the race1
$raceClassName[]arrayName of each class[1] = "GT1";

Qualifying information

variabletypedescriptionexample/default value
$futureRaceStarttimestampTimestamp for race start - see http://4webhelp.net/us/timestamp.php1287244800
$raceNumSectorsintegerNumber of sector in the lap, to show the correct split position graphic3
$raceTrackLengthKmnumberUsed for fastest lap speed, and for distance countdown7.4
$raceHoursintegerNumber of hours in the race6
$raceLapsintegerNumber of laps in the race - $raceHours must be set to 0 to use!0
$raceClassesintegerNumber of classes in the race1
$raceClassName[]arrayName of each class[1] = "GT1";
//QUALIFYING INFORMATION $qualifyingFocus = "team"; $distanceUnits = "kph"; $percentLimit = 107; $futureQualStart = 1313251200; $qualMins = 30; $qualLaps = false; $qualElimination = false; $showUnqualified = true; $driverName=fastest; $showSectorStatus

Server settings

variabletypedescriptionexample/default value
$numServersintegerNumber of servers the local tracker is connected to (unlimited)1
$manualIdServer1integerRace_id in the database of server 1 (not normally set unless there are problems)3
$manualIdServer2integerRace_id in the database of server 27
$manualIdServer3integerRace_id in the database of server 35
$serverCrashboolean-false
$allRaceidsboolean-false

Since the number of servers is unlimited, you can create however many $mannualIdServerXX variables as you require.

Database server

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).

Update tracker

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.