I posted wp-SwimTeam v0.1.417 this afternoon to the download page. This update adds new functionality and fixes a few minor things which have bothered me as I found them during the season.
The big new feature is a new shortcode – wpst_meet_report. This shortcode allows a the contents of a meet report to appear in a post or a page like this example on the wp-SwimTeam demo site.
The reports also now support hiding first and last names by only showing the initial as well as the ability to override the first name with a nickname if the swimmer’s profile has one. The missing ability to display a map on the swim meet report has been added so the checkbox on the form is now enabled. The reports can now display opt-in and opt-out information chronologically in the order they were added to the system as well as the previously available by name and by swimmer label.
Last night I fixed the Google Maps problem by re-coding the way I was getting the data from Google. I had been using a class called Phoogle but have eliminated it in favor of a direct AJAX solution using Google’s AJAX API.
Instead of embedding this new solution in the wp-SwimTeam plugin, I implemented as a widget in phpHtmlLib. It works pretty well too!
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 think for now when I find a short code, I will check the allow_url_fopen setting and if it is off, will issue a warning during the short code processing. There is probably a way to interact with the Google Maps API via Javascript, I guess I will need to look into that. It is really too bad, the Phoogle solution was really simple to use.