I'm making a simple image gallery for a friend and I think I'm going to make it dynamic so I don't have to hardcode each image.
I have an example here.
http://waldbauer.us/valtemp/nature.html
Basically, each page should look for a specific sub directory of gallery for it's page, then for each sub directory within that, it would be a section with a thumb.jpg and images labeled "01 - name _thumb.jpg" "01 - name _normal.jpg" and "01 - name _large.jpg" etc.
Each image would be placed like the example above and I know what html formatting I need.
My question is, being rusty with php, how do I get an array of these images from a directory?
Also, is it easier to have php resize the images (thumbnails and mid-size preview from a large one) or would this be slower than having all sizes already made?
So if someone could give me a quick example of reading all the images in directories based on the current page, that would be great.
Thanks.
I have an example here.
http://waldbauer.us/valtemp/nature.html
Basically, each page should look for a specific sub directory of gallery for it's page, then for each sub directory within that, it would be a section with a thumb.jpg and images labeled "01 - name _thumb.jpg" "01 - name _normal.jpg" and "01 - name _large.jpg" etc.
Each image would be placed like the example above and I know what html formatting I need.
My question is, being rusty with php, how do I get an array of these images from a directory?
Also, is it easier to have php resize the images (thumbnails and mid-size preview from a large one) or would this be slower than having all sizes already made?
So if someone could give me a quick example of reading all the images in directories based on the current page, that would be great.
Thanks.
