Personally I'm working on some php classes which is a sorta half step on from Dustdriver's use case diagram and covers most of the stuff in the spec and fleshes some parts of it out a bit.
Vaxen: Check the script I PM'd you for ideas on the schema - most of my classes directly translate to db tables so if we keep our heads together on this one it'll probably happen a lot faster wth the two sections going in unison.
Note: I'm still very much finding my way with this PHP dev (been working on a work related ordering and doc management system since about dec last year. I'm still not down with MVC methodology and templating so if someone else is then please step up to the plate.
I have been in databases, managing and querying for about 15years tho so I know what I'm doing on that side.
I've been involved in a community-based project before, namely
Sourceball (a half life 2 mod) which died a death because of too many chiefs and not enough indians-syndrome. This project, whilst being much smaller in scope, could still face the same issues that killed Sourceball so may I respectfully ask that we keep this team down to a minimum. It's not a big job, so it won't take a lot of bodies to make it happen.
What (I personally think) is required most urgently is someone with experience writing/implementing vbulletin modules. Knowledge of the api specifically would help a lot.
Also someone who can give us a test server with php5/mysql and access (through yourself if necessary) to the configs.
The rest we would seem to have pretty much covered.
I can handle the coding of the LeageTable classes in conjuction with whoever else can write a handler for the vbulletin requests (user session read and module add) if no one else can do it I'll be able to work it out.
Same with the interface which, in leu of a vbulletin specialist, I'll just do the old fashioned htm/css way and hope that we may be able to integrate this into the forum at a later date.
Worst case scenario- the users will be required to maintain a login session on the LeageTable board as seperate from here. (not really major)
here's the nerd bit. I was bored today at work so I knocked this together. It's off the top of my head so might not be the best possible way to do it. Still needs a lot more properties for each of the classes so.. ideas on a postcard
*hasn't been run yet so it's prolly full of syntax nixes
PHP:
<?php
// ===============================================================
class award{
// ===============================================================
// Properties
// ===============================================================
private $AwardID="new";
private $AwardName;
private $Points;
// ===============================================================
// Methods
// ===============================================================
public function __construct($AwardID="new",$AwardName,$Points){
$this->AwardID=$AwardID;
$this->AwardName=$AwardName;
$this->Points=$Points;
}
// ===============================================================
}
class driver{
// ===============================================================
// Properties
// ===============================================================
private $modified=0; //flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
private $DriverID="new"; // TODO: Connect to Vbulletin for this field
private $DriverName;
private $Division;
private $SubDivision;
private $PSN;
// ===============================================================
// Methods
// ===============================================================
public function __construct($DriverID="new"){
if($DriverID!="new"){
$this->LoadItem($DriverID);
}else{
$this->
}
}
// ===============================================================
public function loaditem($DriverID){
include_once "dbconnect.php";
$mysqli=dbconnect();
$sql="SELECT * FROM drivers WHERE DriverId='$DriverID';";
if ($result=$mysqli->query($sql)){
$row=$result->fetch_assoc();
$this->DriverID=$DriverID;
$this->DriverName=$row['DriverName'];
$this->Division=$row['Division'];
$this->SubDivision=$row['SubDivision'];
$this->PSN=$row['PSN'];
$this->modified=3;
return true;
}else{
return false;
}
}
// ===============================================================
public function saveitem(){
include_once "dbconnect.php";
$mysqli=dbconnect();
// Case for New/Modify/Delete or Unchanged
if ($this->Modified==0){
$sql="INSERT INTO drivers (DriverName,Division,SubDivision,PSN) VALUES ('{$this->DriverName}','{$this->Division}','{$this->SubDivision}','{$this->PSN}');";
if($mysqli->query($sql)){
$this->DriverID=$mysqli->insert_id;
return true;
}else{
return false;
}
}else if($this->Modified==1){
$sql="UPDATE drivers SET DriverName='{$this->DriverName}', Division='{$this->Division}', SubDivision='{$this->SubDivision}' WHERE DriverID='{$this->DriverId}';";
if($mysqli->query($sql)){
return true;
}else{
return false;
}
}else if($this->Modified==2){
$sql="DELETE FROM drivers WHERE DriverID='{$this->DriverID}';";
if($mysqli->query($sql)){
return true;
}else{
return false;
}
}else{
// Record exists but is unchanged - no need for DB write
}
}
// ===============================================================
public function promote($DriverID){
//TODO: Shift driver from one division/subdivision to another
$this->Modified=1;
}
// ===============================================================
public function demote($DriverID){
//TODO: Shift driver the other way
$this->Modified=1;
}
}
class result{
// ===============================================================
// Properties
// ===============================================================
private $modified=0; //flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
private $EventID;
private $Position;
private $DriverID;
private $Time;
// ===============================================================
// Methods
// ===============================================================
//TODO: Methods
}
class event{
// ===============================================================
// Properties
// ===============================================================
private $organisers=array(); // TODO: connect this to vbulletin for things like PM's and administrator $_SESSION
private $modified=0; // flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
private $EventID="new";
private $EventDate;
private $EventTime;
private $CloseDate="none"; // After this new drivers cannot signup
private $MaxEntries="none"; // Once reached new drivers cannot signup
private $EventName;
private $Results=Array(); // Array of result objects
// ===============================================================
// Methods
// ===============================================================
//TODO: Methods
}
class division{
// ===============================================================
// Properties
// ===============================================================
private $modified=0; //flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
private $DivisionID="new";
private $Drivers=array(); // Array of Driver Objects
private $Events=array(); // Array of Event Objects
// ===============================================================
// Methods
// ===============================================================
//TODO: Methods
}
class leaderboard{
// ===============================================================
// Properties
// ===============================================================
private $modified=0; //flag indicated record state - 0=new record, must be inserted to database / 1=modified record, requires update / 2=deleted / 3=existing record, not changed (requires no action)
private $Divisions=Array() // Array of division objects
// ===============================================================
// Methods
// ===============================================================
//TODO: Methods
}
?>