cbassett03 Posted June 20, 2010 Share Posted June 20, 2010 I'm trying to create a customized PHP-driven photo album system (as a summer project for myself). Anyway, I don't have any code yet as I'm trying to plan out how I'm going to handle things first before i start writing code. So here's my problem: Some of my albums have 100+ pictures in them, and to show all of them (Even thumbnails) can appear intimidating to the viewer, and a list of files is even worse. So, what I want to do is split the larger albums (with more than 20 pictures) into pages that house 20 pictures per page. Now, my question is should I store a long list (as a global) that points to the pictures and thumbnail files, and then use PHP to display only certain groups of pictures (ie. Page 1 would hold pictures 1-20, Page 2 would hold pictures 21-40, and so on). So should I just create a PHP script that can get these "Groups" of pictures on the fly or should I integrate this functionality in the database itself? I'm thinking I can do it with PHP, by passing variables with the screen, such as this: showAlbumPage.php?pageNum=1 and when page 1 is used, it would select the first 20 pictures and show them and there would be a link to the next page, which would send the following URL to the browser: showAlbumPage.php?pageNum=2 and then the script would show the second batch of 20 files (pictures 21-40). and so on.... Am I thinking this through correctly, or is there an easier way to do this?? I guess in the end I"m looking to make one script that can dynamically create "pages" to display groups of pictures from one particular photo album that has 100+ pictures in it to make it easier to navigate and find pictures. Link to comment https://forums.phpfreaks.com/topic/205289-making-multiple-pages-for-a-photo-album/ Share on other sites More sharing options...
thewooleymammoth Posted June 20, 2010 Share Posted June 20, 2010 seems efficient enough to me, look up pagination. its exactly what your talking about Link to comment https://forums.phpfreaks.com/topic/205289-making-multiple-pages-for-a-photo-album/#findComment-1074557 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.