timmiejboi Posted November 25, 2012 Share Posted November 25, 2012 Hey, This is my gallery script But now i want to change the height of the pictures? And i want that i can click on the pictures and show bigger Someone please can help me :$? Script: <?php ini_set('display_errors', 1); // 0 = uit, 1 = aan error_reporting(E_ALL); ########################################## //Even wat dingen instellen. $dirname= "./fotoalbum/";// directory met plaatjes ten opzichte van de huidige directory $naast_elkaar = 2;// aantal plaatjes naast elkaar $onder_elkaar = 3;// aantal plaatjes onder elkaar $breedte = 250;// width van de plaatjes $hoogte = 250;// height van de plaatjes $img_extensions = array('jpg', 'JPG', 'gif', 'png', 'PNG', 'JPEG', 'jpeg');// de toegestane plaatjes ########################################## function check_file($filename) { global $img_extensions; $file_array = explode(".", $filename); return ((count($file_array) == 2) and (in_array($file_array[1], $img_extensions))); } function get_file_array($dir) { $file_array = array(); if($handle = opendir($dir)) { while(false !== ($file = readdir($handle))) { if(check_file($file)) { //Het is een plaatje, laat hem zien... $file_array[] = $file; } } closedir($handle); } return $file_array; } function showImages($image_array, $begin, $eind) { global $dirname, $naast_elkaar, $breedte, $hoogte; $begin_check = $begin; $return = '<tr>'; while ($begin < $eind and isset($image_array[$begin])) { $return .= '<td><img src="' . $dirname . $image_array[$begin] . '" width="' . $breedte . '"/></td>'; $begin++ ; $return .= ($begin%$naast_elkaar == 0) ? '</tr><tr>' : ''; } return $return . '</tr>'; } function genPages($number_of_files, $page_limit) { $pages = ($number_of_files%$page_limit == 0) ? $number_of_files / $page_limit : $number_of_files / $page_limit + 1; $i = 1 ; $return = '<table><tr>'; while ($i <= $pages) { $return .= '<td><a href="?page=' . $i . '">' . $i . '</a></td>'; $i++; } return $return . '</tr></table>'; } echo '<html><body><table>'; $page_limit = $naast_elkaar * $onder_elkaar; $file_list = get_file_array($dirname); $page = (isset($_GET["page"])) ? $_GET['page'] : 1; $begin = ($page * $page_limit) - $page_limit; $eind = $page * $page_limit; echo showImages($file_list, $begin, $eind); echo '</table>'; echo genPages(count($file_list), $page_limit) ; echo '</body></html>'; ?> </p> Cheers, Timothy Quote Link to comment Share on other sites More sharing options...
Erlis Posted November 26, 2012 Share Posted November 26, 2012 (edited) If the script came with a .css file (it can be style.css or gallery.css etc.) you can change those values in there.Or as I am seeing there are two values [$breedte = 250;// width van de plaatjes / $hoogte = 250;// height van de plaatjes].I am not sure what language it is, but I'm guessing those are the functions or values to set images height and width.Default as I'm seeing are 250x250.You can try and change those and see what happens. And for the popup you can use javascript.There are lot's of them.http://www.google.lt...iw=1920&bih=946 Edited November 26, 2012 by Erlis Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.