Home Page
DVD/Home Theater
SETI@home / Planetary Society
General MIDI Files/Links
Sound Blaster
MOD Files/Links
Hardware
Programming
Entertainment / Now Playing
NASCAR
IRC Stuff!
Pelicar RPG
Weather
Photo Albums | Gallery
Blog
Facebook
Twitter
GetGlue (now TvTag)
Google+
YouTube
Pandora
Firefox Configuration
Speed Test Results
System Information
Winamp Info
View/Sign my Guestbook
Play Random MIDI
Start MIDI Jukebox
Stop MIDI Jukebox
MIDI Stats

Mark Headrick's Web Site.

ME!OSU, Go Cowboys!
General Information

Howdy! :) Welcome to my (previously cheesy) Web Site!

 132,358  People (and bots) have stumbled onto this site.


What's New on Mark Headrick's Blog
Times shown are Central, US

Tuesday, September 9, 2014 3:44 PM: Blog Upgraded to WordPress v4.0

This is just a quick post to say that my blog has been updated to WordPress v4.0 and as a test post to make sure everything still works like it should on the posting side. :) Standard procedure as always: Backup files and database. Update local development blog on my PC first. Re-apply any custom code that needs to be. Then, update the blog here on my webhost and copy over my modified files. While I was at it, also updated any necessary plug-ins and themes that required it. Everything seems to be working fine as best I can tell. :)

Add/View Comments (0 comment(s))

Friday, August 15, 2014 3:44 PM: Galleries Moved from Gallery to Zenphoto Platform

This change was major enough to warrant its own post. Near the end of June, the Gallery Project announced it was going into “hibernation” with further development being stopped. So, I started looking around for something else. As you can guess from the title of this post, I finally decided on Zenphoto. I had tried Coppermine in the past but I didn't like it then and it really hasn't changed since. I also looked at Piwigo, but I didn't like a few aspects of it. The main one being that its URLs were rather ugly and creating Apache rewrite rules, or internal PHP script handling, would be almost impossible to tell the search bots the new location of my images and pages.

The whole process took me a couple weeks but it involved a lot of behind the scenes work, much of which being specific to my situation so this post will mostly be a summary. Some individual steps could warrant a complete post themselves. Following is a brief (hmm, maybe not LOL) explanation of the steps I took for the switch:

  • Installed Zenphoto locally on my PC to test it out and get familiar with the UI (I have Apache, PHP, and MySQL installed on my PC). Decided on a supplied theme to use as a base (picked Garland) and what plug-ins I needed to do what I wanted.

  • Downloaded the full-size images from my current Gallery at my webhost and placed them into the Zenphoto albums directory. More specifically, I used Putty for shell access on my webhost to create a zip file of each main album and its sub-albums and then used FileZilla to FTP them to my PC and unzipped them. I already had the images locally but I wanted to make sure I was working with the actual files from my Gallery as the file names would prove to be crucial.

  • Created a test sub-domain and database at my webhost for Zenphoto and installed Zenphoto there. Since my webhost has Imagick installed, I changed the graphics option to use it instead. I prefer it over GD as it keeps all the EXiF and IPTC information intact. It was during this time that I uncovered a bug with the image quality setting having no effect with Imagick. Here's the bug I filed on it and the solution. I changed the code and it's working fine now.

  • The next phase of the operation is probably what took the longest. Zenphoto is file system based and creates its albums and such from the actual file structure and imports any EXiF and IPTC information it finds to be used as the image's title, description, original date, tags, and so on. While I technically did not have to do this, I wanted to make sure all my images had the appropriate ExIF and IPTC information stored in them. Some had no information, some just the description and the newer ones had both the title and description (the Gallery software also imports these). Most did have the original (image taken) date in them but some were even missing that. None of the images had IPTC tags stored in them.  We're talking about 100s of images, over 1,000 in one gallery.

    Initially I used a combination of Exifer, Irfanview, and Exiftool to manually update the images but quickly realized what a pain in the butt it was going to be and the amount of time it would take. Since laziness is the mother of invention, I decided to write a couple PHP scripts to cycle through the images of a specific album, look the images up in the Gallery database to get the image's title, description, and tags and, using the command line interface of Exiftool, insert that information into the IPTC fields of the actual image (.jpg files). In order for this all to work, the file structure and file names on my PC had to match what was stored in Gallery's database. I wrote one script to handle the title and description and another script to handle the image tags since those dealt with different parts of the Gallery database. Once I got this to work properly, I made pretty quick work of getting my images set with appropriate ExIF and IPTC information.

  • After getting my images updated, I decided this was the time to create any new albums and/or sub-albums. For example, in my main gallery, I divided up the old single Nature and Astronomy album into Animals and Plants, Astronomy, Mountains, and Weather sub-albums.

  • Created new zip files from the albums on my PC and uploaded them to the webhost in the Zenphoto albums directory. I then used shell access to unzip the files. The Zenphoto software recognized the new albums and images and imported all the ExIF and IPTC metadata from the images into the appropriate database fields. This saved me from having to manually tag the images and so on.  Some parts such as the album names, album descriptions, and image ordering were tweaked at this time.

  • The next process involved creating a set of Apache .htaccess rewrite rules in conjunction with some PHP code to redirect the bots and links that were out there to the new page and image locations. The PHP code was similar to what I had done in the old gallery where it intercepts the gallery's 404 handling to see if the image actually does exist and, if so, what its new location is and directs the browser there with a 301 redirect. This only works when the image file names remain consistent and are unique. This PHP code also logs what it is looking for (the actual request and my parsed out image portion of the URL) and if it found it or not. If it doesn't find a match it returns control to the gallery 404 processing. In the case of Zenphoto, I just insert a function call at the beginning of the theme's 404.php file: if (found_missing_item()) exit; The benefit of this code is that I can also move images around and not worry about creating new rewrite rules.

  • The next step was to flip the switch and point my live gallery sub-domain to the Zenphoto directory and see what happened.

  • The final step was to update the various gallery widgets on my sites to work with the new gallery database and file structure.

Whew!! :) From this point forward I just kept tweaking various parts of the theme, and debugging my PHP code and Apache rewrite rules when I noticed certain things cropping up that I had missed. Like I said earlier, some parts of this could warrant their own post if I really went into the nitty gritty with code examples. If anyone wants to actually know how something was done in more detail, please make a comment. :)

Add/View Comments (0 comment(s))

Friday, July 4, 2014 2:11 AM: Happy 4th of July for 2014!

Happy Fourth of July!Happy (and safe) 4th of July! :) For those in certain Oklahoma city areas, AAA is offering their Tipsy Tow service for free once again. You can call them at (800) AAA-HELP or (800) 222-4357. So, there's no excuse for anyone to drink and drive. :)

Here's a video of my EverQuest II character setting off some fireworks on her outdoor patio a couple years ago. If it were the real world, the house would probably catch fire LOL. Oh, nevermind the snow, it's always snowing in Frostfang Sea.

Add/View Comments (0 comment(s))

Saturday, June 14, 2014 5:24 PM: Happy Father's Day 2014

Happy Father's Day

Wishing everyone a Happy Father's Day weekend, especially mine! Love you Dad! You're the best! Yeah, I know, I'm recycling the same image I used the last two years but how could I not? After all, his name is also Dale Jr. :) It would be really cool if Dale Jr. happened to win at Michigan tomorrow during Father's Day. :)

Add/View Comments (0 comment(s))

Saturday, May 10, 2014 6:50 PM: Happy Mother's Day 2014

happy-mothers-day-largeWishing everyone a Happy Mother’s Day for 2014, especially my mom. Love you mom, you’re the greatest! :)

Add/View Comments (0 comment(s))


General Information

Detailed Information Coca Cola

Page last modified: July 14, 2014 2:43:58 PM CDT. *

*: The Page Last Modified date above simply means the date of the file that generates this page which may or may not have anything to do with the date that other parts of the site were updated or even the contents of this page which are, for the most part, generated dynamically.

Website was created with HomeSite v4.5 After Macromedia purchased HomeSite I stopped upgrading. It seems to do the things I want.. so why upgrade? Also, some aspects of version 4.5 that I use on occasion were removed from later versions.

Surpass Hosting SiteUptime Web Site Monitoring Service
Uptime Statistics
Stop Spam Harvesters, Join Project Honey Pot

Total execution time: 0.0105 seconds.