forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upload => Topic started by: Sandrina on October 30, 2011, 12:28:50 pm

Title: Batch Add Files problem
Post by: Sandrina on October 30, 2011, 12:28:50 pm
Hi.
I uploaded my gallery verion a few weeks ago and i have i problem, that i didn't have, when gallery was 1.4 version.
I prefered to upload images via Batch Add Files, so some FTP folders names are short, like "Photo Shoot01", but some are long like "68 - Out and About in Soho, NY - October 26, 2011" and when i try to add files from album, that named with long name - thay didn't add and i just jumped to the strat page of the Batch Add. When i have 1.4 version i don't have this error and files added from any album with any long name.
Tell me please, how can i fix it in 1.5 version? Thank you.

My gallery - http://ahathaway-online.info/gallery
Version - 1.5.16
Title: Re: Batch Add Files problem
Post by: Αndré on November 03, 2011, 05:11:39 pm
Please post the complete path (beginning with albums/...) of a directory (or maybe all) that doesn't work as expected.
Title: Re: Batch Add Files problem
Post by: Sandrina on November 05, 2011, 12:26:44 pm
Hi.
Here is example album link - ahathaway-online.info/gallery/albums/candids/2011/13 - Leaves Oscar Pre-Party at Chateau Marmont - February 23, 2011
Title: Re: Batch Add Files problem
Post by: Sandrina on November 09, 2011, 04:45:36 pm
Find another bug, that i didn't have in 1.4 version. Iа album name like "Name(2001)", i can't even open it. Only after i remove ( and ), i can see images in it. How can i fix this error? Bacuse when i have 1.4 version of gallery i upload many files in albums that was named like that, and now i can't add new images in them, bacause i can't upload them.
Title: Re: Batch Add Files problem
Post by: Sandrina on November 09, 2011, 05:16:32 pm
Ok, as i understand after testing, version 1.5 didn't like when there are next symbols in albums names (they was allowed in old version):
.  ,  (  ) 

So, can i fix it some how? Bacause gallery worked about 2 years on version 1.4 and many albums names are forbidden now to use and i can't add new files in them and this is really bad.
I will be waiting your answer very very much, because it's really important for me. Thanks.
Title: Re: Batch Add Files problem
Post by: Αndré on November 16, 2011, 05:37:22 pm
If you want to allow those characters, open searchnew.php, find
Code: [Select]
} elseif ($superCage->get->keyExists('startdir') && $matches = $superCage->get->getMatched('startdir', '/^[0-9A-Za-z\/\\\\_-\s]+$/')) {and replace with
Code: [Select]
} elseif ($superCage->get->keyExists('startdir') && $matches = $superCage->get->getMatched('startdir', '/^[0-9A-Za-z\/\\\\\,\.\(\)_-\s]+$/')) {
Title: Re: Batch Add Files problem
Post by: Sandrina on November 18, 2011, 02:36:23 pm
Thank you very much for answer.
Now i can add albums with , and . characters.
But it's still didn't work, if i have ( or ) in folder name. For example, if folder named like Title (2002) i can't see any albums that i was created in that folder and any photos as well. Structure on that folder is like
Title (2002)
   Album 1
      photo1.jpg
      photo2.jpg
      photo3.jpg
   Album 2
      photo1.jpg
   Album 3
Title: Re: Batch Add Files problem
Post by: Sandrina on November 28, 2011, 12:41:48 pm
Αndré, can you give me any advice regarding my question (previous post)?
Thank you.
Title: Re: Batch Add Files problem
Post by: Αndré on November 28, 2011, 03:58:30 pm
You have to extend the regex in minibrowser.php, too:
find
Code: [Select]
$folder_regex = '/^([A-Za-z]:){0,1}[0-9A-Za-z\\.\\\\_\\-,&\' ]+$/';and replace with
Code: [Select]
$folder_regex = '/^([A-Za-z]:){0,1}[0-9A-Za-z\\.\\\\_\\-,&\' \,\.\(\)]+$/';
find
Code: [Select]
$folder_regex = '/^[0-9A-Za-z\\.\\/_\\-,&\' ]+$/';and replace with
Code: [Select]
$folder_regex = '/^[0-9A-Za-z\\.\\/_\\-,&\' \,\.\(\)]+$/';
Title: Re: Batch Add Files problem
Post by: Sandrina on November 28, 2011, 08:01:05 pm
now everything work perfectly! ;)
thank you very much!))