-------------------------------------------------------

WebLeague (version 2.0)
Written by: Peter Hendrix

-------------------------------------------------------

Contents


1 Introduction


2 Installation

  2.1 Requirements
 
  2.2 Changing variables.php
     2.2.1 Edit code
     2.2.2 Paste code in variables.php

  2.3 Install WebLeague
     2.3.1 Create a WebLeague directory
     2.3.2 Upload files
     2.3.3 Run the install script


3 Configuring WebLeague

  3.1 The admin panel
  
  3.2 /Admin
     3.2.1 Add admin
     3.2.2 Settings
     3.2.3 Add page
     3.2.4 View page

  3.3 /Admin/News
 
  3.4 /Admin/League
     3.4.1 Add player
     3.4.2 Edit player
     3.4.3 Block player
     3.4.4 Delete player
     3.4.5 Report game
     3.4.6 Record game
     3.4.7 Delete game
     3.4.8 Ip check
     3.4.9 Reset season

  3.5 Edit the script

4 Conclusion

-------------------------------------------------------

1 Introduction

Thank you for choosing WebLeague as your automated league system.
A lot of hard work has gone into this product, so i hope you enjoy it.
The license for this product is the GNU General Public Licence (GPL). Please do not remove the copyright notice.

This file will guide you through the setup process of WebLeague. Installing WebLeague takes about 20 minutes for the average user.




2 Installation



2.1 Requirements

To use WebLeague you need three things:
1.a MySQL database
2.a web server (e.g. Apache) with PHP installed
3.about 350 kb of webspace



2.2 Changing variables.php


2.2.1 Edit code

First you will need to edit the code below to your needs:


<?php

//start

//configure database info
 $databaseserver = "localhost"; //usually localhost
 $databasename = "dbname"; //the name of your database
 $databaseuser = "dbuser"; //the name of the database-user
 $databasepass = "dbpass"; // the password to your database
 $directory ="http://www.yoursite.com/WebLeague" ; //the location of your WebLeague directory (no trailing slash)

//configure the tables in the database
 $playerstable = "webl_players"; //the name of the table that contains information about the players
 $gamestable = "webl_games"; //the name of the table that stores the played games
 $newstable = "webl_news"; // the name of the table that stores the news
 $varstable = "webl_vars"; //the name of the table that stores various information
 $admintable = "webl_admin"; //name of the table that stores the admin login information
 $pagestable = "webl_pages"; //name of the table that stores additional pages

//finish

?>


2.2.2 Paste code.

Copy the above code (after editing it) to the variables.php file in your main WebLeague folder.



2.3 Install WebLeague

2.3.1 Create a WebLeague directory
Create a directory on your webserver. The name of this directory must be identical to the directory between the " " tags in the code you edited and pasted into the variables.php files: 

 $directory ="http://www.yoursite.com/WebLeague" ; //the location of your WebLeague directory (no trailing slash)


2.3.2 Upload files

Upload all files to your webserver.
After doing this your folder structure should look like this:

http://www.yoursite.com/WebLeague
   bottom.php
   edit.php
   etc...
http://www.yoursite.com/WebLeague/Admin
   contents of Admin folder
   subfolders
      contents of subfolders
http://www.yoursite.com/WebLeague/flags
   contents of flags folder
http://www.yoursite.com/WebLeague/icons
   contents of icons folder
http://www.yoursite.com/WebLeague/smileys
   contents of smileys folder


2.3.3 Run the install script

Go to your web browser and type http://www.yoursite.com/WebLeague/install.php in the location bar.

Enter the information for the initial admin account and submit the form.

If everything went well you should have an output like this:
Creating tables...
[creating some tables]
Inserting default values
[inserting some values]
Done.

(Please make sure you only run this file once, to prevent problems with your database. In case you something goes wrong on your first attempt, please delete all the tables that were created from your database before running it again.)



Congrats! You installed WebLeague.

If you have any problems installing WebLeague, please e-mail me at ibb123@hotmail.com and i'll try to help.




3 Configuring WebLeague



3.1 The admin panel

Now you can start configuring the league to your needs. I will briefly explain the features in the admin panel below.
To go to the admin panel type:

http://www.yoursite.com/WebLeague/Admin

in your web browser and type in the username and password you entered when running the install.php file.


3.2 /Admin

In the admin section you will find the following links:

- index;
- add admin;
- news;
- league management;
- settings;
- add page;
- view page.

The news and league management links lead to the News and League directories in your Admin section. More information on these can be find in chapters 3.3 and 3.4.


3.2.1 Add admin

If you want other people to have access to your admin area: add them here.


3.2.2 Settings

This is a very important page. Here you can change:

- the name of your league;
- the text that will appear in the title bar of a browser;
- the colors and font that WebLeague will use;
- the scoring system (points, ladder, rating);
- who reports the games (winner, loser);
- some display values.


3.2.3 Add page

Here you can add pages pages (rules, contact information, staff, system explanation page, anything you want) that will be added to the database and to the menu on the user-side of the script.


3.2.4 View page

Here you can view your added pages and edit or delete them.



3.3 /Admin/News

This part of the admin section is used to add, view, edit and delete news articles. It's pretty much self-explanatory.



3.4 /Admin/League

The league management part of your admin panel allows you to:

- add a player;
- edit a players info;
- block a player;
- delete a player;
- report a game;
- record a game;
- delete a game;
- check for identical ip's;
- reset the season.


3.4.1 Add player

This page is only available when the "approve of players after they signed up"-option on the settings page is enabled. Until a player is added he will show up in red on the players page and won't be able to report games.


3.4.2 Edit player

Here you can change a players details if necessary.


3.4.3 Block player

If you want to temporarily make it impossible for a player to report games, use this function. It will also result in the player showing up in red on the players, standings, played games and statistics pages.


3.4.4 Delete player

This will delete a player from your league.


3.4.5 Report game

Report any games not reported by your players here.


3.4.6 Record game

This page is only available when the "approve games before they are recorded"-option on the settings page is enabled. It will change the status of the game from "pending" to "recorded" and update the stats of the involved players.


3.4.7 Delete game

If a game was falsely reported, you can delete it on this page.

(Note: when using the ladder system the old ranks can't be restored.)


3.4.8 Ip check

WebLeague records a players ip on signup. If two players with the same ip joined your league, you will be able to see it here.


3.4.9 Reset season

Some leagues have seasons. If you wanna start a new season use this feature. All information of the current season will be deleted. All players and their overall stats  will remain in the database.

(Note: ratings will be reset.)




3.5 Edit the script

Some users may want to edit parts of the WebLeague script. You are allowed to do this, but you have to keep the copyright notice of the original WebLeague system intact. When editing the league yourself i can't guarantee you will be able to upgrade your league to upcoming versions.

In case you add extra features to the system i would be glad if you contact me (ibb123@hotmail.com) and tell me, because I am planning on implementing a hacks (user made additions/changes/etc) section to the WebLeague site.




4 Conclusion

I hope you will enjoy WebLeague. I also hope you got through reading this file without getting a headache. And finally i hope the world will be at peace sometime.


-------------------------------------------------------