Blog Entries

Dynamic Copyright Code

April 22nd, 2010

Nowadays most, if not all, websites contain a small copyright blurb in their site footer. Take a look at the bottom of this site and you’ll see the text: “Copyright © 2009-2010 CopperBot Media” as an example. Even if you’re fairly new to web design you’re probably already savvy enough to know the ASCII character code for the copyright symbol and you might be thinking, “Creating a copyright blurb is pretty easy. Where are you going with this?” The problem with static copyright blurbs created in HTML is that they become obsolete at the end of the year. The purpose of this post is to provide you with a simple dynamic alternative (using php) that will update automatically and keep your copyright blurbs up to date.

Code Snippet

To begin simply copy and paste the code below into the footer of your website.

Note: You’ll need to remove the space in the line “< ?php". My code format plugin is misbehaving.

<span>
&copy;
< ?php
    ini_set('date.timezone', 'America/Chicago');
    $startYear = 2010;
    $thisYear = date('Y');
    if ($startYear == $thisYear) {
        echo $startYear;
    }
    else {
        echo "{$startYear}-{$thisYear}";
    }
?>
Website Design, Development and Search Engine Optimization (SEO) by
<a href="http://www.yourdomain.com" class="_blank">Your Domain Name</a>
</span>

Customize the Code for Your Site

To customize the code for your site there are a couple items you’ll need to change:

  1. First off you’ll need to change the value for the $startYear to the current year. For example: If you were building out a site in 2011 the line would read $startYear = 2011; (Be sure you include the ; mark at the end of the line or the script will break)
  2. The next thing to change is the timezone. Using this link: (Valid American Timezones) find the appropriate timezone for your client. In the code example I provided above my client was located in Dallas, Texas so I used the timezone ‘America/Chicago’. (Chicago and Dallas are both on Central Time)

The most important thing to change is the $startYear. Changing the timezone isn’t as important since all of our clients are located in North America anyhow. Worst case scenario the script will update the copyright date for the site a couple hours early or late (depending on where the client is located) come New Years.

Your .htaccess File

(Only necessary for static sites)

When a web page is accessed, the server checks the extension to know how to handle the page. Generally speaking if it sees a .htm or .html file, it sends it right to the browser because it doesn’t have anything to process on the server. If it sees a .php extension (or .shtml, or .asp, etc), it knows that it needs to execute the appropriate code before passing it along to the browser.

Because page for static sites end in .htm or .html we need to take one final step to be sure the php code is processed and the copyright date displayed as intended. In dreamweaver, or the text editor of your choice, create a new blank file. Paste the following line of code into the file you just created:

AddType application/x-httpd-php .html

Save this file with the name .htaccess

If for whatever reason a .htaccess file already exists then simply add this line of code at the tail end of the existing .htaccess file.

Note: This will create a hidden text file. You may need to adjust your settings for your operating system, text editor and FTP program in order to see the file once it is created. I’ve included some brief guides for Windows XP, Dreamweaver, & Filezilla below:

Hidden Files in Dreamweaver

  1. On the “Files” tab (the tab where the files and folders are displayed for your site) there is a little button that looks like a bullet list.
  2. Click this button and select the menu option View -> Show Hidden Files

Hidden Files in Windows Explorer (XP)

  1. Select the menu option Tools -> Folder Options
  2. When the Folder Options Window is displayed select the “View” tab.
  3. Scroll through the Advanced Settings until you find the option to “Show Hidden Files and Folders” Check this and hit Apply.

Hidden Files in Filezilla

  1. Select the menu option Server -> Force Showing Hidden Files

Note: Be sure to upload the .htaccess file with the rest of your site and you should be good to go. If you have any problems implementing this please let me know by leaving a comment and I’ll be happy to help.

Web Design Gallery Updated

March 25th, 2010

It’s March! Valentines, St. Patty’s & Ground Hog Day have all come and gone and this is my first update since early January. My hopes and dreams of updating the site more frequently have been officially dashed but I have been absent with good reason! Today I am happy to finally update my Web Design Gallery with three new sites. Of these sites only one has officially “gone live” but the other two should be finished and online within the coming month. Please take a moment to view the fruits of my labor and let me know what you think. Feedback is always appreciated! Thank you kindly for stopping by!

2010 – Year of the Robot

January 12th, 2010

Well folks, another decade has come and gone. Where were you when you rang in the new year? I was venturing through the neighborhoods surrounding downtown Denver with my dear wife and a small cluster of friends in search of the perfect party. I do believe we found not one, not two but three… complete with cans of cool Pabst Blue Ribbon beer and scores of people dancing to hip-hop like there was no tomorrow. (In one particular house I was mildly concerned about the structural integrity of the floor but it held out long enough to ring in the new decade) Now don’t go bashing PBR friends! I know it’s a cheap beer that peaked in popularity well before I was born. That is precisely why I enjoy drinking it from time to time… and when it’s free… well you’d have to be crazy to turn away free beer.

Anyhow, I do apologize for not having any updates to share over the last few months. Truth be told I would have loved to post in my blog here but time wouldn’t allow for it. With the coming of 2010 I will put forth an effort to post more often even if the updates are short and sweet. I appreciate each and every one of you taking the time to visit my site and the last thing I want to do is neglect you for it. Please allow me a moment to fill you in on what you’ve missed since last October.

2009 Wrap-Up

  • I snagged a killer illustration job from Bob Hazlett over at One Half Amazing. You see, Bob had this genius idea to take his existing resume and transform it into a comic book and after I showed him just how BAM! POW! SHAZZAM! awesome I was he was sold! Have a look at the finished product.
  • In addition to using the artwork I created to make a comic book style resume Bob also went the extra mile to create his own iPhone App (also featuring my illustrations). I don’t know about the rest of you but I think this is totally rad. Check it out! (Note: You’ll need iTunes installed to open this link)
  • In late November I started a new full-time job as a Web Designer for a company out in Golden Colorado. Upon my arrival on my first day of work I found that my training manual for this position featured He-Man & The Masters of the Universe. Needless to say I was thoroughly amused!
  • In December I snagged a couple web design projects of my own and a couple of illustrations to boot! Things are going to get fairly busy around here very soon!
  • Last but not least I finally decided on a writer for my upcoming webcomic. MissDoomCookie and I will be working diligently over the next four months in hopes of having our creative collaboration ready for the public by April 1st 2010! .

That said I’ll close this long overdue post with an image of one of the characters I recently designed for the project. This is merely a first draft and subject to change but here he is nonetheless.

Archibald Blacktusk (of the Derbyshire Blacktusks)

Good morning and Happy Friday! It is currently 12:33 am here in the Copper Factory and my optics have started to fade out so you’ll have to excuse me for being so brief with this update. I’ve just finished uploading the final draft for Mr. Lazzaro and I would love to know what you guys think. The coloring style for this one is a first for me. Like some of my other images I used a layered smudge tool based painting method but before calling it quits I decided to give the entire image a bit of a wash. I washed all the layers with a slight golden hue in an attempt to pull everything together and hopefully end up with a somewhat “dream-like” look. Overall I think it turned out fairly well!

Inking and Plotting

September 25th, 2009

Hello again ladies and gentlemen! Another small art update for you this afternoon. Progress on Mr. Lazzaro is coming along nicely though a bit slower than I would like. There have been lots of distractions this week. Between Nessi being home sick most of the week, reading the scores of submissions I received for potential writers for my upcoming web comic and trying to get our long overdue taxes for 2008 finished ( yeah don’t get me started… the only thing I hate more than taxes is having to file them on an extension ) I’ve struggled to focus this week. Distractions aside I have made some progress worth sharing.

Overall I’m pretty pleased with the way this image is coming together. I’ll be submitting this progress report to the real Mr. Lazzaro this evening to see if there are any glaring issues he would like to address before I move forward and begin applying color. As of the other day I had his wife’s seal of approval so hopefully that will remain intact after their review!

Looking forward I now have two new web projects to begin brainstorming for in the coming weeks. The first is for a wedding, while the second is for a rather “hush hush” game related community website. We’re still bottom of the 1st inning here so anything goes at this point but hopefully both of these projects will pan out nicely and I’ll have a couple of completed web projects to add to my web design gallery in the very near future.

Last but not least, I made a series of updates yesterday for my visitors using Internet Explorer. Things should look slightly less wonky now and you should actually have the ability to send me messages via the contact form now. So hey, while we’re on that topic why not pop over and drop me a message now. Alternatively you can leave me a comment right here! I’d love to hear from my viewers! In the meantime, have a pleasant weekend wherever you may be. I’ll see you monday.