Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: CSS HTML XHTML PHP
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 8-Dec-11 9:48am
Edited 8-Dec-11 13:38pm
v2
Comments
mjbohn at 8-Dec-11 15:33pm
   
Please use 'Improve question' to alter your request. Do not add a solution.
SAKryukov at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  

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

  Print Answers RSS
0 Marcin Kozub 310
1 OriginalGriff 248
2 Sergey Alexandrovich Kryukov 215
3 Richard MacCutchan 202
4 Praneet Nadkar 197
0 OriginalGriff 8,048
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 8 Dec 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100