More on Opt-in and Opt-out

As the season comes to a close we are seeing a lot of scratches for our last couple meets. For this week we will be missing about 40% of our swimmers. Previously I had written about the pros and cons of Opt-in and Opt-out for swim meets and after watching this season unfold, I believe my thinking still holds.

Originally I had thought that opting in or out from a meet as a binary decision:  A swimmer was either participating or not.  It turns out it isn’t that simple.  Year round school is pretty popular here in Wake County, North Carolina and roughly 1/3 to 1/2 of our swimmers are in school for either all or part of the summer swimming season.  Since our meets are held on Tuesday nights, they tend to run pretty late and some parents are taking their kids out of the late events (e.g. Butterfly and/or Freestyle Relay).

This has resulted in what my wife is referring to as a “partial scratch”.  In addition to kids needing to leave early, we have also had some kids come late due to other commitments so they are missing one or two events early in the meet.

So as I sit down to implement opt-in and opt-out, I have concluded I need to account for partial participation in a swim meet.

Google Maps short code implemented

I have been using the Inline Google Maps plugin on the MacDolphins site but lately it has been flaky to say the least.  Sometimes the Google Map is displayed and sometimes it isn’t.  There isn’t any real rhyme or reason as to when it displays and when it doesn’t that I could find AND the plugin is actually hard to use, particularly for the casual author.

So I implemented a new short code for Google Maps called wpst_google_map which will take an address as an argument and display a Google Map.  The plugin uses this as part of the Club Profile to map a swim club for directions and such.  The short code is based on a Google Maps class called Phoogle Maps which has been extended to work with the plugin.  Phoogle Maps works pretty much as advertised.  I wish it didn’t echo it’s output directly to the output buffer but fortunately PHP can control the output buffer so it can be captured and used in the context of the plugin.

[wpst_google_map address="1600 Pennsylvania Ave, Washington DC, 20006" align="center"]

The short code syntax above will display a map similar to this:

RockBand Disc Scratched

Bah.  Our RockBand disc got scratched over the weekend and now it won’t do much other than start.  As soon as you try to play, the disc is deemed “unreadable”.  I thought EA would replace scratched discs but I got a “non-answer” from my support query so I will have to pursue that further.  I may have to go look for a used copy.

I am not sure how it got scratched but the Xbox, which we have vertically, was sitting on top of a cable over the weekend so it was slightly tilted.  I had read somewhere that discs can become scratched if the console isn’t horizontal or vertical although I am not sure if I believe it.  Regardless, the disc is scratched and now I need a new one.

RRoD for our Xbox360

For the second time, our Xbox360 has died due to the Red Ring of Death (aka RRoD) failure.  Since this has happened before, I know what to expect.  I am not as annoyed as I was last time because Microsoft has changed their warranty policy and will fix it and they have finally addressed the problem with downloadable content licenses.  I do still need to chase down the fact that all of our licenses didn’t get transfered last time but I will wait until the box returns.

I am actually not all that disappointed that the box failed.  It was really loud – I am hoping the replacement doesn’t have such a loud fan.  This unit has been much louder than the first one we had since we received it and the fan kicks on more frequently as well.

In the meantime, I have another Xbox at home which I had at work.  I had found an Xbox360 Elite (the black one) on Craig’s List a while back for $200 so I bought it thinking I’d take our original down to the beach house.  I didn’t have all of the pieces when I was last down there so the Elite has been sitting on my desk unused.  Depending on what we get back from Microsoft, I may just keep the Elite at home and take the replacement to the beach or put the replacement down in the basement.

Busy with Swim Team

It seems like most of my free time has been consumed with swim team lately.  I volunteered to help bring the MacDolphins into the 21st century this year and it has taken quite a bit more time than I expected it would.  A lot of that is because it is fun working a technical problem and doing it right.

We had some goals for the season.

  1. Report results in a timely manner.
  2. Capture times and keep a history so swimmers and parents could monitor their progress.
  3. Electronic registration to minimize data entry errors.
  4. Communicate quickly and effectively.

After searching the internet for an existing swim team solution I determined there really wasn’t anything suitable do I decided to write my own WordPress plugin to address part of the problem.  I had no aspirations to build a complete solution but I did want to offer something which addressed goals 1, 3, and 4 above.  I started working on the plugin early this year and for the most part, it is working out pretty well.  I wish I had a few more things done but I am happy with what I have been able to do.

For actual meet management, our team (actually me) ended up choosing WinSwim over the industry standard Hy-Tek solution.  I went with WinSwim mostly because their support was excellent and their ability to import our roster electronically.  For whatever reason, Hy-Tek has made doing this difficult if not impossible to do.  (Read more on my wp-swimteam plugin blog regarding my dealings with Hy-Tek.)

WinSwim is easy to use but it hasn’t been without some problems.  Fortunately they don’t seem to mind the volume of e-mail and issues I am sending them and they turn around solutions really quickly.  To distribute the data our parents and swimmers want to see (mostly their times), I have learned quite a bit about Crystal Reports.  It is pretty powerful once you get the hang of it but the learning curve is non-trivial.  This weekend I think I had the “ah-ha” moment because now I am able to edit and create new reports pretty quickly.

The season is coming to a close and I still have a few things to do.  I need to get end of season reports done for our banquet.  I think this will be pretty straight forward now that I think I have a handle on Crystal Reports!

New Shortcode – wpst_club_profile

I implemented a new shortcode to show club profile detail.  You can see the short code in action on the MacDolphins web site.

[wpst_club_profile clubid=1 googlemap=’y’ mapquestmap=’yes’ link=’yes’]

This short code can optionally display a Google Map but in order to do so, the Google Inline Maps plugin must be installed.  For the short code to display anything meaningful the club profile data must be enterted for the club of interest.

FireBug: Indepensible for theme development

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.

Tee'd it up to today

I got out for 18 for the first time in about three weeks.  Hard to believe it has been that long but it has.  I was in Europe for a week for work then came back and went to the beach for a week on vacation so when I got back to the office, I had two weeks of crap piled up.

I played pretty well today, shot 92 (45-47) which is the best round I have had in a while.  My short game was better than usual and I was reasonable off the tee.  I have tried choking up about an inch on my driver and I seem to hit it much more consistently and don’t really lose any distance.  I noticed Anthony Kim doing this when I was at the Wachovia Championship back in May.  Of course, he still hits it 300+ yards.  I hit a couple today which were about 250-260 out which is about as good as I can hit it.

I still left some strokes out there but not as many as I have lately.  I three putted a couple times and hit two balls in the water (#1 and #4).  I broke 95 which I have struggled to do lately.  I really want to get a few rounds in the 80’s – I think I can do it.  I am going to play on Saturday with two of my girls in the parent-child event.  Should be fun.

More on Short Codes

I had posted a question on Short Codes to the wp-hackers mailing list and got a pointed to an article on the Codex which explained the process of coding up a short code.  I expected it to be more involved than it was and I was pleasantly surprised to find it was really straight forward.  I have already implemented one short code for the wp-SwimTeam plugin and expect I’ll have half a dozen more done by the end of the week.

What I implemented for Flickr was pretty simple – it allows the insertion of a Flickr slideshow in a post or page using the Flickr UserId value (which is different than the username) and the Set Id.  Here is the snippet of code:

/**
 * wpst_flickr_slideshow shortcode handler
 *
 * Build a short code handler to display a Flickr slide show.
 *
 * [wpst_flickr_slideshow userid="id" slideshowid="id"
 *     frameborder="pixels" *     width="pixels" height="pixels"
 *     scrolling="yes|no" align="left|center|right" view="yes|y"]
 *
 * To show this Flickr slide show:
 *
 * http://www.flickr.com/photos/27604893@N04/sets/72157605764227907/show
 *
 * Use this shortcode:
 *
 * [wpst_flickr_slideshow userid="27604893@N04" slideshowid="72157605764227907"]
 *
 * This is the resulting IFRAME tag which is returned to the caller.
 *
 * <iframe align=center src=http://www.flickr.com/slideShow/index.gne?
 *     user_id=27604893@N04&set_id=72157605761943480 frameBorder=0
 *     width=500 scrolling=no height=500></iframe>
 *
 * If the 'view="yes"' or 'view="y"' attribute is include, a linl to the
 * Flickr slideshow will be placed under the IFRAME.
 *    
 * @param array - shortcode attributes
 * @return string -  HTML code
 */
function wpst_flickr_slideshow_sc_handler($atts)
{
    $c = container() ;
    //  Parse the shortcode
 
    extract(shortcode_atts(array(
        'userid' => '',
        'slideshowid' => '',
        'frameborder' => 'default 0',
        'width' => '500',
        'height' => '500',
        'scrolling' => 'no',
        'align' => 'center',
        'view' => 'no',
    ), $atts)) ;
    //  If either the userid or slideshowid are missing then
    //  we have a problem and can't do anything meaningful.
    if (empty($userid) || empty($slideshowid))
    {
        $c->add(html_br(),
            html_b("wpst_flickr_slideshow::Invalid Shortcode Syntax"),
            html_br(2)) ;
        return $c->render() ;
    }
    $if_src = "http://www.flickr.com/slideShow/index.gne?" .
        sprintf("user_id=%s&set_id=%s frameBorder=%s align=%s",
            $userid, $slideshowid, $frameborder, $align) ;
    $c->add(html_iframe($if_src, $width, $height, $scrolling)) ;
    if (($view == 'yes') || ($view == 'y'))
    {
        $link = "http://www.flickr.com/slideShow/index.gne?" .
        sprintf("user_id=%s&set_id=%s", $userid, $slideshowid) ;
        $c->add(html_br(2), html_a($link, "View this slideshow on Flickr."), html_br(2)) ;
    }
 return $c->render() ;
}

The code above makes use of the phpHtmlLib to generate HTML code but the general intent should be pretty obvious.