Jump to content
xisto Community

killingjoke

Members
  • Content Count

    9
  • Joined

  • Last visited

  1. how can i make a gallery in php like this one; but it has to show the images in the maps under it too; <?php # Do we have a path? if not, it's the current directory $path = $_GET["path"]; if( !isset( $path ) || $path == "" ) { $path = "."; } # Initialise list arrays, directories and files separately and array counters for them $d_arr = array(); $d = 0; $f_arr = array(); $f = 0; # Open possibly available directory if( is_dir( $path ) ) { if( $handle = opendir( $path ) ) { while( false !== ( $file = readdir( $handle ) ) ) { # Make sure we don't push parental directories or dotfiles (unix) into the arrays if( $file != "." && $file != ".." && $file[0] != "." ) { if( is_dir( $path . "/" . $file ) ) # Create array for directories $d_arr[$d++] = $file; else # Create array for files $f_arr[$f++] = $file; } } } } # Wrap things up if we're in a directory if( is_dir( $handle ) ) closedir( $handle ); # Sort and reset the arrays sort( $d_arr ); reset( $d_arr ); sort( $f_arr ); reset( $f_arr ); # Print file list for( $i=0; $i < count( $f_arr ); $i++ ) { if ($f_arr[$i] != 'Thumbs.db' && $f_arr[$i] != 'kl1.jpg') { print "<center><a href=\"" . $path . "/" . $f_arr[$i] . "\" target=\"_blanc\"><img src=\"" . $path . "/" . $f_arr[$i] . "\" width=\"550\" border=\"0\"></a><br><br>\n</center>"; }}?><title>.:: Ikhebtetten.be ::. Gallery</title><body bgcolor="3d3d3d" text="#FFFFFF" link="#FF0000" vlink="#FF0000" alink="#FF0000"></body>
  2. Hey, thanks! now it works, it was Thumbs.db with a capital letter. @cyborgxxi here's a good host; http://www.hugedomains.com/domain_profile.cfm?d=filelodge&e=com, 500mb, hotlinking,...
  3. hello, everything works like i want it to work now, but when i put it online, at the bottom it shows a square like the other pictures, but its the file 'thumbs.db' wich is invisible for me on my pc and server, so there is a blanc image at the bottom, now, my question is, can you let the php-code let only show the .jpg and .JPG files? How? Here's my code; <?php $path = $_GET["path"]; if( !isset( $path ) || $path == "" ) { $path = "."; } $d_arr = array(); $d = 0; $f_arr = array(); $f = 0; if( is_dir( $path ) ) { if( $handle = opendir( $path ) ) { while( false !== ( $file = readdir( $handle ) ) ) { if( $file != "." && $file != ".." && $file[0] != "." ) { if( is_dir( $path . "/" . $file ) ) $d_arr[$d++] = $file; else $f_arr[$f++] = $file; } } } } if( is_dir( $handle ) ) closedir( $handle ); sort( $d_arr ); reset( $d_arr ); sort( $f_arr ); reset( $f_arr ); for( $i=0; $i < count( $f_arr ); $i++ ) { print "<center><a href=\"" . $path . "/" . $f_arr[$i] . "\" target=\"_blanc\"><img src=\"" . $path . "/" . $f_arr[$i] . "\" width=\"550\" border=\"0\"></a><br><br>\n</center>"; }?> Thanks
  4. oh, and how i can make the borders disappear around my iamges, plz?Thank you!
  5. hello, thanks vujsa, with your tut i came a lot further, and now i have this; <?php # Do we have a path? if not, it's the current directory $path = $_GET["path"]; if( !isset( $path ) || $path == "" ) { $path = "."; } # Initialise list arrays, directories and files separately and array counters for them $d_arr = array(); $d = 0; $f_arr = array(); $f = 0; # Open possibly available directory if( is_dir( $path ) ) { if( $handle = opendir( $path ) ) { while( false !== ( $file = readdir( $handle ) ) ) { # Make sure we don't push parental directories or dotfiles (unix) into the arrays if( $file != "." && $file != ".." && $file[0] != "." ) { if( is_dir( $path . "/" . $file ) ) # Create array for directories $d_arr[$d++] = $file; else # Create array for files $f_arr[$f++] = $file; } } } } # Wrap things up if we're in a directory if( is_dir( $handle ) ) closedir( $handle ); # Sort and reset the arrays sort( $d_arr ); reset( $d_arr ); sort( $f_arr ); reset( $f_arr ); # Print file list for( $i=0; $i < count( $f_arr ); $i++ ) { # Only print path and filename print "<a href=\"" . $path . "/" . $f_arr[$i] . "\"><img src=\"" . $path . "/" . $f_arr[$i] . "\"></a><br><br>\n"; }?> So, you have the images all sorted under each other, with a link to the image, but i want that the image that is shown is if width is bigger then 500px it shows it with the 500px with so you have to click the iamge to the HQ pic, so how do i do that? In html its just width="500", but here that doesn't work, i found this script on the internet, maybe someone can put it together, if you need a script like this orso; <?PHP$image = "/map/plaatje.gif"; $size = getimagesize("$image");$width = $size[0];$height = $size[1];if ($width > 294){ $width = 294; $percent = ($size[0] / $width); $height = ($size[1] / $percent);}?> Thanks
  6. hello, thanks for the replies, but i'm looking for just one php page with simething init that reads whats in the url, like in my first post;http://forums.xisto.com/no_longer_exists/ the actual page shows only the images all below each other, i ca ndo it in html, but its a lot of work, cause i have very much galeries to put online, so i would like to make it more dynamic through php, but i dont know anythin of php,Can someone make such a page for me? it's just one page?i would be very gracefull,thanks,Michiel
  7. Yes, that is what i mean, microscopic earthling,can someone help me?Has someone such a script or where can i learn itthanks
  8. is it possible to make a page in php, with a url like this: httq://http://forums.xisto.com/no_longer_exists/ (This is a sample link, read below) so that in what i change the last part the gallery will change with it? so that i just have to make one php-page and this page just shows all the imaes in the map thats in the url after the questionmark?? thanks,
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.