Code: Select all
/***************
** Settings **
****************/
$currentdir = getcwd(); //Current Directory - do not change
$thumbnail_path = $currentdir . "/thumbnails/"; //folder name for client's thumbnails
$image_path = $currentdir . "/images/"; //folder name for client's images
$extentions = array('jpg','jpeg','JPG', 'JPEG'); //valid file extensions
$thumbs_per_page = "16"; //maximum amount of thumbnails to display
$thumb_columns = "4"; //maximum number of columns to display thumbnails
$thumbs = array();
//Put the thumbnail images into an array
$dh = opendir($thumbnail_path);
while(($file = readdir($dh)) !== false) {
// check if it's a file, and it has a valid extension
if (is_file($thumbnail_path . $file) && in_array(substr($file, -3), $extentions)) {
// add image to array
$thumbs[] = $file;
}
}
closedir($dh);example: << 1, 2, 3 ... 20 >>
Like you see on message boards.
Is anyone familiar with how to code this sort of thing or can point me in the direction of a tutorial/info.
Brad.