forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Upload => Topic started by: kegobeer on June 10, 2005, 05:54:15 am

Title: Batch add - no listing with no errors displayed
Post by: kegobeer on June 10, 2005, 05:54:15 am
If you are trying to use the batch add function, but you don't get any directories listed, and you've verified all of your file permissions are correct, you can try this:

In seachnew.php, find

Code: [Select]
function display_dir_tree($folder, $ident)
below that, replace

Code: [Select]
if (!is_readable($dir_path)) return;
with
Code: [Select]
//if (!is_readable($dir_path)) return;
If that doesn't help, continue further down that function, and replace

Code: [Select]
        //if (is_dir($CONFIG['fullpath'] . $folder . $file) && $file != "." && $file != "..") { // removed by following line for 'do not show folders with dots': gaugau 03-11-02
        if (is_dir($CONFIG['fullpath'] . $folder . $file) && substr($file,0,1) != "." && strpos($file,"'") == FALSE && $file != substr($CONFIG['userpics'],0,strlen($CONFIG['userpics'])-1)  && $file != "edit" ) {

with

Code: [Select]
        if (is_dir($CONFIG['fullpath'] . $folder . $file) && $file != "." && $file != "..") { // removed by following line for 'do not show folders with dots': gaugau 03-11-02
        //if (is_dir($CONFIG['fullpath'] . $folder . $file) && substr($file,0,1) != "." && strpos($file,"'") == FALSE && $file != substr($CONFIG['userpics'],0,strlen($CONFIG['userpics'])-1)  && $file != "edit" ) {

is_readable may have trouble on some servers that have safe mode enabled in php.ini.
Title: Re: Batch add - no listing with no errors displayed
Post by: Joachim Müller on July 26, 2005, 08:34:50 am
Warning: there appear to be some users who haven't understood the concept of batch-adding, so they apply this hack without knowing what batch-add is all about: you mustn't FTP-upload to the userpics folder, but to a custom folder you have to create first within the albums folder. The userpics folder is not meant to turn up when using batch-add: it's hidden on purpose. Coppermine uses the userpics folder for internal stuff (this is where the http uploads are stored), you mustn't use it for batch-adding. Before applying the hack posted by kegobeer, make sure you have read the docs, especially the batch-add section. Verify that you have set permissions as suggested. I repeat: don't FTP-upload to the userpics folder. Never ever!