That's a good question. I'm not sure what is the right answer to your question. I'll do some research in Google and get back to you if I got an answer. You should email the people at iPage as they probably could assist you..
What I did is created a field in my products table called num_of_pics. When I add a new product I enter the number of pictures that I have for that product. When I create the pictures I give them the product number + the increment like this:.
Then in my product_info I read num_of_pics from the products table which returns 4. I then have a for..loop which concatenates the product number + the increment and builds the filename and adds a link to my product page..
For my shops, I have alot of images that are the same model number, but for different stores.
What I did was use ReaJpeg [from download.com] to add a suffix to all of them. like 1234X.jpg or 1234Y.jpg. You could also consider this a 1234 prefix to x.jpg and y.jpg. [for x store or y store].
Then, in windows search, I just looked for x or y and I would get all the products from the X store or Y store. This is helpful in the products database because you an search for anything like 1234* or *x to find exactly what you are looking to collect..
Thanks for the replys guys..
Brett, I am not concerned about searching through my images on my machine but having php do it when the customers click on an object..
Mibble, are all those commands, that I can have php execute?.
Bluepony, thats a good idea and I might try doing that but I was hoping that I wouldn't have to add anything to the products table that I have to add manually for each product, or also nothing that would effect easy populate or any other contribs..
What would be ideal is since if it happened everytime a customer clicked on a product, it would slow down the load, to have a new table that had two fields:.
Product_id and product_image. Then in the admin I could click a button and it would go through all my images and compare them to one another setting up relations. Since all my images are named the same as my product name, it would be able to find which ones go with which product..
Then when a customer clicks on a product, product_info will go to the new table to get all the images and display them..
This post has been edited by.
: 13 May 2004, 13:09..
Blue Pony, can we see an example of this?.
The only page you modified was product_info?..
Hey everyone, I spent all day working on it and finally got it! Works just the way I wanted it to. This should save me tons of time by not having to add every picture is I have multiples. It even sets of the popup image since I have them set at different sizes..
If you want to see it in action here is a link to my only product so far:.
And here is a screen shot of the admin section:.
If anyone is interested, I will try to find time this weekend to make it into a contrib..
Next I want to modify the store so that I don't have to go through the process of adding any images. Right now I have to do it so that the images show up in the product displays. I think I don't have to change that much to get them working..
This post has been edited by.
: 13 May 2004, 20:28..
Hey, I was wondering if it is possible to search through a directory of images and return and display certain ones..
What I want to do is first take the image name of the current product being looked at, then strip the .jpg or .gif off and search for other images that start with the same string..
So if I have an image 1234.jpg it would look for all images that start with 1234 such as 1234_stuff 1234_otherstuff then display them on the product info page..
Any way I can do this?.
I figure this would be better than having to use a contrib like ultrapics or mo pics then I wouldn't have to add all the images for every product, just make sure the image names have the same beginning. This also would effect contribs such as easy populate which is always good...
Basically you are looking to do disk i/o, using *nix commands internally, or windows, and store things into an array, for matching then have to fo an fopen, etc...