// // Google Autoads

Thursday, May 23, 2019 - Welcome, guest user!

Redesigned picture page/CMS is live; Yesterday’s back workout.

Wednesday, November 16, 2005 by  
Filed under Daily Blog


I’ve pretty much completed the CMS (Content Management System) and the new layout for the pictures page, and have made it “live” as of this morning! I set out to create a simple CMS but it wound up getting a lot more complicated. I am using the GD libs to dynamically re-size and crop the full-sized images and then display them as uniform 120×120 thumbnails, regardless of the aspect ratio of the original picture.

Resizing images in realtime is very CPU-intensive, so I had to implement a caching system, and it seems to be working very well: If the main image ever changes, then a new thumbnail image is automatically generated in realtime the first time a visitor requests the new thumbnail image. The fresh thumbnail is then stored in a special cache directory on the server. It’s these cached images that are served up for all future requests so that GD doesn’t have to generate them in realtime. Anytime an image is added or altered, the thumbnails are automatically generated and cached. It’s a great system and will make life much easier when it comes to adding new pictures to the site.

The alternative to this system, of course, is to have my CMS automatically resize the images I upload and then place them in a thumbs directory at the time of upload. I went with the more dynamic solution because it seems more “hands-off”, and, as a bonus, I didn’t have to re-upload all my current images!

I also had to write a front-end to make adding new pictures a snap, and then I had to automate the display of the images to automatically sort them from newest to oldest, and automatically divide them into the proper years. There’s also some simple mouseover stuff going on. Everything is done with GD, PHP and MySQL. There are a couple of other features I may add soon, but for the most part I’m pleased with how it came out. You can check it out here (scroll down to the “Other Pictures” section).

I had an insane back workout yesterday! I didn’t take any pictures, but here’s a direct link to yesterday’s post-workout log.

Tonight’s chest and abs, and it should be a good one. Right now my stomach is telling me it’s time to eat, so I’d better get on that. See ya tomorrow!

Speak Your Mind

Tell us what you're thinking...

You must be logged in to post a comment. Not yet a member? Registration is fast and free!