There are several new features listed on Paul’s SPG Mini-Site, but there are a few that are my favorites (as I was a beta tester for this and the last versions):
This was one of the two features that I actually coded the original code for *grin*. In v1.0 and the early v1.1 betas, I got tired of clicking the Next and Previous buttons and having to wait for the new image to load, after I’d just spent several seconds looking at a single picture. It didn’t seem very efficient to me, so I figured why not allow the image loading to happen in the background while I’m spending time looking at this picture anyways.
So, what I did was I figured out what images the Next and Previous buttons were pointing to (which is all dynamic, BTW), and added the Next and Previous to the page at a size of 1×1. I then added inline styles to the image that absolutely positioned them to the top-left corner of the page, and set the visibility to hidden. Doing so allowed the images to load into the cache, while remaining invisible to CSS-enabled browsers (and as two 1 pixel dots on CSS-disabled browsers).
Voila! Image precaching for the previous and next images in sequence.
Do you have a digital camera that takes pictures at a ridiculously gargantuan size? I used to have one that saved images at 1600×1200. With this feature, you can upload these images, and they will automatically be resized and cached according to the settings in your
sp_config.php file. Very useful.
This was my first suggestion for features in SPG 1.1 after 1.0 launched. I took a 3ds Max class in college, and we had to build something cool from the things we’d learned in the class, and make both a still frame as well as a short rendered video. Mine was about 3 Macs.
Instantly, I was able to hit Alt+Plus and Alt+Minus to move back and forth through the images. When I recommended this to Paul, we had some discussion, and this is what ended up getting implemented:
The Previous button is Alt+Minus[-]. The Next button is both Alt+Plus[+] as well as Alt+Equals[=]. This is because most QWERTY-language desktop keyboards have a 10-key number pad on the right where [+] and [-] are right next to each other. Most laptops, however, don’t have that, but rather a [-/_] key right next to a [=/+] key (where you have to press shift for the latter). This means that you’d have to press Alt+Minus to move back, and Alt+Shift+Plus to move forward, and that sucks. Allowing Alt+Equals to move forward makes it easy for both Laptop and Desktop QWERTY-keyboards.
Automatically Generated Sub-Folder Details
This was yet another idea that I had for the 1.1 release, and that was to add the number of images in a folder, much like how many people will display the number of comments a blog post has. It just seemed to make sense.
Paul has done a terrific job with writing this software, and I have really enjoyed the opportunity to be a part of it. Heck, I’m probably just as proud of this release as he is, and I’m excited that so many of my suggestions made it into the final release. If you’ve got an image gallery, or you’ve been thinking of setting one up, I would highly recommend Paul Griffin’s Simple PHP Gallery.