devshb
Senior Member
United Kingdom
1904 Posts |
Posted - September 08 2011 : 08:22:44
|
I think I'd want to use a file-naming convention for the images, and then have dynamic logic try to find matching images on the server and displaying the relevant ones that it finds.
That way you wouldn't need to have any data/csv files for the images, you'd just name the image files in a relevant way and upload them via ftp and let the asp code do the work dynamically. (but that's only really possible if you don't need to have image-specific labels on the individual gallery images)
We do something similar to that with byz075 (image-zoomer/multiple-images) but that's specifically for products. It uses a naming convention, so you just stamp the "first large/zoomable image url" onto the product, and the system automatically tries to find (and then displays) all the other ones with the same "base" name (and the corresponding thumbnails) when the customer's browsing.
Quite often we simply re-use/copy/tweak relevant functions from our byz075 module (ie to do loops which check if image files exist for a given naming convention and then returns the retrieved-list of images for display).
Unless it's specifically for products where you want to use the same kind of output as the byz075 module uses, then it's almost always a custom-built solution because everyone wants different types of image formatting for how the thumbnails/large-images display etc, but I think the general approach would definitely be not to store the image urls in data anywhere, you just name them appropriately and get the asp scripts to find/display them automatically.
for example, say you want multiple galleries (eg a "t-shirts" gallery, and a "shoes" gallery), and you wanted each of those galleries to have lots of images in them and you also wanted to list your galleries on a parent page too (with thumbnails for each gallery)....
you'd only need to setup something like a simple array or reference table (ie to hold the title/text and a "base name" to use for the files, and maybe a static url value too, for each gallery)
eg you might have 2 records/arrays like: "T-Shirts", "tshirts","/tshirts-gallery.asp" "Shoes", "shoes","/shoes-gallery.asp"
where the first value is the title/text for the gallery, the second value is the base-name for the images, and the 3rd value is a static url to show the gallery (you could obviously also add other stuff like meta-keywords etc)
then, everything else is done simply by naming relevant files without having to hold the data for each individual file.
eg: tshirts-gallery-jpg (for the thumbnail of the overall gallery) shoes-gallery-jpg (for the thumbnail of the overall gallery) tshirts-gallery-001.jpg (for the first large image in the tshirts gallery) tshirts-gallery-002.jpg (for the second large image in the tshirts gallery) tshirts-gallery-001_tn.jpg (for the first thumbnail image in the tshirts gallery) tshirts-gallery-002_tn.jpg (for the second thumbnail image in the tshirts gallery) etc etc
The only reason you'd need to hold the images as data would be if you wanted to have labels/text for each image specified; if that's the case then, yes, you'd need to hold the image info as data somewhere and drive from that rather than just using a naming convention.
Simon Barnaby Developer [email protected] www.BigYellowZone.com www.BigYellowKey.com Follow us on Twitter: http://twitter.com/bigyellowzone Web Design, Online Marketing and VPASP addons |
|
|