So you want to have a GrandPrix racing competition with some friends ?
With a racing competition I mean you can all drive hotlaps or races in GrandPrix 3, saves these laps and upload them into GPxSite.
With GPxSite (currently only packaged as a PHP-Nuke module) you can have this competition and automatically check each upload against the rules you have set.
Here is a screen shot (v1.0c) of what the default overview page looks like (completely dynamically generated !!).
Why ?
Just for fun.
License ?
GPxSite is available under the GNU Public License.
What do I need ?
An i386 compatible Linux system with an HTTP server with PHP4 (With PEAR or you'll get errors about missing DB.php.) support and access to an RDBMS. I used Redhat 7.2 with Apache, PHP 4.0.6 and MySQL (aka LAMP).
Hofxlap for Linux. You can obtain this software ONLY from the official website.
GPxSite (of cource)
How do I install ?
I've written the software to be almost self installing.
Install Apache, PHP4, MySQL and PHPNuke
Extract the GPxSite archive to your PHPNuke directory. You will only get a new module directory with some files.
Put the hofxlap executable in the modules/GPxSite directory and make sure the application can be executed by the webserver.
Configure everything in GPxConfig.php and make sure the upload directory exists and can be written by the webserver.
Login in PHPNuke, activate GPxSite and open the module. This will bootstrap the system automagically (create tables and such).
You can now use the system.
NOTE: This version is still versy static in some areas so throughout the season you will probably change the index.php over time. This version is the first realeas that actually is usable. Later realeases (NOT in the short term) will be more advanced. If you have good ideas or bug fixes don;t hesitate to mail them to me.
INSTALLATION PROBLEM WITH VERSION 1.0D
Someone told me there is a severe problem when installing GPxSite (lots of SQL errors).
Quick 'fix':
In GPxGameEntry.php change this (near line 44):
Then load the page in order to create the tables.
When completed you should return it to the original setting.
I'll be looking into this problem ASAP.
I get "Fatal Error: Failed opening the required file 'DB.php'"
In order to run GPxSite you need the PEAR libaries. These libaries are a part of the standard PHP distribution but on some systems you need to install them manually. DB.php is the entry point for the PEAR database abstraction classes.
This is the FAQ for GPxSite. If you have a question not handled in the FAQ just mail me using GPxSite@Basjes.nl.
Q: Does GPxSite work on other platforms than Linux ? A: Perhaps, I only use Linux so I fail to see the need to try it out. If you have a different platform on which you tried GPxSite and you've created some fixes, I'm quite willing to intergrate your changes.
Q: I would like to play several different kinds of competitions with completely different rules at the same time. How can I do that ? A: That is the real issue on the TODO list. There is however a manual 'solution' you can try at the moment.
Do the following steps:
Unpack GPxSite in a different location and then copy it to (for example) modules/Hotlaps.
In almost all files text like this appears modules/GPxSite.
Replace this in ALL these files with modules/Hotlaps (i.e. the actual name of your directory).
Most instances are like this: require_once "modules/GPxSite/GPxRule.php";
which should be changes into: require_once "modules/Hotlaps/GPxRule.php";
Don't forget to update GPxGameEntry.php near line 323 to match your system: $fd = popen ("./modules/GPxSite/hofxlap -a./modules/GPxSite/hofxlap_php4.cfg \"$GPXFILE\"","r");
In GPxConfig.php change the table prefix to something unique. The actual name isn't important as long as it is a valid table prefix and it is unique. For Example: define ( GPX_DATABASE_TABLE_PREFIX , "gpxhotlaps_" );
Now load your modifed GPxSite page for the first time and everything is initialized (i.e. database tables are created).
I suggest you add something like this to the index.php file near line 44 (just after the series of require_once statements and before the Installation check). This is just to make it more usable for the users. echo "<FONT SIZE=+4>Hotlap Competition</FONT><BR>\n";
This is a list of items I plan to put in furture versions of GPxSite.
Allowing different games to be played: This means making it possible to change the rules with each race and allowing several different games to be played with just 1 track (hotlap / fastest of quick race / etc). Check the FAQ for a manual trick you can try right now to accomplish something which comes quite close to what I really want.
Comments
If you like, hate, have good ideas or have something else to tell me about GPxSite don't hesitate to let me know.