Batch add with automatic album/cat structure from directory tree. - Page 5 Batch add with automatic album/cat structure from directory tree. - Page 5
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Batch add with automatic album/cat structure from directory tree.

Started by Nibbler, January 21, 2005, 11:37:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paver

Weird.  I don't know why you are having trouble.

Yes, you can use any of Coppermine's upload tools.  Timer.php uses Coppermine's table to figure out if the picture already exists.  As long as you use the same structure in both category & albums versus the folder structure, you can use either timer.php or Coppermine to add files and both will be happy.  In fact, timer.php uses Coppermine's functions to add everything; it just gathers things up at the beginning to automate the process you would do manually.

howie10

Tis wierd isn't it. Even more so because I run timer.php with a completely different directory structure and it works fine!

Good that I can  do a few manual uploads though. I'll pick out the largest files in each directory first.

Couple of Q's, - when you have time !! :-

1/ Is it possible to 'break' the timer script if I set an album to be read only by a specific group?

2/ Can it crash if a file exceeds the max width/heigh in cpg config?

3/ Are there any known filetypes which cause conflicts? The directory structure I am testing might have some unsupported filetypes, whether by GD2 or coppermine.

4/ Is there also a timeout setting in MySQL5 which might need tweaking?

TIA, - as always     ;)

Paver

This is one reason we should use a separate board for this one add-on.  I'll put together a pre-1.0 release plugin for this script and post it so we can start a sub-board on http://cpg-contrib.org/board/.  (Donnoman mentioned this earlier in this thread.)

One thing to note is that timer.php does not check for problematic characters in your directories.  Check for apostrophes or other "forbidden" characters (as noted in the coppermine config setting).  If you can figure out why one directory structure works but the other doesn't, please post because that will probably be useful for developing this script further.

I don't have any answers to your questions off the top of my head.  I'll check into it later when I have time, if no one else answers.

howie10


howie10

And here I am   ;)

There is a problem i've discovered. Although the script creates albums under categories and sub categories in the correct way, the albums in coppermine are not classified under any category when you look at their properties.

As a result, normal http uploads are very difficult to assign to the correct album and if there are different albums with the same name in different directories, it is impossible to tell (from the album list in uploads, anyway), which are which.

H.
 

howie10

Hi.
I have discovered another problem:

After I have run timer.php, I cannot remove any of the albums it created. I have tried to remove an album in coppermine, - so that I don't confuse the databases), before I delete the matching folder in my directory tree.
However, when I try to remove the album in cpg, I get an error message telling me that I don't have write access to it. Although, If I delete any other albums which I made in the standard way, (in coppermine), I have no problems.

I am running Apache 2 with mysql5 on a win2k installation. My root folder (under 'albums'), is set as write permissions for everyone, in 'sharing'.

I would certainly appreciate any pointers   ???

donnoman

timer doesn't modify the file permissions. It's probably a result of how the images were originally placed in the albums directory.

make sure all folders have been chmodded to 777

donnoman

I've created a plugin conversion of timer.php called CPGMassImport.

you can find more information about it on cpg-contrib.org

http://cpg-contrib.org/board/index.php?topic=123.0

The new version is downloadable from sourceforge, check the link above for more information.

It will also be available via CVS.

Please keep the discusions of CPGMassImport on the cpg-contrib forums so as not to make this thread any more confusing than it already is.

howie10

Quote from: donnoman on February 07, 2006, 04:14:29 AM
timer doesn't modify the file permissions. It's probably a result of how the images were originally placed in the albums directory.

make sure all folders have been chmodded to 777

This is a windows 2k machine (Apache2). I can't chmod anything. I've set all folders and subdirectories to be writeable. Weird.

redlabour

I dont understand this Thread - and i read it completely.

All i want to do is :

Move all Pictures and Categories from MKPortal/modules/coppermine/albums to /gallerie/albums with the same Filenames etc.

I uploaded the timer.php to my /gallerie/ and started it and nothing happens.

Only
QuoteAccess denied
- no GUI - nothing.

Where is the Instruction for this Importer ?


Update :

Will use this one : http://cpg-contrib.org/board/index.php?topic=123.0

ktwenrick

when i try and use it in a fresh install of 1.4.2 every photo fails..

Joachim Müller

don't use cpg1.4.2, it's outdated. Post a meaningful error message, link and more details. Just saying "doesn't work" is not helpful for supporters at all.

ktwenrick

ok thanks! the only reason i was using it was because my fantastico had it as the basic install.. i've now upgraded..thank ya

ktwenrick

so since this mod is for 1.4.3 i'm guessing it wont work with 1.4.5??  or is there an upgrade anywhere? i have over 2500 pictures to upload and i'm not looking forward to it.. this batch upload would be great!


Paver

This thread is marked as 1.4.x so it should be fine.  I'm using timer.php fine with 1.4.5 (although I have modified it for my needs although not since 1.4.2).

However, you should consider using the new MassImport plugin which is based on timer.php.  See donnoman's post above and the link: http://cpg-contrib.org/board/index.php?topic=123.0.  (I am considering using it as well but I need to incorporate my mods to timer.php into the plugin so I'm waiting until I have time to do so.)

ktwenrick

i was having a problem where out of no where my photos would fail to add.. but i just uninstalled the mod and reinstalled it and it stopped failing.. incase someone else has this problem.. hope that helps

mylogon

Quote:

[Note: Tagged as 1.4, see later posts in thread for updated versions of this mod]

Why not put in in the first entry? Makes life simpler...


Joachim Müller

This mod has been made for cpg1.4.x, so it should work for any version (cpg1.4.0, cpg1.4.1, cpg1.4.2, cpg1.4.3, cpg1.4.4, cpg1.4., cpg1.4.5, cpg1.4.6, cpg1.4.7, cpg1.4.8, cpg1.4.9, cpg1.4.10), as suggested above. Since the cpg1.4.x series is the most recent stable one, there's no need to change anything imo. However, it's mandatory that you don't run outdated version, so your version should be cpg1.4.10. If you have an older version: upgrade. If this mod doesn't work with cpg1.4.10, please post details.

UncleRemus

I just wanted to add that I got the script in the first post to work by adding "cpg_" before each call to db_query.

Joachim Müller

Quote from: Nibbler on January 21, 2005, 11:37:57 AM
[Note: Tagged as 1.4, see later posts in thread for updated versions of this mod]
Quote from: donnoman on September 30, 2005, 06:26:53 AM
I took Flux's timer.php and merged a couple of my changes to his code.  This is tested with cpg 1.3, for 1.4 you should just need to change the db_query's with cpg_db_query's.