Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: BatchAdd tweak required  (Read 9371 times)

0 Members and 1 Guest are viewing this topic.

sjj1805

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
BatchAdd tweak required
« on: October 04, 2014, 06:35:36 pm »

Linkto my Albums:
http://stevejjones.co.uk/photo/index.php
I have spent several hours searching through these forums for the answer but alas I need to ask your help!
I know what needs to be done but I just dont know how to do it myself.
I have over 25,000 photographs stored on my hard drive and when I first began I created a directory structure where my photographs would be stored according to the date they were taken.
Under the built in Directory "Albums" in my coppermine installation
C:\inetpub\wwwroot\photo\albums
I then create sub-directoriesfor the year e.g.
C:\inetpub\wwwroot\photo\albums\2010
C:\inetpub\wwwroot\photo\albums\2011
C:\inetpub\wwwroot\photo\albums\2012
C:\inetpub\wwwroot\photo\albums\2013
C:\inetpub\wwwroot\photo\albums\2014

Below the 'year' Comes the month. eg.
C:\inetpub\wwwroot\photo\albums\2014\01Jan
C:\inetpub\wwwroot\photo\albums\2014\02feb
C:\inetpub\wwwroot\photo\albums\2014\02mar

Below this the actual album itself eg.
C:\inetpub\wwwroot\photo\albums\2014\02mar\Med_Cruise
C:\inetpub\wwwroot\photo\albums\2014\02mar\Someones_Party
C:\inetpub\wwwroot\photo\albums\2014\02mar\Stonehenge

The problem I have encountered with "Batch Add" is that If I later add new photographs to an existing album (on the harddrive) the batch add process is marking ALL of the photographs for upload and not just the new ones.

After several tests I discovered that the batch add process works correctly if a folder is under the actual root directory "Albums" and only marks new photographs for upload.
eg.
C:\inetpub\wwwroot\photo\albums\newDirectory

It seems that a tweak to "Searchnew.php" is required - I think probably to the variable $expic_array
But I do not know howto do so.

Any help appreciated. Thank you in advance.

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: BatchAdd tweak required
« Reply #1 on: October 06, 2014, 10:44:09 am »

After several tests I discovered that the batch add process works correctly if a folder is under the actual root directory "Albums" and only marks new photographs for upload.
eg.
C:\inetpub\wwwroot\photo\albums\newDirectory

Batch-add should only mark new files, regardless of the directory depth. I confirmed the issue on my test bed and try to fix it as soon as possible.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: BatchAdd tweak required
« Reply #2 on: October 06, 2014, 10:56:00 am »

Issue occurs on Windows driven systems, because of the directory separator "\" used in the parameter "startdir".

Please open searchnew.php, find
Code: [Select]
$startdir = $matches[0];and replace with
Code: [Select]
$startdir = str_replace('\\', '/', $matches[0]);
Logged

sjj1805

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: BatchAdd tweak required
« Reply #3 on: October 06, 2014, 01:24:27 pm »

Andre, Works perfectly. Thank you for doing this and so quickly.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: BatchAdd tweak required
« Reply #4 on: October 06, 2014, 01:33:35 pm »

Committed fix in SVN revision 8740. Will be part of cpg1.5.32 and above.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.