forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: motofzr1000 on January 29, 2005, 02:26:29 pm

Title: Thumbnail creation questions...
Post by: motofzr1000 on January 29, 2005, 02:26:29 pm
Hi,

I'm using Coppermine some time now, and also modded some things, and it works just great. I would like to use this gallery for another site (with Coppermine 1.3.2), and again, I would like to mod something, but don't know exactly how. Basically, want I want do to is the following: I want to turn off thumbnail creation, or let Coppermine put the created thumbnails in a different folder. If it's possible to turn off creation, an album list for example would show a resized (original) picture. Is this possible, and how much work would this involve ? The other option would be that the created thumbnails would be saved in a different folder on the server.

Reason for this is that I want to use a Flash MX Photo Gallery, and it reads the content of the album folders, and so it shows all images which are in that specific folder. So, it also shows the thumbnails. The images that I upload are quite small in filesize, and each folder doesn't contain that much images, so that isn't a problem. Basically, I want to use Coppermine for this site to be used as sort of an admin tool to manage galleries for the Flash site.

Does anyone how to solve this ?

kind regards,

Jurgen
Title: Re: Thumbnail creation questions...
Post by: Tranz on January 29, 2005, 07:48:19 pm
I'm not sure what flash mx photo gallery is. Is it possible to tell it to ignore files with the thumb_ prefix? I am using a random image generator script that gets files from my gallery folders where I tell it to do the opposite of your request, which is to use thumbnail files and if a file is randomly selected that doesn't have the thumb prefix, it is added to the filename.
Title: Re: Thumbnail creation questions...
Post by: motofzr1000 on January 29, 2005, 09:31:59 pm
Hi, I'm using an Image gallery, made in (Macromedia) Flash MX, and coppermine is used as an admin tool for uploading and managing the albums. I don't know exactly if i can let the php file tell to disregard the thumbnails. This is te code in the php file which 'reads' the files in the albums. If I can get Coppermine to create png or gif thumbnails, my problem would also be solved, because then I could delete gif or png from the extension array. Or if there's anyone out there who can tell me how to disregard files with the thumb-prefix with the code below, it would be very much appreciated...

<?php
   parse_str($_SERVER['QUERY_STRING'],$vars);
   $naamdir = $vars['naamdir'];
   
function Checkfotos($filenaam, $ext) {
$passed = FALSE;
$testExt = "\.".$ext."$";
if (eregi($testExt, $filenaam)) {
$passed = TRUE;
}
return $passed;
}

$exts = array("gif","jpg$|\\.jpeg","png","bmp");
$dir = opendir("Coppermine/albums/$naamdir");
$files = readdir($dir);
while (false !== ($files = readdir($dir))) {
foreach ($exts as $waarde) {
if (Checkfotos($files, $waarde)) {
$count++;
echo "&foto$count=$files";
break;
}
}
}
closedir($dir);
echo "&aantal=$count"
?>