Notes:
Nuke League for PHP-Nuke
PHP-Nuke Version: 6.0,6.5-6.9
PHP Version: 4.1.2
Version 1.00 - Dec 31, 2003.
Author: Joubert Berger
WWW: http://nukeleague.sourceforge.net
After searching all over the Internet, I could not find anything to run a
league. Well, I did not need to run an entire league, just one team. So, I
decided to write something that now has turned into Nuke League. A full
multi-sport management system.
Nuke-League now supports multiple sports.
NOTE: Nuke-League has only been tested on the above mentioned versions of
PHP-Nuke and PHP.
Installation:
=============
1. Untar the tarball.
2. Copy the files and directories into the Nuke directory structure.
3. IMPORTANT: Now goto the admin page and click on "League". It will create
all the table for you the first time the admin pages are accessed.
If you are upgrading, make sure after you have copied the files into the Nuke
directory structure you click on the "League" link/icon. This will
automatically update all the tables that were changed.
How to use it:
==============
1. Create a League from the main page.
2. Create a season under the edit league page.
3. Create the divisions from the edit season page.
4. Create the teams under each of the divisions under the edit division page.
5. Create the players under each of the teams under the edit team page.
(This is optional)
6. Set the current season under the edit league page.
7. Add the games that will make up your schedule under the edit season page.
8. You can add the positions that the players can play and what headings
should be displayed with each position.
9. You can edit what the headings should be displayed when you print the
standings and when you show the game summaries. For the standings you
have columns that are calculated and you can select which column the
standings should be sorted on.
Notes:
======
Headings
========
When changing the headings, it is important that all the heading columns be
next to each other. Do not leave any blanks.
When added calculated fields, you have to be careful that you don't put
invalid fields in or else the interface could through up database errors.
Admin
=====
Nuke-League has the concept of league administrators. These administrators can
help manage the leagues/teams/players. A user will be able to edit, update,
remove, or add a game, teams or players. Editing a game allows you to edit
the date/time, teams, and place. Updating a game allows you to update just
the score and the statistics of the game and players. You can assign an
administrative task to a user for a team, a group of teams, or all teams in
the league. When assigning the add task you give the user to ability to add
any game. You can not restrict him to add games for only one team.
Blocks
======
Blocks now support multiple sports. On the main window at the bottom is a list
of the blocks in the block directory. You have to configure each one. You
will assign a sport to it, then which leagues you want to be able to view
with this block and then which "heading" do you want to sum. If there are not
enough blocks, just copy one of the original blocks to a new name. Just keep
the format of the names the same. I would suggest to name them with a new
number after it like the ones that already exist. Because of the complexity
of configuring the blocks, the edit function has very little functionality.
It is better to just unconfigure the block and reconfigure it.
Date
====
The date format uses the following specifiers to display the day/time:
`%M' Month name (`January'..`December')
`%W' Weekday name (`Sunday'..`Saturday')
`%D' Day of the month with English suffix
(`1st', `2nd', `3rd', etc.)
`%Y' Year, numeric, 4 digits
`%y' Year, numeric, 2 digits
`%X' Year for the week where Sunday is the
first day of the week, numeric, 4
digits, used with '%V'
`%x' Year for the week, where Monday is the
first day of the week, numeric, 4
digits, used with '%v'
`%a' Abbreviated weekday name (`Sun'..`Sat')
`%d' Day of the month, numeric (`00'..`31')
`%e' Day of the month, numeric (`0'..`31')
`%m' Month, numeric (`01'..`12')
`%c' Month, numeric (`1'..`12')
`%b' Abbreviated month name (`Jan'..`Dec')
`%j' Day of year (`001'..`366')
`%H' Hour (`00'..`23')
`%k' Hour (`0'..`23')
`%h' Hour (`01'..`12')
`%I' Hour (`01'..`12')
`%l' Hour (`1'..`12')
`%i' Minutes, numeric (`00'..`59')
`%r' Time, 12-hour (`hh:mm:ss [AP]M')
`%T' Time, 24-hour (`hh:mm:ss')
`%S' Seconds (`00'..`59')
`%s' Seconds (`00'..`59')
`%p' `AM' or `PM'
`%w' Day of the week
(`0'=Sunday..`6'=Saturday)
`%U' Week (`0'..`53'), where Sunday is the
first day of the week
`%u' Week (`0'..`53'), where Monday is the
first day of the week
`%V' Week (`1'..`53'), where Sunday is the
first day of the week. Used with '%X'
`%v' Week (`1'..`53'), where Monday is the
first day of the week. Used with '%x'
`%%' A literal `%'.
PHP-Nuke ID assigned to player
==============================
We can now assign the PHP-Nuke ID to a player. All players that do not have
a PHP-Nuke ID assigned will have a link on the player page that says
"I'm this player". This link will only show up if the user has logged in.
He can click on this link. Then the league admin can validate the user.
When you go to the "Edit Team" admin page, a list of all the players that
have requested their PHP-Nuke ID assigned to the player will be shown. The
admin will then be able to OK the request or delete the request. Once the
PHP-Nuke ID has been assigned to a player, that PHP-Nuke ID can then edit
any of the player information.
On the team page we can now designate a PHP-Nuke user as the captain. The
same procedure as above can be used to validate the captain. Once the
captain has been assigned to a team, that PHP-Nuke user will be able to
add/remove/modify players on his team.
Team Notification
=================
The team notification feature allows all the players on the team to be
notified if practice or a game has been canceled. This feature can be
reached from the "Edit Team" page. Once there, you will be able to
customize the "Cancel Practice" message and the "Cancel Game" message.
After that can setup whether to email the players and/or send an SMS text
message to the players.
To setup sending the cancel message to the players you select "Email Players"
to "yes". This will look at the email address field in the players profile
and send the above defined message. The "Email this Address" field is used
to send an email to one email address. Usually, this will be a mailing list.
Fill in the "From" address. This is to indicate who is sending
the email message and if sending to an email list should be a valid email
address that the mailing list knows. Note that the "Email Players" field
is independent of the "Email this Address". So, you could send email to
all the users as well as sending an email the the "Email this Address" field.
To send an SMS message, set "Send SMS to Players" field to yes. Then select
one of the providers. Usually, these providers make you create an account.
Put the account username into the "SMS Service Username" field and put the
password into the "SMS Service Password" field. If the service does not
need a username/password, leave these fields blank.
Autoupdate:
===========
The auto-update feature is setup via the Headings section via the admin
interface. You have to indicate which column is the win column (W), which
is the tie column (T) and which is the loss (L) column. Then you need to
indicate the column where all the points the team scores go (PF) and the
column where all the points that go against the team (PA) go.
Match Report:
=============
The match report features is a configurable option. If turned on, the topic
id must also be selected. This is where all the match reports will be filed
under. Then you have to decide if the match report should be posted on the
main home page or just in the news subsystem. Finally, you have to decide if
when a match report is posted, it is automatically posted or is put in the
news submittal queue like the regular PHP-Nuke.
When a match report is filed, the category story is set to the team name. This
way, you can see all the match reports for one team. A new option is provided
on the team page that allows you to see all the match reports for a particular
team.
If the automatic posting of the match report is turned on, the match report
will automatically be assigned to that particular match. (THIS FEATURE DOES
NOT WORK WHEN AUTOMATIC POSTING OF MATCH REPORTS IS NOT TURNED ON). When
the game summary page is viewed, the match report for each of the teams will
be able to be viewed.
WARNING: If you are running a freshly installed 6.7, the Version_Num field in
nuke_config is set to 6.5. You will have to manually change this to 6.7.
Todo list:
==========
o Import ability so that one can import entire leagues using a comma
separated file. (+v1.0)
o Team page should also show seasonal statistics. (+v1.0)
o The League Administrator needs to display who they are all to be consistent
with the rest of the interface. (+v1.0)
o Handle playoffs or tournaments/cups. (+v1.0)
o Add a Draft module (+v1.0)
o More error checking needs to be done and clean UI presented.
o The Player stats should be able to calculate things like the Standings
table can. (+v1.0)
o Allow a user to add comments about a player. Confirm by an admin. (+v1.0)
o Allow users to select their team and then create something like a "My Team"
page. (+v1.0)
o On the Team page, show past and future games. Maybe the past 5 and the
future 5. (v1.0)
o Allow the team page to incorporate "Team News" where users can post latest
news for their team. (v1.0)
CREDITS
=======
Francisco Burzi - For PHP-Nuke
MrOnline - For some icons and the league icon on the admin page
heshys - For providing bug fixes and new features
Viking - For providing the web site logo
Si - For testing, reporting bugs, and providing feedback
hieronymus - Volleyball sport information
Jorge Rodrigues - Portuguese language file
Luca Negrini - Italian language file, converted league.php to use lang files
and many bug fixes and new features
Astrid Ventevogel - Cricket sport information
Enrique Montes - Spanish language file and bug fixes
Emrah Eryilmaz - Turkish language file
Viktor Kemeny - Hungarian language file
Carpediem - Tennis sport information
Changes:
Change Log:
v1.0:
o Bug when calling overall statistics
o Bug on right blocks
v0.14:
o Fixed a major problem dealing with how the position was being handled. Now
the position of the player is stored per season. So, a player can be in
different positions for different seasons
o Only display the season stats of active league when displaying a player
o Minor display fixes dealing with wrapping text
o Added a "Move" link on the roster admin screen to make it easier to move
players between leagues/teams
o When moving a player, you can now remove optionally all references
to him from the league that his is leaving
o Fixed problem where you could not create two or more Standings blocks.
o Add Hungarian language file
o Fixed Previous Game block not showing the previous game if not in the
"current" season.
o Fixed the "Standings" block. Was displaying columns when they were not
selected.
o A number of bug fixes dealing with moving players from one league to another.
o Changed display of the PHP-Nuke email address to displaying the fake email
address.
o Add Tennis sport - Thanks Carpediem.
o Fixed the rightblock to be able to handle more than one season.
v0.13:
o Fixed query so that league can be created.
v0.12:
o "current team" had names of teams from previous seasons - by Heshy
o Display player stats for all games he was a member of a team - by Heshy
o On the team page only show current players for the season - by Heshy
o On admin edit only show players on roster for the game - by Heshy
o Fixing a bug when moving/adding players - by Luca
o Added some translations - by Luca
o Fixed a bug in sports.php when calculating points for soccer - by Luca
o Added Spanish Translations - by Enrique Montes Araujo
o Fixed bulk add code - by Heshy
o Fixed a link calling schedules with no options in main page - by Luca
o Fixed a problem when submitting match reports - by Enrique Montes
o Fixed problem when lifetime stats were not showing up correctly
o Fixed a problem when trying to add a player to an additional team from
the admin interface that is not in the php-nuke admin interface.
o Fixed a problem where the team creation date could not be set below 1901.
o When deleting a match report, the matchreport link was always staying around.
Added a 'Delete match report' option to delete the match report.
o 'Top League' block was not handing seasons or positions correctly - Thanks Si
o Add 'Top Career League' and 'Top Career Team' blocks.
o Add a 'Find Player' option on stat pages.
o Added a number of fields to the Player page to provide more fields to collect
data.
o Fixed a number problems relating to the admin code when accessing the
player page.
o Fixed probem when a user tried to update his own player info. Would not
let him do it. It does now.
o On the 'League Stats' page allow you to display per position. Save default
position in 'Prefs' Page.
o Add Turkish language file - Thanks Emrah Eryilmaz
o When deleting a game, recalc the standings because the deleted game might
have had a score in it which would affect the standings.
v0.11:
o Fixed the cricket sport. Did not have the calc values.
o Fixed a problem when displaying player stats. You could sort on the stats.
o Fixed a problem when displaying team rosters when no games were scheduled.
o Minor fixes in blocks to catch a few error conditions.
o Fixed problem on lifetime stats. The season is not set and therefore when
you click on the player, the stats where showing up with error.
o Fixed another problem with lifetime stats. If a players is not active, his
team id was not being set when creating the URL. Now we check if he is
active and if not, we get his last team that he played on.
o Fixed some problems dealing with players moving between teams mid season.
o Fixed problem with team names having a quot character in them.
o Fixed problem when configuring blocks.
o Moved the season selector to top of standings table.
o Added team name after player name when displaying stats.
o Some missed text that was not put into the language files - Thx Luca.
o Fixed a bug when moving players - Thx Luca.
o Fix for bug when displaying player via stats that does not belong to a team.
o Added a 'start' date when creating seasons. That we we can sort the season
based on the start date.
o Fixed textgram.com sms to work again.
o Fixed small HTML error in the notify script that was not displaying the form
correctly.
v0.10:
o When creating a league, the table win,tie,loss indicators were not being
set.
o Added the Volleyball sport. Thanks hieronymus.
o Fixed error where half time scores were not being added when updating matches
the first time.
o Added the ability to add a description of the league and the season.
o Fixed errors in how the hockey sports were setup.
o Changed the way the schedule of games are displayed.
o Add Portuguese language file - Thanks Jorge Rodrigues
o Fixed a bug when clicking on "Season Player Statistics" link.
Gave SQL error.
o Small formatting fix when displaying stats.
o Add the ability to export schedule via iCalendaer.
o Added the ability to see the different seasons if there are more than
two seasons.
o Added missing global declarations in edit_player().
o Fixes to get nuke-league to work with PHP-Nuke 6.5.
o Added the ability to handle different teams in different seasons.
o Add Italian language file - Thanks Luca Negrini
o Make league.php (admin interface) support multi-langs - Thanks Luca Negrini
o The stats page now displays a lifetime section and we limit it to only
display 40 entries.
o Add an "Player Name Misc" field as an additional field the can be used
to further identify the player (e.g. Jersey number, nick name, etc).
o Add a "Bulk Player from last season" to be able to create a new league with
the previous seasons players.
o Fixed "God" bug. Thanks Luca Negrini.
o Add 'cricket' sport. Thanks Astrid Ventevogel.
v0.9:
o Moved text messages into language files
o Add the ability to enter a match report. Uses the PHP-Nuke news facility.
o Fixed a bug where the "Full Schedule" link was hardcoded to league 1.
o Made the "I'm this player" and "I'm the captain" links configurable.
o Added a screen for when using the "notify" feature, you can now customize
the message before it is sent out.
o Allow the player infomation to be selectivley displayed. The player can
decide what he would like to display and who is allowed to see it - all
users, registered users, or only admins. If the user has not set this
information, there is a default that is set for the league.
o Fixed a minor bug when a nuke user is trying to modify the player who has
his nukeid assigned to it.
o Allow you to sort the stats. (from heshys, additional changes by me)
o Add a new standings block. (from Rudi, additional changes by me)
o Fixed bug in customization of 'Next' and 'Previous' games.
o Fixed bug when adding a player to an additional team.
v0.8:
o Added a validation screen when recreating the league tables
o Fixed a bug when updating players of a game. It was adding players to
the playerlist that where not yet on the team
o Allow the start date of a player to be edited
o Display the start and end date of a player
o Add autoupdate feature. Allow you to set if you want this feature turned
on or off.
o Recalc standings link will recalculate the standings all in one shot using
the results from the games that are in the database.
o Added a field in the team page that we call the "Short Name" field. It is
a field that should contain an abreviated version of the name. Used in
areas where there is not enough room to display the entire team name.
o Fixed some errors when links for admins were being displayed when they
should not have.
o Added icon so that admin can update games in "Next Game" block
o When updating in game in "Next Game" block, the game does not show up anymore
in the "Next Game" block, but will show up in the "Revious Games" block.
o Fixed an error with the Team Notify. The 'SMS Service Username' was not
being set correctly.
o Changed the score1 and score2 entries of nuke_league_schedule to int(10)
from varchar(10). NOTE: If you put ASCII characters in these fields, they
will be lost. You can now only put in a number.
o Fixed a problem with the admin error checks. You could not select
NO permissions. This has now been fixed.
v0.7:
o Run the text for the bio field through filter_text() to make sure everything
is cleaned up before it is saved.
o Added a new "Rightblock" feature. This allows you to define the type of
rightblock you would like to display when displaying Nuke-League pages. The
options are none, PHP-Nuke right block, or custom right block. You will
have to define your new right block. Use the Nuke-League interface under
the prefs menu. (from heshys)
o Added a "default row color" option that allows you define what type of
color should be displayed when showing things like the schedule or the
standings. It will uses this color as every other row. This makes reading
these tables easier. (from heshys)
o Continues with the admin capabilities. We now can assign users to be admins
of players and teams. The admin screen has change a little.
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
You will have to manually delete all the admin accounts that you have already
created by deleteing all the entries in the nuke_league_admin table or you
have to add the lid (League id) to each entry. It is easier to just delete
them and then recreate them.
o Allowed the PHP-Nuke ID to be assigned to a league player. And we can assign
a PHP-Nuke ID to be the captain of a team. Users can designate themselves as
they being either the player or the captain. The admin will be notified of
this and they will have to approve this. Once the captain has been approaved
he can also approve PHP-Nuke ID's for his team.
o Create a "Notify Team" link. This allows you to send an email to indicate
that practice or the game has been canced. It will email all the
players that have emails or send to an email list. It can also send SMS
text messaging message using one of the free SMS services provided on the
internet. The link to this is under the edit team page. It is defined for
each team.
o Players can now be moved to different teams and added to additional teams.
The stats will display the team information correctly, depending on when
a player was with the team.
o When displaying email, show it in long format.
(e.g. joubert at berger-family dot org)
v0.6:
o Fix bug when deleteing game it was not deleting the game summary and the
statistics for the players for that game.
o The schedule is now sorted by date and then place.
o Fixed bug in block.php
o Fixed bug when scheduling or updating games. Now a little message is
displayed in what the format should be.
o Add a player bio field.
o Add a menu block (from heshys)
o Add a stats page (from heshys)
o Add a "League Home" page (from heshys)
o Add a few more linking of data (e.g. blocks now allow you to click on the
team name) (from heshys)
o Removed the team id from the player table. This allows the player to be
moved around easier between teams and a player could play on two teams.
o You can now display the full schedule (from heshys)
v0.5:
o Bug fixes
o You can now customize the date format
o The schedule now only shows 20 items at a time. You then page to the next
20. The number of items displayed is customizable.
o The Edit Standings page now has a "Recreate Standings" link. This will
allow you to recreate the standings page if new teams are added.
o Game Summary has the team name's now linked to their respective pages.
o When displaying the team's or player's pages and there is no address
data to display, then don't display the blank information.
o Anytime a game is displayed, admin links are provided if the user is
allowed admin capabilities on the game.
o When the schedule is displayed, on the right had side of each game there
are three icons provided that a user can administrate the game if the have
this capability.
o The individual player page now shows the current season's game statistic
detail. You can also look at previous season's statistics.
v0.4c:
o Bug fixes
o Add admin graphic
v0.4b:
o Bug fixes
v0.4a:
o Bug fixes
v0.4:
o Blocks now handle different sports.
o Rearranged some code.
v0.3:
o Added support so that the sports can display different positions and
statistics about each of those positions.
o Add support so that the Standings table can calculate rows. And you can
now determine which rows you want to sort the standings by.
o Changed the way each sport was configured.
o Created a navigation bar to move a little easier through the menus.
v0.2:
o Support multiple sports
o Changed the way you create standings table
o Fixed how seasons where being displayed for player statistics for each season.
o Fixed how standings where being displayed for each season.
v0.1:
Initial release.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use