Witam specjalistów!!
Mam skrypt galerii, ale jak klikne na minaturke to otwiera mi się nowe okno z białym tłem i jest o wymiarach owiele za dużych niż jabym chciał, a chciałbym żeby obrazki otwierały się w oknie javascript i żeby były bez żadnyh suwaków, menu itp.. Mnie więcej jak na tej stronie
http://www.lipiecphoto.pl/galerie.html ( kliknijcie na obrazek). Jak zmieńić ten skrypt??
Proszę o podpowiedz i z góry dziękuj!
To moje gg 4445110 a emial to bartoszer@poczta.onet.pl
Kod:
<?php
$_config["url"] = "http://members.lycos.co.uk/czerwony222/galeria.php";
$_config["dir"] = "obrazki";
$_config["cache"] = "min";
$_config["th_max_width"] = 50;
$_config["th_max_height"] = 50;
$_config["columns"] = 2;
$_config["rows"] = 6;
$_config["ext"] = "jpg|gif|png";
function CreateThumb($file, $w, $h, $dest="", $p=1) {
$filename = $file_ex[count($file_ex)-1
]; switch($type) {
case 1: $imagecreate = "imagecreatefromgif"; $imagesave = "imagegif"; break;
case 2: $imagecreate = "imagecreatefromjpeg"; $imagesave = "imagejpeg"; break;
case 3: $imagecreate = "imagecreatefrompng"; $imagesave = "imagepng"; break;
default: return 0; break;
}
$im = $imagecreate($file);
if($p) {
$prop = $height / $width;
$nw = $w;
$nh = $w * $prop;
} else {
$nw = $w;
$nh = $h;
}
$dest_im = imagecreatetruecolor($nw, $nh);
imagecopyresized($dest_im, $im, 0, 0, 0, 0, $nw, $nh, $width, $height);
$imagesave($dest_im, $dest."/".$filename);
return 1;
}
$dir = dir($_config["dir"]); while($file = $dir->read()) {
if(eregi("(".$_config["ext"].")$", $file)) { $pliki[] = $file;
}
}
if(!isset($_GET["gp"])) $gp = 0; else $gp = $_GET["gp"];
$_start = $gp*$_config["rows"]*$_config["columns"];
$_stop = $_start + $_config["rows"]*$_config["columns"];
echo "<table style=\"width: 100%; border: 0;\">\n"; for($i=$_start, $j=0; $i<$_stop && $i<count($pliki); $i++, $j++) {
if($j == $_config["columns"]) { echo "</tr><tr>"; $j = 0; } if(!file_exists($_config["cache"]."/".$pliki[$i])) CreateThumb
($_config["dir"]."/".$pliki[$i], $_config["th_max_width"], $_config["th_max_height"], $_config["cache"]); echo "<td style=\"width: ".(100
/$_config["columns"])."%; text-align: center;\">\n" ."<a href=\"#\" onClick=\"window.open('".$_config["dir"]."/".$pliki[$i]."', 'gallery_window', '');\"><img src=\"".$_config["cache"]."/".$pliki[$i]."\" alt=\"Gallery\" /></a>\n"
."</td>\n";
}
if(count($pliki) > $_stop && $_start == 0
) { $npage = $gp + 1;
echo "<div style=\"text-align: center;\"><a href=\"".$_config["url"]."gp=".$npage."\" class=\"gal_navlink\">Następna strona »</a></div>\n"; }
if(count($pliki) <= $_stop && $_start > 0
) { $ppage = $gp - 1;
echo "<div style=\"text-align: center;\"><a href=\"".$_config["url"]."gp=".$ppage."\" class=\"gal_navlink\">« Poprzednia strona</a></div>\n"; }
if(count($pliki) > $_stop && $_start > 0
) { $ppage = $gp - 1;
$npage = $gp + 1;
echo "<div style=\"text-align: center;\"><a href=\"".$_config["url"]."gp=".$ppage."\" class=\"gal_navlink\">« Poprzednia strona</a> | <a href=\"".$_config["url"]."?gp=".$npage."\" class=\"gal_navlink\">Następna strona »</a></div>\n"; }
?>