1. Hello Guest,

    We wanted to let you know that the NXS17 templates and viewers have been released!

    Grab them HERE
  2. Hello Guest,

    We wanted to let you know that besides the NXS17 templates and viewers, now we have released the NXS17 Mod as well!

    Grab the latest files HERE
  3. Hello Guest,

    We wanted to let you know that we are trying out a new feature at SRD. Your feedback is needed!

    Read more about the chatbox HERE
  4. Hello Guest,

    We are gauging interest in starting an online racing league.

    Please take a moment and give your vote HERE. Thanks!

I have create new tool for championship scoring

Discussion in 'NR2003 General Discussion' started by German500, Jan 6, 2019.

  1. German500

    German500 Member

    Messages:
    21
    Likes Received:
    28
    Hello, my name is Markus and I am from Germany. I am Fan of NASCAR Racing since the NR3 from 1999.

    For my virtual league, I have create with php and sql a local website to manage my championship.

    Would like to make that available to you. However, the source code has grown historically and is a mixture of German and English. I translated a bit later, but many of the identifiers are still in my native language.

    All you need is a current web server and a MySQL / MariaDB server. For me it runs under Fedora Linux, but should also run under Windows in Apache XAMPP.

    The main page shows as follows:
    Bildschirmfoto_2019-01-06_15-08-52.png

    NASCAR Racing 2003 is the title, its only plain text.
    The NASCAR-Logo can be clicked, there you get to the overview of all current and past championships and the eternal driver and team rating.

    "Saisonkalender" means season calendar and it lists all season with tracks and races.
    "Saisonstatistik" means season statistics and list all seasons with overview of some statistics.
    "Allgemeine Statistik" is not finally yet, its only experimental statistics.
    "Gesamtstatistik der Fahrer" is an overview of all drivers with points, wins, poles, and so on.
    "Fahrererfolge nach Rennstrecke" is a table of all tracks and all drivers, who have won where and which driver has the most different tracks won.
    "Fahrererfolge nach Streckentyp" is a table like above, but which tracktypes (Short, Mile, Intermediate, Superspeedway, Road).
    "Saisonübersicht Meisterschaft" is a table with all current and future championships.
    "Liste der Rennstrecken" lists all race tracks filtered by current races, past tracks and closed tracks, sorted by track type.
    "Liste der Streckentypen" lists all track types with relevant race tracks.
    "Gesamtstatistik der Teams" is team overview with wins, poles, etc.
    "Teamerfolge nach Rennstrecke" lists all teams and all tracks and which team has won which track.
    "Teamerfolge nach Strecktentyp" lists all teams and all kinds of tracks and which team has won which kind of track how often.
    "Autoverwaltung" is still in developement and lists all cars with car number, team, driver and seasons. At moment, there is no edit function, you have to edit the cars manually in phpmyadmin in database.
    "Rekorde nach Rennstrecken" and "Rekorde" are some statistical overview, which driver or team has most wins, most poles, most led laps etc in general or by season or which team or driver has most wins on one individual track, etc.

    "Punkteverwaltung" is a tool, in which you can calculate the outcoming of each season with different points scoring systems like old NASCAR points, CART points, IRL points, IMSA points, Formula One points, etc.

    "PHP Administrator" is a link to the database tool phpmyadmin.
     
    Last edited: Jan 6, 2019
  2. Bitbreaker

    Bitbreaker Well-Known Member

    Messages:
    585
    Likes Received:
    658
    Welcome On this forum, nice to see an other person from Germany here :). Nettes tool was du da hast!
     
  3. German500

    German500 Member

    Messages:
    21
    Likes Received:
    28
    Oh hallo :)
    My next screenshot shows, how the schedule.php looks like.
    Bildschirmfoto_2019-01-08_15-03-26.png

    First column is the race ID, which is equal to the date of the race. Next column is the position of race in the championship, next column is the name of the race, next column is the name of the race track, next column and the color of row indicates the kind of track, next column shows distance of race in miles and laps and the last column indicates how the race count in the championship.

    Originally, the phps were made for IndyCar-style racing, so some race, like Indy 500, Pocono 500, Michigan 500 or California 500, get double points or a special points scheme for triple-crown-races was used, thats why the last column with "Wertung" exists. In NASCAR all races count the same way to the championship, I do not use any playoff system yet. Maybe it can used for non-championship races like the "All star race", with no points for championship.

    As you can see, I'm not a fan of short tracks in NASCAR Cup. My current calendar consists only of races on superspeedways, 2-mile intermediate and 1.5-mile intermediate ovals and a few road circuits.
    On the other hand, I drive the truck series exclusively on shorttracks and 1-mile ovals without all the larger oval tracks in the calendar or replace them with road courses.
     
    Ryan81398, InsideLine, frow78 and 2 others like this.
  4. German500

    German500 Member

    Messages:
    21
    Likes Received:
    28
    So, next point is the "Saisonkalender" (seasons/index.php). This page shows an overview of all seasons so far. In addition, you have a link where you can create new races.
    If you click on a year or a championship title or a row in "Rennen" (races), the browser opens the schedule.php from above.
    Bildschirmfoto_2019-01-09_01-42-47.png

    Green = actual season, with some races raced and it exists minimum one race result in database for that season. The "Rennen" column shows you, how many races have a result in database (in this example 16 of 36) and the column "Distanz" shows how many laps or miles are raced already (6606.3 miles or 3625 laps).
    In that case and only in that, the column "Autos" (cars) show you a list of all cars with teams and drivers, who had races in this season (cars/index.php).
    Red = future season, with no race results yet and maybe no complete schedule (in this example I have added only 3 races to the 2002 season)
    Grey = Making a new season with new races (saisonedit.php)
     
    InsideLine likes this.
  5. German500

    German500 Member

    Messages:
    21
    Likes Received:
    28
    Next is my seasonedit.php, in which you can create new races and new seasons.
    Bildschirmfoto_2019-01-09_02-10-51.png
    The side is simply, you have a blank page and can adding date, race track, name of race and laps directly as text.

    In the actual development only the German date format is supported, I working on a variant, where you can also use the American date format.
    As racetrack, you can use the folder name of your track in "tracks" or the full name of the track.
    Next is the name of race, you can use any name with space but without special characters. Please do not use apostroph, brackets or something like that.
    The lap count is simply a Integer without decimals. If you use decimals, it will be ignored.

    As separator you can use commata, semicolons or tabulators but not spaces, because of the spaces in the race names.

    You have two buttons:

    "Rennen importieren" - import the races in a temporary table and shows you the result (my next screenshot)
    "Eingabefeld zurücksetzen" - blank the textfield

    Bildschirmfoto_2019-01-09_02-23-32.png
    This shows the same page after you confirmed the input. So you can see, if you made an error.
    With the two buttons below, you could confirm the data, so the result is copied from temporary table in table "rennen" in database or you can reject the data and return to the blank page from beginning.

    After confirmation, the page changes.
    Bildschirmfoto_2019-01-09_02-26-56.png
    That page isn't final yet. Instead of textfield with 0 it should shows you the inserted races. You can add them with the button "Meisterschaft aktualisieren" to the corresponding season of the year.
    If you do this, you return to the blank page and can add another race.

    Important: I use the date of race as the unique ID in my database. You can add only one race to a specific date. If you reuse a date of a existing race, it will replaced with the new one and the older data in database will be overrided. BTW: Thats the way you can edit existing races and changing name, racetrack or lap count.
     
    DaveO likes this.
  6. halfwayglad

    halfwayglad BBMC Tracks

    Messages:
    350
    Likes Received:
    2,343
    Welcome to the community!

    My only thought: you should consider making this a lot easier to use if you want people to adopt it. Just scrolling through these posts I feel like I have to start reading a manual to figure it out. It also doesn't help that it's in German.

    I don't know what your technical abilities are, but the ideal case is to let people upload a file of race results and then present the standings. You could even consider storing the results in local storage so you don't need a database. Get someone to make it pretty and you have yourself a hugely popular tool.
     
  7. German500

    German500 Member

    Messages:
    21
    Likes Received:
    28
    To export the results from NR2003 to the page/database is lot easier you think.

    Bildschirmfoto_2019-01-13_00-47-12.png

    You have this blank page and just need to copy & paste the result table from export.html in this text field (in the race.php) and then use button "Rennergebnis importieren" and the result is imported to the database. The columns are easily recognized by the tabs, which are copied during copy&paste. In addition, of course, there will also be an English version.
     
    Last edited: Jan 12, 2019
  8. DaveO

    DaveO Well-Known Member

    Messages:
    483
    Likes Received:
    877
    Hallo German500,

    Your tool, for Stats, and points looks pretty cool. :) At our website, we create some tools for folks in the sim racing community too. Do you have a link so we can check out your tool "live" or just browse around?

    -Dave
     
  9. German500

    German500 Member

    Messages:
    21
    Likes Received:
    28
    I will first it translate to English and then upload the zip file here. The entire programm is only a bundle of php-Scripts and a SQL-Database.
     
  10. Clubsport

    Clubsport Member

    Messages:
    16
    Likes Received:
    11
    Gibt ja scheinbar doch ein paar Deutsche die NR2003 zocken... ✌️
    I will check out your tool in the next weeks- NICE WORK!

    Kind regards & schönen Gruß,

    Martin
     

Share This Page