Advanced search  

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]

Pages: 1 2 3 4 [5] 6   Go Down

Author Topic: Batch add with automatic album/cat structure from directory tree.  (Read 155064 times)

0 Members and 1 Guest are viewing this topic.

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #80 on: February 01, 2006, 07:11:17 pm »

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.
Logged

howie10

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #81 on: February 01, 2006, 07:39:11 pm »

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     ;)
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #82 on: February 01, 2006, 08:27:04 pm »

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.
Logged

howie10

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #83 on: February 01, 2006, 10:27:06 pm »

Thanks. I promise to post back here too.

 8)
Logged

howie10

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #84 on: February 02, 2006, 07:28:28 pm »

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.
 
Logged

howie10

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #85 on: February 06, 2006, 09:17:39 am »

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   ???
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #86 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
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #87 on: February 07, 2006, 07:41:51 am »

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.
Logged

howie10

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #88 on: February 14, 2006, 05:56:58 pm »

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.
Logged

redlabour

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 15
    • Politikstube.de - die christliche Politikcommunity
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #89 on: March 06, 2006, 06:48:36 pm »

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
Quote
Access 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
Logged

ktwenrick

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #90 on: April 30, 2006, 10:04:48 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #91 on: April 30, 2006, 10:55:42 am »

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.
Logged

ktwenrick

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #92 on: May 06, 2006, 02:36:25 am »

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
Logged

ktwenrick

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #93 on: May 06, 2006, 02:58:16 am »

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!

Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #94 on: May 06, 2006, 03:22:16 am »

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.)
Logged

ktwenrick

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #95 on: May 07, 2006, 06:22:43 am »

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
« Last Edit: May 07, 2006, 08:11:07 am by ktwenrick »
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #96 on: March 12, 2007, 11:01:01 am »

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

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #97 on: March 12, 2007, 12:47:10 pm »

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.
Logged

UncleRemus

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #98 on: September 11, 2007, 11:28:25 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Batch add with automatic album/cat structure from directory tree.
« Reply #99 on: October 02, 2007, 09:09:42 am »

[Note: Tagged as 1.4, see later posts in thread for updated versions of this mod]
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.
Logged
Pages: 1 2 3 4 [5] 6   Go Up
 

Page created in 0.039 seconds with 20 queries.