coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Upload => Topic started by: prence on June 09, 2005, 08:00:19 AM

Title: Batch Add Files - No Directories
Post by: prence on June 09, 2005, 08:00:19 AM
Hey, I'm trying to do a batch add and like so many other people here, no directories show up to select from.

Before you ask..
Yes, I've read the manual.
Yes, I put the files in /public_html/thesawx/gallery/albums/upload/ rather than /userpics/
Yes, I made sure the folder is chmoded 777 (and have tried 755)

I'm pretty stumped, any suggestions?
Title: Re: Batch Add Files - No Directories
Post by: Joachim Müller on June 09, 2005, 09:30:41 AM
don't name that folder "userpics". Name it something else and everything will work as expected. Don't use spaces in album names.
Title: Re: Batch Add Files - No Directories
Post by: prence on June 10, 2005, 01:02:36 AM
Err.. let me rephrase what I said.

The directory I uploaded the images to is /public_html/thesawx/gallery/albums/upload/
It is NOT /userpics/ because it says not to use that.

Any more suggestions?
Title: Re: Batch Add Files - No Directories
Post by: kegobeer on June 10, 2005, 03:55:18 AM
Create a subdirectory in /albums, set the permissions correctly, and try again.  Does that directory show up?
Title: Re: Batch Add Files - No Directories
Post by: prence on June 10, 2005, 04:20:07 AM
Nope, this time I created a directory called 'moree' in /albums/ and it still doesn't show up.
Perms are 777, I tried it with 755 on the new directory as well.
Title: Re: Batch Add Files - No Directories
Post by: kegobeer on June 10, 2005, 05:36:53 AM
Do you ever get error messages displayed?

In seachnew.php, find

function display_dir_tree($folder, $ident)

below that, replace

if (!is_readable($dir_path)) return;

with

//if (!is_readable($dir_path)) return;

If that doesn't help, continue further down that function, and replace

        //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

        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" ) {


See if that helps at all.
Title: Re: Batch Add Files - No Directories
Post by: prence on June 10, 2005, 05:45:25 AM
Nope, I don't.
I did the first fix you listed and it showed the directory and it all worked fine that way.  Not sure why it does, but thanks a lot for the help.
Title: Re: Batch Add Files - No Directories
Post by: kegobeer on June 10, 2005, 05:48:43 AM
Does your server run PHP in safe mode?
Title: Re: Batch Add Files - No Directories
Post by: prence on June 10, 2005, 07:56:52 AM
Nope
Title: Re: Batch Add Files - No Directories
Post by: vilbs on June 11, 2005, 04:08:24 AM
Just so you know... I had the same problem and it was only solved by making BOTH the code changes not just the first one.  Great piece of software - many thanks :D
Title: Re: Batch Add Files - No Directories
Post by: kegobeer on June 11, 2005, 04:53:17 PM
Thanks for the report.  I modified my batch add sticky post to include both possible code changes.