I have just uploaded v0.1.375 of the wp-SwimTeam plugin to the downloads page. This build fixes an issue with swimmers who have birthdates in close proximity to the age cutoff AND they are at the maximum age. The calculation of the “adjusted” age was incorrect in some cases resulting in swimmers not being able to be registered.
In addition to fixing this problem, I added some additional error checking and validation around swimmer birthdates and registering for an active season. The Add Swimmer capability now includes an “override” to allow swimmers who are too old to be added to the database. This is being done to support team records, which likely has swimmers who have long since aged out of swim team.
This build also fixes an issue with database queries that appears from time to time when a large number of swimmers was in the database. The query infrastructure has been improved to leverage the existing WordPress query structure.
There were also a few more UI clean up changes.
This build has not had an extensive amount of testing but I believe it is an improvement over the last build. I hope to get some solid testing in tonight using a dump from the MacDolphins database.
WordPress has a built in set of Roles and Capabilities. The wp-SwimTeam plugin makes use of these standard roles and capabilities to allow certain actions to be performed. At least it is supposed to. It turns out that when I redesigned the menus to take advantage of the 2.7 Dashboard, I restricted access to all of the menus except the end user capability to users with Administrator privileges.
This is a mistake and this morning I committed a change which will rectify the problem. The way it is supposed to work is as follows:
- Subscriber – access to the “Swim Team” end user menu and capability.
- Author – Subscriber capability plus access to the Report Generators.
- Editor – Author capability plus access to the Manage menu and capability.
- Administrator – Author capability plus access to the Options menu.
In theory the Options menu contains items which should be set once and by in large, left alone. The Management menu contains the items which require regular interaction from one or more users who coordinate the Swim Team.
There is a bug in the Report Generator and the Roster CSV export which prevents the CSV file from being sent to the browser for download. I ran into this with the MacDolphins this morning as I was working on our 2009 Registration. I have fixed the problem and committed the changes, I will post an update later this afternoon of this evening.
The nice folks at WinSwim are interested in what I am doing with this plugin and have offered to host a demo site. You can find it at: http://wp.winswim.com The demo site is running for the most part, if you are interested in trying it out, go ahead and register with the demo site then drop me an e-mail so I can change your permissions so you can actually do something other than register sample swimmers.
I say the demo site is running “sort of” because just about everything is working although there are a few bugs I know of (e.g. defining age groups). The one thing which isn’t working and it is driving me nuts is the ability to display a Google Map. This is a really nice feature that my own team used quite a bit this year.
I have encapsulated a class called Phoogle within wp-SwimTeam and it worked just fine in my development area and on the MacDolphins site. Phoogle relies on a PHP configuration option known as allow_url_fopen which basically allows PHP to open a web page on an external site and read the content like it would a local file. It’s a nice feature but one that a lot of web hosting providers turn off. In fact, the host for the demo site has it turned off.
There is another technology called cURL which for all practical purposes, accomplishes what allow_url_fopen does although it is a little more involved. I enhanced Phoogle to use cURL if allow_url_fopen is disabled and it worked just fine in my development area. Great! The change was pretty simple too. Uploaded to the production server and nothing. It doesn’t work there. It turns out that GoDaddy (the web hosting provider) has a goofy cURL implementation which requires the use of a proxy.
After a much trial and error and a couple e-mails with GoDaddy support, all I have accomplished is a partial cURL request. I am unable to get a complete response which prevents the map from being displayed. I then got another e-mail from GoDaddy telling me that cURL is only supported on their Linux hosting environments not under Windows (even though it is enabled in PHP.ini). Bleh. ;-(
I have yet to code a WordPress theme from scratch. I have found something I like and started from there. For the MacDolphins web site, I had found something simple a while back and it served it’s intended purpose but it wasn’t without issues.
As the site has grown, the need to tweak the side bar in particular has increased. I found an extension to FireFox called FireBug which has made this process significantly easier. I am using FireBug to chase down CSS conflicts and oddities but it does much more than I realized.
My theme now works correctly even if it isn’t visually very exciting. The mouse overs no longer overflow the sidebar for 3rd and 4th level deep menus. I was able to resize the sidebar and the overall content area without things ending up in the wrong spot. If you dink with themes, FireBug is really helpful.
I just committed a pretty important fix to address a bug in the Assign Label function. If a label is manually assigned, the swimmer would be marked as Inactive on the master swimmer list which is incorrect. This was a leftover artifact from reusing the Unregister code. It has been fixed and now swimmers are propertly labeled AND if Swimmer Label field is properly initialized with an existing value if there one (which wasn’t happening either).
The other thing I ran into as a result of running our Time Trials last night is the need for a confirmation on the “Assign Labels” functionality as it will re-assign all the swimmer labels which may not be the desired state as it was in my case last night. Fortunately only 2-3 new swimmers had been added to the database since I had assigned labels so manually fixing them wasn’t too much work but I’d rather not have done it at all.