Arrow

Version 1.1 beta release and feature walk-through | Peter's Sports League Standings | Forum

Back to the sports standings script page

Please consider registering
guest

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
Version 1.1 beta release and feature walk-through
May 14, 2008
1:50 am
Peter
Admin
Forum Posts: 841
Offline

Download the version 1.1 beta

See the installation instructions in readme.txt or see the main script page as the steps have not changed from version 1.0.

If you are upgrading from a version 1.0 installation:

  1. Run the SQL command in upgrade_1.0_to_1.1.sql to upgrade the database tables from version 1.0 to 1.1.
  2. All files can be overwritten except for settings.php, unless you have customized the display in standings.php or update.php.
  3. settings.php has a new setting for winning percentage calculation, so you can copy and paste that section to your existing settings.php

Feature walk-through

Multiple scores can be added at once

In the conference view, click the "Add a new score of game" link as usual. You should see a new dropdown list to select how many scores / games to add at once:

Dropdown list to add multiple scores

You can select anywhere from 1 to 10 scores to add, and the page will show the specified number or entry forms.

Multiple forms on the same page to add multiple scores

Non-admin users can edit their own profile

Previously, only admin user(s) had access to a special "Manage users" section to edit each user account. However, now each logged in user can edit their own name, e-mail address and password (this is a subset of a user account -- the admin user(s) can edit more properties).

When a user first logs in, there is a new "Edit my profile" link:

Link to edit your own profile

Clicking this link brings up the "Edit profile" page:

Edit profile page

Winning percentage can be calculated in multiple ways

In settings.php, there is a new setting:

// Setting on how to calculate winning percentage
// A setting of 1 means wins divided by total games played minus ties (ignoring ties)
// A setting of 2 means wins plus ties divided by two divided by total games played (ties are half-wins)
// A setting of 3 means points divided by total possible points
$winning_pct_calc = 1;

New standings sorting logic

If you look at the standings.php code, it explains the available fields that you can sort by:

Available sort fields:

Name: teamname
Wins: teamwins
Losses: teamlosses
Ties: teamties
Forfeits: teamforfeits
Runs for: teamrf
Runs against: teamra
Games behind: gamesbehind
Points: points
Winning percentage: winningpct
Custom tie break: teamorder

Separate the fields by commas and always specify a sort order as DESC for descending and ASC for ascending

Use this information in the code directly below that section in order to customize the order of sorting. For example, when you sort by wins (basically when a user clicks the "wins" column), if multiple teams have the same number of wins, you can specify the next few sorting criteria.

New "custom order" team field

Related to the sorting discussed above, there is a now an arbitrary sort field that is editable whenever you edit a team. This is useful if, say, you settle tie-breakers by head-to-head record. Simply calculate the head-to-head record yourself, then give the team with the better head-to-head record a higher "custom order" field value:

Custom order team field

Link from team names to show a specific team's score and schedule

In the default standings display, each team name is now linked:

Linked team names

Click on any team name to bring up its full schedule of past scores and upcoming games:

Full team schedule

For the technically inclined, the display of the schedule is now a function, meaning that it can be more easily included into your custom implementation. Look in standings_functions.php for the sls_team_schedule function and accompanying usage description.

May 14, 2008
7:24 am
Jason
Guest

Nice job!!! I'm going to try out the new version tonight and will give it a good test run. I'll get started on the documentation once I'm familiar with all the new features.

May 14, 2008
10:03 am
deedee_guzgan
Guest

I have problems pls help

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\\wamp\\www\\Website\\standings.php on line 238

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\\wamp\\www\\Website\\standings.php on line 240
Team Name GP Wins Losses Ties Forfeits RF RA GB PCT Points
Peter's division

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\\wamp\\www\\Website\\standings.php on line 238

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\\wamp\\www\\Website\\standings.php on line 240
Team Name GP Wins Losses Ties Forfeits RF RA GB PCT Points

May 14, 2008
10:05 am
deedee_guzgan
Guest

i'ved put again from the beggining....release 1.0 is working...but when i trie to put 1.1 is not working!!
I haven't upgrade i'ved put again like in 1.0!!

May 14, 2008
12:06 pm
Peter
Admin
Forum Posts: 841
Offline

Hi deeded, please follow the upgrade instructions, including running the SQL upgrade commands.

May 14, 2008
1:30 pm
deedee_guzgan
Guest

man i haven't upgrade i start all from the begining

May 14, 2008
1:35 pm
Peter
Admin
Forum Posts: 841
Offline

Even if you started from the beginning, please run that upgrade script. I had not yet incorporated that into the main SQL install code and will have to do so for the stable release.

May 14, 2008
1:59 pm
deedee_guzgan
Guest

sorry man i tried all the posibilites it is't working same problem i tried to upgrade..to pun 1.1 from begining wihtouth upgrade...1.0 is working.... it isn't working

May 14, 2008
2:13 pm
deedee_guzgan
Guest

the same error

May 14, 2008
8:08 pm
Jason
Guest
10

Great job Peter. So far I haven't found any bugs in the new additions and I love the multiple game add/update feature. I've got the new version running and active on my site. Thanks.

May 15, 2008
5:34 am
deedee_guzgan
Guest
11

peter i'ved tried all is the same problem......

May 15, 2008
11:39 am
Peter
Admin
Forum Posts: 841
Offline
12

deedee_guzgan said:

peter i’ved tried all is the same problem……


Sorry, based on what you've said I don't know what the problem could be. Does anybody else have an idea?

May 15, 2008
1:54 pm
deedee_guzgan
Guest
13

pls make the 1.1 withouth upgrade