TBD Game - When team names are not known | Peter's Sports League Standings | Forum

Back to the sports standings script page

Please consider registering

Log In

Lost password?
Advanced Search

— Forum Scope —


— Match —


— Forum Options —


Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
TBD Game - When team names are not known
September 23, 2008
9:18 pm

Is there any easy way to add games to the schedule (such as end-of-season playoffs) when the team names are not known yet?

If I create new teams called ‘TBD1? and ‘TBD2? then they will show up in the standings, so that is not really ideal.

So here is what I did:
1) Created ‘TBD’ Teams
2) Added new games for these teams
3) Edited these teams to make them Inactive

Then later, when we know which teams will be in the playoffs, we will edit these games.

Anyone have a better way??

September 24, 2008
12:31 am
Forum Posts: 841

Hi Jon,

I would have initially suggested that you just add a table manually for the schedule. I think your solution is actually pretty great and is the best idea within the framework. In fact, while it might be considered a "workaround" it is probably better versus hard-coding such functionality into the code.

Is there an administrative hassle for your solution? Only for leagues with many conferences and divisions would I see this being a problem, but then you could probably write a simple MySQL script to automate the process of creating the inactive TBD teams.

September 26, 2008
1:02 am

Hi Peter,
This workaround works pretty well. The only things not great about it:
1) Like you said, for each division, you need to create 2 different TBD teams (a team cannot play itself)
2) If you need to edit a game (for example the time changes) you need to first re-activate the teams; the form will not let you keep an inactive team as a selection in edit mode.

So it is good enough, I think alot of programming would be needed otherwise. For example, it would be nice to add a hard-coded option in the team select drop-down, something like:
<option value=”TBD”> TBD </option>
But then you would have to change other files to recognize this value as a special case that is not assigned to a division, etc…..

September 26, 2008
4:44 pm
Forum Posts: 841

I’ve decided this TBD thing would be a good addition to the core release.

As a result, I’ve created a beta release of version 1.3 for that feature.

Upgrade instructions are similar to before:

  1. Back up your files and database!
  2. Run the MySQL commands in upgrades/upgrade_1.x_to_1.y.sql to upgrade the database tables from Version 1.x to 1.y. If you are upgrading across multiple versions, you must run the commands in multiple files. For example, to upgrade from Version 1.0 to 1.2, run the commands in upgrade_1.0_to_1.1.sql, then run the commands in upgrade_1.1_to_1.2.sql. Note that starting from version 1.3 (upgrade_1.2_to_1.3.php), you run the equivalent PHP upgrade file in your browser.
  3. All files can be overwritten except for settings.php.

Download version 1.3 beta here

If you have a highly customized version 1.2 and don’t want to overwrite any files, first back everything up! Then, you must at least run the PHP upgrade file (which makes database changes) and then try to follow my notes on the file changes. (I don’t particularly recommend this, but I figure I should just make this an option for people like Jason who I want to test this.)

September 26, 2008
8:40 pm

Thanks. I’ll give it a shot and see how it goes.


Update went smooth. I like the new anchors you added to the Past and Upcoming Games Links on the Standings page.

The "upgrade_1.2_to_1.3.php" file worked perfectly and was a very nice addition for those upgrading.

October 1, 2008
11:46 pm
Forum Posts: 841

Thanks for testing this, Jason. Sorry, I didn't notice you edited your post :D I hope to release 1.3 (which is pretty minor) soon.