Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working on a simple website with some js too and i got a task to make a a simple page which is only for showing up few images properly with thumbnails(with a uniform icon) aligned one after another.

Its something like you're on homepage and you click "photos" tab on menu bar, it opens a new page (say, images.html) which shows up all those photography photo blocks thumbnails one after another.
You hover onto them, clicking will pop up that thumbnail to see the bigger size (just what js does).
Cut that image, open another and so on.


The main problem is that the images in there will be changed on daily basic (client needs it to be that way) and he actually wants to upload paper cutting scanned photos everyday.
Means if there are 50 blocks to show 50 images, he's going to put 50 images everyday.

If he gonna upload files everyday (renaming new ones and overwrite previous images and changing paths of images on html page everyday. thats not what he wants)

What is the best, easy and reliable way to that everyday.

Just if he needs 50 new images for today, he upload those images in a folder and they are showing up in these thumbnails automatically.

Note: He wants to change images everyday.
Posted

1 solution

From your list of images (perhaps from a server-side folder [perhaps with scandir() ] and use your list to populate php-generated images (in a loop)

PHP
foreach($imgFile as $img)
  ECHO "<img src="$img">";</img>


You will also need to dynamically create the location coordinate styles and appropriate size attributes [ height and/or width ]. If you wish to seem a bit more clever, you can get the screen dimensions from the client and either size the images or modify the count/row based upon the value.


 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900