Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi there, I need help with creating a gallery for an HTML page but cannot find a tutorial anywhere and everyone I know doesn't know the answer X_X...

Basically I need a page with 2 rows (5 pics in each row), so 10 pics on a page with a next and previous button on each side. All the pictures are in a file on the server ( or in this case, in my site file, localhost).

Now I need the newest (date order) pics in slot 1-10, and when you click next, it loads the next 10 files in date order, and if you click previous.... it loads the newer 10 pictures in date order.

Can anyone help me explaining how I do this and where I can go to learn how to do this / help for this?

Thanx so much,
Josh

[Added below from the OP's "solution" which needs to be removed — SA]

Oh and I cant have it be a downloaded file from some company, I want to be able to write it myself / friends help and actually learn from it rather than download it.

Thanx,
Josh
Posted
Updated 8-Dec-11 12:38pm
v2
Comments
Michel [mjbohn] 8-Dec-11 15:33pm    
Please use 'Improve question' to alter your request. Do not add a solution.
Sergey Alexandrovich Kryukov 8-Dec-11 18:58pm    
Please don't post a solution unless this is a real solution. Such posts will be removed, no one gets e-mail notification. Use "Improve question", add a comment, a reply to a comment.
--SA

1 solution

Even your vague ideas about the design of the gallery are not good enough to start doing this project.

For example, fixed number of images on row is really bad, it would assume fixed size of a browser window which is ridiculous — this is not what happens in real life on the client side. Some (many) use the mobile devices. Any provisions of thumbnail? Without those you cannot make a gallery convenient, not even close. How about different viewing options? Smaller size, actual size, "real pixel"? Zoom? (This can be considered as too advanced.)

Even though you can easily make a gallery using only server-side programming (PHP), it's usually either too static or too slow without some client-side programming using JavaScript (but if your requirements are modest, you need only a bit of client-side programming. I find jQuery extremely helpful.

Now, you can find tons of projects to use for samples or just to learn some techniques:

http://lmgtfy.com/?q=gallery+PHP[^]

or may be

http://lmgtfy.com/?q=gallery+PHP+(JavaScript+OR+jQuery)[^].

—SA
 
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