The Gippy Pages http://top-frog.com Polluting the internet since 2004 Tue, 31 Aug 2010 02:32:32 +0000 en hourly 1 http://wordpress.org/?v=3.1-alpha Now that’s a lot of frogs! http://top-frog.com/2010/08/30/now-thats-a-lot-of-frogs/ http://top-frog.com/2010/08/30/now-thats-a-lot-of-frogs/#comments Tue, 31 Aug 2010 02:30:07 +0000 Shawn http://top-frog.com/?p=1542 The Frog King

Artist Melody Sealman and a group of cohorts arranged thousands of plaster frogs on the 16th Street Mall this morning. The majority of the effort was spent on an arrangement outside the bus station at 16th and Market. The effort was mirrored in other cities as well. Sealman and her crew worked 8 months to prepare for this day.

Unfortunately a good deal of the frogs along other areas of the 16th Street Mall were swept up by maintenance crews.

Obviously by the two photos I chose to display, the feature she put together around the “king” centerpiece was my favorite. All the little frogs were gathered around, as if waiting for his command to pounce.

The Frog King surveys his minions.

Each little frog was hand made by Sealman and her friends. The frogs closest to the “king” were all wrapped in silver leaf. And to boot she encouraged viewers to pick one out and take it home. The only one she wouldn’t let anyone touch was the “king”. And for good reason. That little bugger is cool!

]]>
http://top-frog.com/2010/08/30/now-thats-a-lot-of-frogs/feed/ 0
Colorado Sport International Airshow. http://top-frog.com/2010/08/28/colorado-sport-international-airshow/ http://top-frog.com/2010/08/28/colorado-sport-international-airshow/#comments Sun, 29 Aug 2010 05:57:12 +0000 Shawn http://top-frog.com/?p=1537 Skybolt 300

I headed out to the Colorado Sport International Airshow today and had a pretty good time until my foot started bothering me. I think these shoes are toast ’cause I don’t have foot problems. I left early, before the 2nd air demonstration with the jets. Boo. Its probably for the best. The light wasn’t favorable (everything in the air was pretty much backlit) and I wasn’t shooting well anyway.

Update: A few more from yesterday:

Tail Gunner's Shroud   Southern Cross C-47   MiG-17   F-18C Tailpipe   Gary Ward's MX2
]]>
http://top-frog.com/2010/08/28/colorado-sport-international-airshow/feed/ 0
So fuzzy! http://top-frog.com/2010/08/21/so-fuzzy/ http://top-frog.com/2010/08/21/so-fuzzy/#comments Sat, 21 Aug 2010 18:14:02 +0000 Shawn http://top-frog.com/?p=1526 Fuzzy Caterpillar on My Hat #1

Found this lil’ guy making his way across the sidewalk this morning while walking the dogs. So, naturally, I interrupted his walk to talk a few pics… he was rather confused about suddenly being in the air and moving around. Didn’t make him any less active, though. Lil’ bugger was hard to shoot ’cause he wouldn’t sit still.

Fuzzy Caterpillar on My Hat #2

]]>
http://top-frog.com/2010/08/21/so-fuzzy/feed/ 0
Baseball! http://top-frog.com/2010/08/14/baseball/ http://top-frog.com/2010/08/14/baseball/#comments Sun, 15 Aug 2010 05:59:19 +0000 Shawn http://top-frog.com/?p=1520 Rocks V. Brewers

Its that time of the year again. Time for the annual Crowd Favorite trip to the ballpark. Tonight it was the Brewers that were in town to hand the Rockies a last minute loss. Boo! Oh well. I got free beer, pizza and hotdogs. As far as I’m concerned the game was great! ;)

Also managed to pull off a decent panorama. I should have gone around to the right some more, but overall I think it’s OK.

Rockies & Brewers Panorama

Link to full size panorama.

]]>
http://top-frog.com/2010/08/14/baseball/feed/ 1
A bit wonky, but I still like it http://top-frog.com/2010/08/10/a-bit-wonky-but-i-still-like-it/ http://top-frog.com/2010/08/10/a-bit-wonky-but-i-still-like-it/#comments Wed, 11 Aug 2010 03:44:28 +0000 Shawn http://top-frog.com/?p=1516 Wonky silhouette sunset...

I would like it better if there was more of those great clouds in the negative space towards the lower left, but all in all its still fun.

]]>
http://top-frog.com/2010/08/10/a-bit-wonky-but-i-still-like-it/feed/ 0
WordPress export, import and double serialization. http://top-frog.com/2010/08/02/wordpress-export-import-and-double-serialization/ http://top-frog.com/2010/08/02/wordpress-export-import-and-double-serialization/#comments Tue, 03 Aug 2010 05:32:47 +0000 Shawn http://top-frog.com/?p=1509 Ran in to a fun one in the WordPress core today. If your plugin stores post meta and you store that post meta as an array then you’re prone to a bug in the WordPress core that can break your data should someone export their data and reimport it on another WordPress install. Yeah, this is a small minority of what actually goes on in WordPress but when you’re dealing with migrating data from one install to another, or are trying to supply complex sample data with a theme distribution, then things like this tend to get on your nerves. Quickly.

I’m gonna sound jaded through this writeup, but I’ll get over it.

Say your plugin saves and retrieves data correctly, like this greatly oversimplified example:

  1.  <?php
  2.  global $post;
  3.  $postmeta = array('one','two','bunnies');
  4.  add_post_meta($post->ID, 'my-meta-key', $postmeta);
  5.  // ...
  6.  // and later
  7.  // ...
  8.  $postmeta = get_post_meta($post->ID, 'my-meta-key');
  9.  ?>

You’re properly using the post-meta api and your array is serialized in the database, all safe and sound.

Now imagine your user migrates to a new host, exports a WXR and imports that WXR on their new host. Your data will break. Why? On import your serialized array is then double serialized as a string. The post-meta in the WXR is imported the same way as if the data had been saved programmatically which means it makes a trip through the function maybe_serialize. Unfortunately maybe_serialize has a bug that explicitly serializes already serialized data. So now your data is broken because your serialized array has just been serialized as a string. Don’t expect this behavior to change any time soon. The core WordPress team is too worried about breaking the functionality of plugins who have been saving data the wrong way to try and make this function work correctly. You have to safeguard yourself against its behavior.

Its not a lost cause, though, you can protect yourself by being a bit more verbose when pulling your post meta. When retrieving your post meta don’t assume that you know how its gonna come out. Yeah, it sounds funny, but its better safe than broken. Simply changing the above code by one line can help protect your data when it moves from server to server. Like so:

  1.  <?php
  2.  global $post;
  3.  $postmeta = array('one','two','bunnies');
  4.  add_post_meta($post->ID, 'my-meta-key', $postmeta);
  5.  // ...
  6.  // and later
  7.  // ...
  8.  $postmeta = maybe_unserialize(get_post_meta($post->ID, 'my-meta-key'));
  9.  ?>

By wrapping the get_post_meta function call in a maybe_unserialize call you force the data coming out of the database to be inspected one more time and then double-unserialize if necessary. Its extra work but it can save your butt.

]]>
http://top-frog.com/2010/08/02/wordpress-export-import-and-double-serialization/feed/ 4
It was a flower kinda day this morning http://top-frog.com/2010/08/01/it-was-a-flower-kinda-day-this-morning/ http://top-frog.com/2010/08/01/it-was-a-flower-kinda-day-this-morning/#comments Sun, 01 Aug 2010 18:39:09 +0000 Shawn http://top-frog.com/?p=1503 Is that pollen in your pocket?

The wife went off to run and naturally, I went off with my camera ;) After all, why would I run? I wasn’t being chased.

Little bee, big flower

]]>
http://top-frog.com/2010/08/01/it-was-a-flower-kinda-day-this-morning/feed/ 0
Rooftop Sunset http://top-frog.com/2010/07/26/rooftop-sunset/ http://top-frog.com/2010/07/26/rooftop-sunset/#comments Tue, 27 Jul 2010 05:23:06 +0000 Shawn http://top-frog.com/?p=1493 Rooftop Sunset

Kids: don’t try this at home. I’m a trained… well, buffoon, probably. ;)

]]>
http://top-frog.com/2010/07/26/rooftop-sunset/feed/ 0
WordPress TextMate Bundle Updated http://top-frog.com/2010/07/22/wordpress-textmate-bundle-updated/ http://top-frog.com/2010/07/22/wordpress-textmate-bundle-updated/#comments Thu, 22 Jul 2010 06:38:30 +0000 Shawn http://top-frog.com/?p=1488 I just updated the WordPress TexMate Bundle with some new features.

Cron/Scheduled Events

I’ve never really worked with the built in Cron in WordPress but have heard others talk about how much of a pain it is. After recently reading a Sitepoint.com article on scheduling events I was able to get the jist of it. The WordPress Bundle now includes snippets for complete actions such as registering single and recurring events. I figure I had better get the snippets in there while it was fresh in my mind.

Transients

A little less fresh in my mind were Transients. After watching a presentation on caching at WordCamp Boulder by the very likable (and, yes, smart) Sean O’Shaughnessy and Chris Scott from Voce Communications I got pretty stoked about these functions. Like the wp_cache… shortcuts there are now shortcuts to the transients functions. For more information about the wonderful world of transients check out WordPress Codex pages on the Transients API.

Scripts & Styles

Two new shortcuts for wp_register_script and wp_register_style were added. Though they’re a couple lesser used functions, I feel they’re a bit underused as well.

All done for now

So, while not a huge update it adds some obscure references that hopefully help some folks dive deeper in to developing for WordPress.

]]>
http://top-frog.com/2010/07/22/wordpress-textmate-bundle-updated/feed/ 1
Firefox view-source tab-width http://top-frog.com/2010/07/15/firefox-view-source-tab-width/ http://top-frog.com/2010/07/15/firefox-view-source-tab-width/#comments Thu, 15 Jul 2010 23:53:37 +0000 Shawn http://top-frog.com/?p=1476 Rejoice! There’s a way to set the tab with of the view-source window in Firefox. In March of this year Mozilla finally added an about:config option to control the tab-width in Firefox.

I’m on Firefox 3.6.6 and it works like so:

  1. Enter about:config in the url bar.
  2. Filter the list (using the search box at the top) by typing view_source.
  3. If you already have an option for view_source.tab_width then simply change its integer value and you’re done.
  4. If you don’t have an option for view_source.tab_width then continue.
  5. Right click in the window and select New > Integer from the flyout menu.
  6. Name the field view_source.tab_width and give a value appropriate to your needs, for me that was the common default of 4.
  7. Rejoice!

For more info there is a full list of about:config options at Mozillazine.

[update]: Pingbacks and Trackbacks have been disabled on this post ’cause its getting abused by people using the PingCrawl plugin.

]]>
http://top-frog.com/2010/07/15/firefox-view-source-tab-width/feed/ 0