Wednesday, February 21, 2007

gallery 0.3

in my work, i have to install a photo gallery for some clients. now there are a lot of open source solutions out there and leading the pack, at least for me and what i've encountered as a php developer, is menalto's gallery or simply gallery 2.

now, gallery 2 is a feature-rich solution with a ton of bling-blings and a kicking support/development team. its a great solution. however, as with the nature of my job, i'm asked to deploy a photo gallery in an already built-up website. if you're not already seeing the problem, well the problem is.. gallery 2 puts the photo gallery in the middle of the spotlight. what i need to deploy is somewhere near the balconies.. in short, gallery 2 is nice if you need a website which shows off a ton of photos. otherwise, its an absolute pain to edit to make it fit your needs.. and don't even get me started on trying to edit the templates to the current website's template.

other solutions rely on purely php and file manipulation. while i have nothing against that, the programmer in me just can't swallow the fact that there's no database used. though these solutions tend to look purr-ty...

so for the past projects where i needed to slap in a photo gallery, i built my own photo gallery system. this system is php-based and stores the relevant information in a mysql database, since the websites i work on always have a mysql database anyway and if they don't i create one for them.. hehe, and stores the images in a directory. upon upload, three images are created, a thumbnail-sized image, a default-sized image and the original-sized image. it may take up some more space but your server will definitely thank you when your user uploads 10MP pictures.

over the projects, i got tired of manually editing each line of code to fit the new website i'm going to slap it on. so, i worked on a more generalized version. the result is... gallery 0.3

when you take a look at it, it may not look like much. but if you login as the owner/admin, then you'll see its true capabilities. and developers out there who have to "skin" a lot sites will find that the one page that matters in the gallery is so easy to customize. tags are easy to move around the page and just about everything, from the image sizes to the number of thumbnails to the image used for overlaying some thumbnails can all be customized from the admin page.

however, i'm still not making it available for public release cause there's still work to be done like user groups and permissions. as it is right now, it will work well to serve as a photo gallery for a specific website(or blog... as long as there's only one(or one group) owner). as a photo gallery for the planet? not yet...

and probably the main reason i'm releasing a "preview" is this bug has gotten me stumped... if you're using IE6, head on to the site and you'll find out... i have half a mind to take away "seamless reloading" feature(oh yeah, for most browsers, clicking on a thumbnail won't reload the page) for IE6.

it seems to be caused IE6 not liking loading an additional javascript file dynamically... i use aja, if you're asking why. its ajax without the xml part. more about this in a future post, its a totally awesome way of doing ajax without the additional burden of coding xml.

if you have any idea on a possible workaround for that, PLEASE let me know!

check out the site here:

http://fapri.ifastnet.com/gallery/gallery.php

if you'd like a copy of the gallery, send me a note and i'll send you one. if you're interested in helping me out or just want to check out the code, send me a note as well.

No comments: