Check your shoes, too........ Posted at 8:55 on Friday, January 2, 2004It looks like we'll be buying the old house, problems and all. Rose is set on it, and I guess I can understand that. She really doesn't have a clue how much work there is coming up, but then, she was never reluctant to work hard. Anyone have any extra kitchen cabinets? Cheap?
I figured out how to sort thumbs on an album page by the date of file creation. The advantage, of course, is that now the latest photos added will show up at the top of the page instead of in a random order. How did I do it, you ask? When loading the thumbnail page for any album, the directory is read into a two-dimensional array that holds the filename and the filedate. The array is sorted by the filedate and the thumbnails are displayed based on that order. I could have done the same thing using the date field in the photo database, but wanted to use file system functions instead, primarily for speed. At least I hope it's faster. Looking at the usual sources didn't yield any real help, so I was left to figure out the methods to make it work properly. The end result works nicely, and since the photo albums listed and the thumbs shown on each album page are determined by the file system as well, it fits nicely into the scheme of things.
When I decided to build the photo album from scratch, I had several goals in mind. First and foremost, I wanted an easy to maintain photo album. I can't say I've gotten there yet, but it's coming along. The steps to create a new photo album are: 1. Create the album, thumb and slide directories using wsftp. Don't forget to change the permissions. 2. From the original images, create the slides(640X480) and thumbs(120X90) that go in those directories. 3. Upload them into the unsorted directory. 4. Insert them in the database. This renames them as well. 5. Move them out to the various albums.
My next goal for the photo album is to combine steps 3, 4, and 5. It should be fun.
I got a picture some time ago from Scott of a service call he or one of his friends made.
 I think the snake got the worst end of the deal. |