A Little About Me

I've been writing software for over 25 years now in a variety of languages. My experience runs the gamut but is mostly rooted in UNIX-based platforms. More recently, I've taken up implementing websites using modern CMS systems such as WordPress and Drupal. I write plugins, style extensively with CSS, and fix bugs. My personal interests include photography, competitive swimming, agility training, and of course -- my dog!

My dog

For Hire

My skill set is strong and I'm always looking for a new challenge. I love to solve problems and am often called in to get projects back on track. Contact me and let's talk!

Upgrading WordPress

With a move of servers, it was time to also consider upgrading WordPress & the themes I use. When this site and it’s sister site (silentadmin.gsans.com) were created, I had to do a few customizations in the underlying code beyond CSS styling to get the site to behave the way I expected. It was a painful installation and something I chose not to document in the hopes that over time I could “lose” those customizations.

Fast forward to today and now it’s time to upgrade not only to WordPress 3.5.1 but also to update the core theme, Atahualpa. Quite a bit has changed since the initial launch of this website including the fact that now there is to be no custom PHP in the theme. *OUCH* I did mention customizations above and, yes, there was some PHP code I had crafted for both sites. Upgrading would not be as straightforward a process as I had hoped.

Here are the steps I followed on this path:

  1. Upgrade WordPress to the latest and then test to see what’s broken / changed / no longer necessary
  2. Upgrade the Atahualpa theme and again test as above
  3. Upgrade all plugins and test to see what’s broken / changed / no longer necessary

What I found in the end was a website horribly broken. It would seem that I relied on PHP quite a bit along with some coding changes in the theme & a couple of the plugins. Yes, I knew it was there but you know we all like to just cross our fingers, close our eyes, hit the button (to upgrade) and hope that it turns out well in the end.

So here are the steps I’ve taken to correct the errors. The easy way out would be to just try and find ways to put back in the customizations but really — is that the right way? No. The end goal is to get to a point where I can easily upgrade without concern for overwriting something I may have in place.

Step 1: Look at all the plugins installed including ‘inactive’ and start massively deleting. It’s amazing how much cruft can accumulate over time. Did I really need 2 different contact form plugins? Did I really need 2 or 3 different captcha plugins? Nope. Time to start fresh but re-evaluating all and choosing only those plugins that have 1) an active maintainer and 2) fully serve the purpose.

Step 2: Re-evaulate the theme to see if it continues to serve the purpose (answer: yes!). I’ve seen quite a few plugins & themes abandoned over time so I’m pretty happy that the Atahualpa theme is still actively maintained and has a robust support forum.

Step 3: Determine what the must-have’s are and look for plugins that can help. That’s the fun part and one I found quite interesting.

shortcodesWithout a functioning contact form, tabs that slide out with nothing on them, menus that don’t drop down and a footer that looked like gibberish, there was quite a bit to fix. The first order was to determine what to do with all that PHP code and how much of it was still needed. Turns out there is a nifty plugin called Shortcode Exec PHP which allows me to embed my PHP within the site with added security. Only administrators can create the shortcodes with associated PHP code. Excellent! Better security than previous and with added functionality (reusable code, easy testing, etc.)
Next up was fixing the images to ensure that when clicked, the larger image appeared in a lightbox overlay and not just take the browser to another page. As easy as that may sound, I found that I just couldn’t get the Lightbox with Colorbox plugin to work with the media gallery. I hate to admit defeat on this and yes I did extensive research and testing but nothing appeared to work. Out of frustration, I went with the suggestion to use Easy Fancybox and to my delight, it worked first time out. Very easy to use and simple to configure. My image gallery needs aren’t complex so this plugin was exactly what I was looking for. Easy Fancybox can be configured to place all images, PDF, Flash, Youtube, Vimeo, Dailymotion & iFrames into a lightbox overlay. Note — the settings for Easy Fancybox is under Settings->Media.

On to the contact form and it’s attendant issues. I know that I really needed to use a captcha for the form but hadn’t put the effort in until now. Contact Form 7 had been the plugin in use on both websites but it’s always been a bit clunky for me so now was the time to look for something more to my liking.  My biggest complaint in using Contact Form 7 was that integrating a captcha didn’t always work as expected (even the “recommended” captcha plugin). Enter Fast Secure Contact Form and it’s companion plugin SI CAPTCHA Anti-Spam both by Mike Challis. Easy to install, configure & just works nicely together. It’s easy to find the settings for both of these plugins under the Plugins tab on the dashboard.

As I was trying to debug the issue with the lightbox for images, I came across something I hadn’t paid much attention to before. I was using the AddToAny plugin to place share icons with the posts. Well, one little nasty is that AddToAny lays your website into an iFrame and so communicates your viewers preferences to / from the AddToAny server. For convenience is the public statement but rings of privacy issues to me. I also noticed a significant performance increase once I deactivated the AddToAny plugin. I would much prefer a faster user experience than the dubious convenience of remembering one’s last share habits. For the time being, I’ve decided to go with Tweet, Like, Google +1 and Share plugin — I mean with a name like that, how can I go wrong? On the serious side though, I like that shortcodes are supported, you can add custom buttons, and there is minimal overhead. I’m not totally sold on this so I’ll update this entry after I’ve had more time to evaluate this plugin.

There were a few other minor adjustments made to the site — pulling out code no longer needed due to updates, fixing some styling issues created with the updates — but the majority of the work is listed above. I’m happy now that there will be less custom code needed and can now more easily keep abreast of new updates.  Now it’s time to get down to real work!

UPDATE: Not so fast on that heading back to work. It seems that there is a conflict with WordPress & Atahualpa if you want to have your menus right aligned. The trick is to turn off the animated menu option under the Atahualpa Theme Options.

UPDATE #2 (04/09/2013): DAMN! Easy Fancybox is incompatible with Amazon product preview. I LIKE having the product preview show up for certain items on the website. So…. back to the drawing board on what I’ll use for a decent lightbox solution. Stay tuned…..

Comments are closed.