May 18, 2012

Automatically update the copyright year in your footer

If you work on many websites it doesn’t take long before you realize how many of them have out of date copyright dates in the footer. Back in the good old days when sites were hand-coded and php was seldom used, copyright dates were hard-coded along with just about everything else.

It’s so easy to fix that problem and I”m going to show you how simple it is. You don’t need to know anything about php either. All you have to do is drop this little piece of php code into your footer and it will take care of the annual updating of the year for you. No more batch search and replace operations to replace 82 pages of out of date copyright years. Yay!

So let’s say your current footer looks something like this…

<p id="footer">copyright © 1998 by My Big Old Company, Inc</p>

To put that copyright year on auto-pilot, simply drop this bit of code in there and sit back and relax.

<p id="footer">copyright © <?php echo date('Y'); ?> by My Big Old Company Inc</p>

If your copyright is a range of years, like 2001-2011, just add the snippet after the dash of the first year like this…

<p id="footer">copyright © 2001-<?php echo date('Y'); ?> by My Big Old Company, Inc</p>

I don’t know much about PHP but I do know how to add that little bit of code and it takes away a big nuisance that used to occur every year. You can learn more about PHP and the date function by visiting PHP.net

Review: WordPress 3 Site Blueprints by Heather R. Wallace. Packt Publishing

The recently published book, WordPress 3 Site Blueprints by Heather R. Wallace and published by Packt Publishing is an ambitious project that belies the slim volume that it is.

According to the author, the book is primarily geared to a “self-learner” or a “WordPress consultant” who is “interested in exploring all that this open source software has to offer…” The book’s premise is to provide a “blueprint” in the design of 9 different types of WordPress websites. Each blueprint or chapter walks you through the process of configuring a sspecific WordPress Theme. The types of sites  (blueprints) discussed are:

1.Migrating a Static site to WordPress
2.Building a Community Portal
3.Building an E-Commerce Website
4.Building a Local Classified Ads Website
5.Building a Consumer Reivew Website
6.Building a Job Board Website
7.Building a Micro blogging Website
8.Building a Local Business Directory
9.Building a Membership Website

In addition to the 9 blueprints, there is an appendix that presents several WordPress plugins that the author feels may be of value such as WP-DB-Backup, Akismet and several others. Another appendix provides a guide to installing WordPress Themes and plugins.

I found the first two chapters to be very helpful. Chapter 1 describes the process of migrating a static HTML site to a dynamic WordPress site. Although the author does not provide specific instruction as how to actually install WordPress, she does direct you to online resources to accomplish that task. A concise discussion gives you the information you need to add appropriate WordPress specific code to your HTML files to turn them into a working WordPress “theme.” Resources are also provided for free and premium ($) themes.

Chapter 2 shows you how to integrate bbPress, BuddyPress and WordPress to enable you to create a community portal site. bbPress provides a forum component, while BuddyPress enables users to interact in a facebook-like manner. The basics are covered but novices may require additional hand-holding to undertake such an ambitious project.

The other blueprints are covered in a similar concise fashion, providing the basic information you would need to get the specific type of site up and running. Each  blueprint presents a suggested way of configuring settings and adding specific plugins suited to the particular blueprint.
This slim volume covers a lot of ground. The author provides a lot of additional online resources which is helpful.

What I found most disappointing was that several of the blueprints require “premium” themes or plugins that cost real money. In some cases the plugins or themes are relatively pricey and this may diminish the ability for some people to carry-out the projects.

Overall, WordPress 3 Site Blueprints gives the reader a good idea of where WordPress can take you. It abolishes the notion that WordPress is only for blogging. In fact, WordPress is fast becoming a viable platform for just about any type of CMS site you can imagine. All it takes is the right combination of themes and plugins.

I do wonder whether the book is going to satisfy the inevitable quesitons that a novice will have while the more adept user may desire a deeper exploration of the mechanics of WordPress and plugins.

Poor iPod Touch – iPhone battery life after iOS 4.x upgrade

I’ve got a 2G iPod Touch. It’s 22 months old. I had been running OS3 on it ever since OS3 was released and my battery life has been quite good. I’d be able to go several days before needing a charge. That all changed immediately following my updating to iOS 4. I was shocked at how quickly my battery lost its charge. I’d notice in the evening that I had 75% charge and in the morning it would be almost nothing. I never completely shut down my iPod but let it sleep instead. I also noticed that startup time took nearly 35 seconds where in OS3 it was more like 15 seconds to startup.

I began to research this issue and discovered a lot of other people voicing similar complaints with iPod’s and iPhones that had been upgraded to iOS 4. And a check in the Apple Forums uneartherd numerous threads with many people also complaining about the greatly accelerated draining of the battery with iOS 4. Here is an excellent forum with extensive discussion on the battery life issue

Numerous suggestions were offered to improve the battery life. Some of the suggestions were…

  • In Settings>Fetch New Data, turn Push off.
  • In Settings> Wi-Fi, turn Wi-Fi off.
  • Make sure you do not have multiple applications running.
  • Sync and backup your iPod.  Restore the iPod to factory settings by going to Settings>General>Reset. Re-sync to restore your apps.

Well, none of those suggestions helped improve my battery life. To clarify, if I don’t have Wi-Fi on, my iPod becomes pretty useless for the things that I use it for so turning Wi-Fi off was no solution. Same with turning Push off.

The point is this: with no change in my usage pattern, my battery life plummeted with the installation of iOS4 leading me to conclude that there is something inherent with iOS 4 causing my iPod to suddenly suck battery power. It might be as simple as this… here is what I’ve learned about iOS4 compared to iOS3;  iOS4 has a persistent Wi-Fi mode which means that prior to iOS4, Wi-Fi turned itself off when the iPod Touch was locked. Not so with iOS4… Wi-Fi remains on even when your iPod is locked so that may explain my precipitous drop in battery life. I haven’t had enough time to investigate this further but in the coming days I will try to make sure I turn Wi-Fi off wen I absolutely don’t need it to see it helps. It certainly should because Wi-Fi definitely will use more power than not having it on in the first place. If that turns out to be the main reason, what a pain in the butt it will be to always have to turn Wi-Fi off when not needed in order to save battery life compared to pre-iOS 4 days.

I felt that downgrading to iOS3 would be the most logical thing to do but when I called Apple Support to inquire about this I was told that Apple does not directly provide a way to downgrade to a prior OS. The tech implied that it was possible to do via an unsupported Apple technique but I have researched and concluded that I don’t want to attempt that myself. If you search for it on Google, you’ll find tutorials explaining how to do it but there is some risk that you’ll mess up your firmware and you may not have a positive result. I’d rather not attempt that, your mileage may vary.

I have AppleCare so that leaves me with about 2 months of AppleCare extended warranty coverage. I decided to walk my iPod to the Apple Store near me. Once there the Genius ran some diagnostics on my iPod and concluded that the battery itself was nearing the end of its useful life. I realize that Li-Ion batteries have a limited lifespan that diminishes according to how many charge cycles it has gone through but I just wasn’t completely buying his conclusion since my battery had been holding a charge very well and it was only after upgrading to iOS 4 that the accelerated battery drain took place. The Genius on the other hand smirked at me and told me that my battery was 2 years old and was shot. He felt it was merely a coincidence that my battery life seemed to be less with the iOS4 upgrade. He recommended I replace the iPod and since I was under AppleCare I went with that option.

It’s a fact that eventually my battery will die completely so at least I’ve got a newer battery. After one last sync with my computer and Mobile Me, I handed over the nearly 2 year old iPod 2G and received a new replacement (still 2G though.) That’s a great reason to have AppleCare since it would have cost around $80 to have Apple to replace the battery. The peace of mind that comes with having AppleCare, for me, makes it a good thing to do. And I’ve still got 2 months left so if this doesn’t fix my battery drainage issue, I can go right back to Apple within the next 2 months and pursue this further.

Has it solved the battery drain issue? I don’t know yet. I’ll know the answer to that in a few days and will follow up with an update to this post. In the meantime, I’d like to hear your experiences with iOS 4 and your iPod and iPhones. Have you noticed any difference in battery usage since you upgraded to iOS4?

Review of Nikon Coolpix L110 digital camera

Nikon Coolpix L110 digital camera

Nikon Coolpix L110

Several months ago I purchased the Nikon Coolpix L110 camera. Since then I’ve taken thousands of photos and hundreds of videos with the camera. It has proven to be quite a capable camera in its price range with many strengths and few weaknesses.

Specifically regarding strengths of this camera, the Macro mode is fantastic. If you enjoy taking close-up photos of flowers, bugs, fine detail of artwork, etc, you will enjoy this camera as it takes excellent macro photographs and allows you to get extremely close to your subject. The L110 also has an amazing 15x optical zoom. A 15x zoom is equivalent to a 420mm lens and this lets you really zoom in tightly which makes it great for wildlife photography, travel, sports and nature photography. Image stabilization helps you get those zoomed shots by helping reduce hand-held camera shake. Don’t forget to turn off image stabilization if you are using a tripod. Image stabilization is only to be used when hand-holding the camera.

THE 720p HD video capture of the L110 is surprisingly good. While most camcorders in the under $300 price range only provide mediocre at best still photography capabilities, the L110 which provides excellent still photographs also produces excellent HD video. The larger form factor of the L110 makes taking videos a lot easier too compared to holding a smaller camcorder.

On the not so great side the L110 audio quality leaves a lot to be desired. And low light performance, particularly video, is not very good. In low-light situations you will see a lot of graininess in the video and the frame rate seems to drop as well. Still photography is possible in lower light situations since the camera does have a flash. But if you are looking for manual control of your camera’s aperture, shutter and ISO, you will be disappointed in the L110 as there is little manual control available.

I’ve posted a fairly complete review of the L110 on Amazon. If you read my review on Amazon, be sure you also read the comments as many people have asked questions that I’ve attempted to answer as best I can. A lot of information not in the review is presented in the comments. http://www.youtube.com/watch?v=wgYAAZ1zbqA

Here are some representative photos taken with the Nikon Coolpix L110…

Review of Planet Bike Superflash Tail Light


When I’m cycling, I’m most concerned about traffic coming up from behind me. I want to do all I can to ensure that distracted motorists will be able to easily see me. To help make sure this happens, I always use a tail light.

One of the best tail lights I’ve found for cycling is the Planet Bike Superflash tail light. It is extremely bright and can easily be seen even in bright daylight. At dawn or dusk, it is incredibly noticeable.

Typically the light will be mounted on your seat post or attached to the back of an under-seat bag. It runs on 2-AAA batteries and battery life is excellent. I easily get a season out of one set of batteries. It’s diminutive size belies it’s amazing performance. The superflash is about $20 and available from Amazon.com

Remove Sansa Clip+ Duplicate files preceded with ._ in track listing with dot_clean terminal command

I’ve got several Sandisk mp3 players… Sansa Fuze, Sansa Clip and Sansa Clip+. They all exhibit a peculiar issue with track listing names. The “problem” is that there seem to be duplicate track names for all the music that I’ve added to my Sansa by dragging the tunes in from iTunes on my Mac.

I was fortunate to have an extremely helpful and knowledgable chat session with a Sandisk support person named “Apollo D.” In conjunction with that chat session and some additional Googling this issue, I have finally found a solution for this vexing problem.

Basically the “._” in front of the track listings is a result of the way that Mac OSX handles filenames. When you drag your iTunes tracks into the Sandisk player, the “duplicate” file names get created as a result of this MacOSX naming issue. What is bothersome is that you cannot delete the files directly from the player because as soon as you click on one of them, the player scans to the next “real” file and begins playing it. So you never get the chance to get to the delete menu on the player to delete the “duplicate” file name. Furthermore, these duplicates are not really music tracks anyway and don’t play. You also cannot see these files when the player is hooked up to your computer so you are not able to delete them this way either.

The solution is relatively painless and here is what you want to do to rid your Sandisk player of these files. If you must know more, then just Google…there are many places that discuss the “dot_clean” terminal command.

1. Make sure that the System Settings > USB mode on your player is set to MSC.
2. Hook your Sandisk player up to your computer via USB.
3. Launch the Mac OS terminal (Applications>Utilities>Terminal.)
4. At the prompt, type in the command:dot_clean
5. Hit the space bar one time to insert a space after dot_clean
6. Locate the icon of your Sandisk player on your desktop and drag the icon of the player into your terminal window. This will copy the path of your Sandisk player into the terminal window.
7. HIt Return
8. That’s all there is to it. You terminal window should have returned you to a new line after completing the command you just issued.
9. Unmount your Sandisk player.

Now after the player refreshes itself after it has been disconnected from your computer, you will notice that all the “duplicate” tracks have been removed.

If you add new tunes to your player after doing this the first time, you will have to follow this procedure again to rid the newly added files of the ._ track names.

iThemes “on making money” and being there for you “when you need help, support”

I posted a while ago about what I felt was a disturbing trend in pricing that some of the companies that sell “premium” WordPress plugins were moving towards. I won’t repeat myself as the post is available here.

In the wake of that original post, some feathers were ruffled. I will admit that I was challenged by the frenzy of comments to take a fresh look at my viewpoint. The result is that I have tempered my views somewhat. There are some “premium” plugins that are way more complex than I alluded to in my post. An example of such a plugin would be Gravity Forms. Definitely a notch or two above others in terms of coding complexity and support offered.

However, I still believe the model of pricing based on annual renewal fees sucks. And if you are not a developer by occupation, yet still run a few sites and purchase a few “premium” plugins, you will quickly be running up a costly to maintain annual subscription model to support your “premium” plugins.

In any case, I was mildly amused when I became aware of a relatively recent video published by Cory from iThemes in which he was making the justification for his company charging for their products. You can view the entire video, but below the video in this post is the pertinent portion of what he had to say…

“…our true ideal customers will come back and say “no no no, we want you to charge us money for this because we want you to be in business. We want you to be in business a year from now, five years from now, when we come back for updates or need more help, support, all that kind of stuff.” … and trust me, as our true clients, you want us to make money cause you want us to be here and I’ll say this one warning to those few that are lookin’ at different other companies and everything… I like to talk mostly about us but I’ll just say this one warning ,is that you really need to look at those, where you invest that money to make sure those people have a long term sustainable business model wrapped around those products because in a year, six months from now if they vanish off the face of the earth…. you wanna know that they’re going to be there for you when you need help. And so that’s why I’m confident, that’s why I share this about pricing, about getting paid and all that kind of stuff.”

Sounds like what Cory is trying to say is that when you buy something from them (iThemes), that they are “going to be there for you when you need help.” So it would stand to reason that if you bought something in late November 2008 and that if you had a problem with it scarcely 5 months later, you’d eagerly get the support you needed from iThemes, right? I mean afterall, they charge money and all that good stuff to be there for you when you need help and support. That’s what he said, right?

Well, let’s investigate that statement a little bit. In November 2008, I bought the 2009 Theme Club membership from iThemes. It was not inexpensive. As the months went by, I found that several of the themes that were part of that slowly growing bundle of themes contained bugs and in some cases had features that did not work. Seemed I was frequently visiting the forums to report the bugs I had found.

Specifically, the theme BizCard was coded to have an address field that could be filled in from the Dashboard. It had several fields; Street 1, Street 2, City, State, Zip, Phone number and email address. The problem was that due to an error in the coding of the theme, the Address 2 field did not work correctly. I posted this issue in the forums several times and got no reply from iThemes. When I emailed iThemes for support, I received no solution or fix. I then made a Tweet about my experience and Cory replied to me in this way… (keep in mind, this is from the guy who has just told you that iThemes is “going to be there for you when you need help”)…

Here is what Cory told me in his reply…

michael, i always appreciate your input – but seriously?! we’re not even actively selling it – think we might have more pertinent issues?

What could be more pertinent than supporting a buggy theme that your company developed?

So do you get the support you pay for with iThemes? I sure didn’t. Good luck with that.

Review of Ultra Light Bike Mirror by D+D Oberlauda

I have a love/hate relationship with cycling mirrors. Most of the ones I’ve tried, and I’ve tried quite a few over the years, just haven’t worked out well. I think I’ve finally found one that works pretty well and is fairly flexible in where it can be mounted.

On my road bike I found three areas where it seemed to be good. I mounted the mirror in three different locations; At the end of the bottom of the bars, around the brake hoods and just below the brake hoods on the handlebar. My video review will demonstrate these three positions.

The mirror is very light, weighing about 2 oz. The light weight of the mirror makes it less prone to vibrating. The mirror surface is convex which results in a distorted view and that makes it hard to judge distances using the mirror. However the convex shape gives you a wide angle of view and seeing approaching vehicles is much easier with this type of mirror.

I paid about $25 from Performance Bike and think it’ll do the trick for me.

Some of the other mirrors I’ve tried but didn’t like for various reasons were the…

CycleAware Reflex Mirror: This is a helmet mount mirror and it vibrated quite a bit. Also, it was always getting whacked out of shape when I’d take my helmet off. I found it difficult to adjust and the mirror gives a very small field of view. It takes some getting used to.

Blackburn Road Mirror: This mirror has a bracket that mounts over the brake hood. I didn’t like it. The mirror vibrated and the extra thickness around the brake hood just bothered me.

Everyone will have their preference, but right now I like the Ultra Light bike Mirror by D+D Oberlauda. I got mine at Performance Bike.

How to remove or change footer in BigCommerce

If you are using BigCommerce as your online store/cart, you may want to remove the footer link back to BigCommerce. This tutorial will demonstrate how to remove the “Sell Products Online with Big Commerce” link and text in the footer of your BigCommerce store template.

Review of CMS Made Simple 1.6 by Sofia Hauschildt

I’ve been absorbing the most excellent book on CMS Made Simple published by Packt Publishing. Written by Sofia Hauschildt, a tutor, consultant and programmer, CMS Made Simple 1.6 is a beginners guide to learning the basics and so much more of CMS Made Simple, an open-source, content management application.

I first started using CMS Made Simple to build web sites about 5 years ago. I have also used WordPress, Joomla, Drupal, RapidWeaver and hand-coding to build websites. But CMS Made Simple is one of my favorite tools to use because you can get started with it very easily and produce a great website without knowing much about what goes on behind the scenes. Documentation has always been hard to come by though. The wiki and user forums are the best places to visit to glean information and ask questions. But the developers have clearly stated that CMS Made Simple is geared to web developers and not so much to neophytes who need a lot of hand-holding and who need relatively basic questions answered.

CMS Made Simple 1.6 is the book that neophytes need. It takes a very measured and slowly paced approach in presenting small doses of information to enable almost anyone to get the CMS installed and operating in no time at all. This is done as a ‘case study” whereby you build a CMS Made Simple website with a capable tutor by your side… Sofia Haushildt.

The methodology used in this book is straightforward and effective. You are told what you will be doing, you are guided through the process of doing it, then you are told what you just did. It is this repetition of information that facilitates the learning process, especially for block-heads like me. I learn best when I am able to observe someone doing something then doing it myself. That is exactly what this book does… it teaches you by doing. There are ample screenshots at every step of the journey to further illuminate the tasks. Furthermore, there are quizzes that test your comprehension of the material covered. If you diligently follow through in a linear fashion, you will learn all the basics and so much more of how CMS Made Simple can be used to build a great web site.

I was particularly impressed with the aplomb in which Sofia approached Smarty. Smarty is the template engine used by CMS Made Simple. Without an understanding of what Smarty is and how it works in your templates and pages, you would be at a huge disadvantage when approaching a web design project. Her treatment of the subject leaves you with a very good understanding how Smarty functions and gives you many ideas of how you can use Smarty tags to simplify site design by harnessing the power of Smarty.

As you continue through the book you are gently guided into more advanced topics and taught how to incorporate various features into your website such as form pages, inserting YouTube videos onto pages, learning how menus and sub-menus work and are displayed and so much more.

There is an excellent discussion of how just about any web template can be converted to work with CMS Made Simple and it is surprisingly easy when you apply what you learned about Smarty tags to that task. You also learn how to build a template from scratch as well as how to import templates obtained from other sources.

Many code snippets are presented in the book. Unfortunately the book does not include a CD containing code snippets by chapter. But the publishers website has all the code available for download in a zip file so that is a big help since it obviates the need to tediously type error free code from the book.

If you want to learn CMS Made Simple, get this book. It’s as simple as that. What you learn in these pages will save you hours of frustration and question asking in forums. This is arguably the best introduction to CMS Made Simple that you will find. The book is not just for beginners either. People who have been developing web sites with CMS Made Simple already may likely find valuable tips and information that they did not previously know. This book is not a reference book on CMS Made Simple however, so if you are looking for a comprehensive reference book, this will not satisfy that need. In spite of that though it actually is quite comprehensive in that it does cover every important area of using CMS Made Simple in a really well written way. Sofia writes clearly and in a very straightforward, uncomplicated way. I have shelves of computer books and this is what I would consider a top-shelf book.

I’d like to give a plug to CMS Made Simple as well. I know that WordPress is all the rage. I build many sites using WordPress myself. But if you are not building a blog-centric site, WordPress is not always the best way to approach building a page-based website. CMS Made Simple is a worthy consideration. It is very easy to learn and use. It is under continual development and has an active user forum. I like it a lot and it is so much easier to get your head around than Joomla, Drupal and other CMS’s. Check it out and see for yourself.

Now if you’ll excuse me,  I need to try and persuade Sofia Hauschildt into writing a book about Magento

Get Adobe Flash player