Categories
Soccer

MLS Playoff Widget

Now that the MLS season is close to an end, the playoff picture will start to come into clearer view. Using the Embed Widget module for Drupal, I was able to take a block containing the standings as a single table and make it available as a widget that anyone can put on their own website. The hardest part was theming it to look halfway decent, because the module wants to use the Color API module to generate a color scheme automatically based on one color. I overrode that with a single theme preprocess function to get the exact colors I wanted.

You can get the code for the widget over at Behind the Badge.

Sounder at Heart has questions about how ties are broken, so I’ll have to give that another look to make sure its on the up-and-up.