PDA

View Full Version : Question about "copy/move/delete" feature


Julien
28th of March 2005 (Mon), 05:41
Hi,
I've just upload 100 photos to the wrong exhibition, and now i'm using the "move" feature for the first time, and it seems it doesn't only update the DB, but it does some moving ftp operations. Which i can't understand because the files don't really move (thumbnails stay in thumb dir, small stay in small...). So what does the ftp do? It moves a file to its same place?
I think the operation of moving 100 photos from an exhibition to another would be faster if it only updated the db, am i wrong?

wkitty42
29th of March 2005 (Tue), 21:57
I think the operation of moving 100 photos from an exhibition to another would be faster if it only updated the db, am i wrong?
you are not wrong if all the photos are stored in the same directory for all exhibits... however, if each or some exhibits have different directories, then there does need to me some movement of files when you move them from one exhibit to another...

i would guess, without looking at the code, that pekka simply hasn't coded this much smarts into the move (and possibly the copy) code... it would take a compare of the current file's name and location to the destination to see if they are the same and if not, do the ftp stuff... if they are the same, then yes, a simple database update should be all that needs to be done...

Pekka
30th of March 2005 (Wed), 04:28
I'll remove the unneeded ftp action from the code. It was just left there...

Julien
30th of March 2005 (Wed), 12:38
Well that's nice Pekka, thx a bunch again ;)

Actually wkitty42, i didn't know that different exhibitions could be set in different directories. I thought photos (and their directories) were just dependent of the size, not the exhibition they were in. Sorry about that!

Pekka
30th of March 2005 (Wed), 12:45
Well that's nice Pekka, thx a bunch again ;)

Actually wkitty42, i didn't know that different exhibitions could be set in different directories. I thought photos (and their directories) were just dependent of the size, not the exhibition they were in. Sorry about that!

Each exhibition has one thumb directory and one microthumb directory. Several exhibitions can share thumb directories.

Each photo can have X number of larger sizes which can be in any size paths.

wkitty42
31st of March 2005 (Thu), 10:37
Actually wkitty42, i didn't know that different exhibitions could be set in different directories. I thought photos (and their directories) were just dependent of the size, not the exhibition they were in. Sorry about that!
no need to apologize to me... i guess that many don't realize that... all of my exhibits, except for a couple, are in their own directories with their own sizes, thumbs and microthumbs...

there have been discussions on this board about possible directory structure layouts for the exhibits... i've participated in one or two of those... this directory structure is what the PATHS settings are all about in the admin control panel... that's where you define the paths and then tell which exhibits use which paths...

i feel that it is easier and better to keep each exhibit in its own path mainly so that you can maintain your photos easier and not worry about name conflicts and such... also, some operating systems have problems when there are too many files in one directory... DOS used to have huge slowdowns when there were more than 255 files in one directory... i don't know how big that (hidden) limit is in the windows FAT32 stuff... other drive formats, no matter the OS, may not have limits like these... these limits aren't really "limits" per se but more like problems searching out one file in hundreds... kinda like looking for one particular needle in a pile of thousands ;)

anyway, you may not ever see anything like that... i don't see it as much today as i did 10+ years ago...

another factor is simple organization... i like to keep my photos and files and such all nicely organized so that i can find something fairly quickly when i need it...

depending on the size of each exhibit and/or how many exhibits you have, piling all the photos in one directory may be just fine... however, if you have say 10 exhibits with 100 photos each, you'd probably be better off putting each exhibit in its own directory... maybe something like this...


exhibits--+--#1
| +--800x600
| +--1024x768
| +--2048x1024
| +--thumbs
| +--microthumbs
|
+--#2
| +--800x600
| +--1024x768
| +--2048x1024
| +--thumbs
| +--microthumbs
|

where you might put the default photo size of 640x480 in #1 or #2 and then an 800x600 size in the 800x600 directory and the same for 1024x768 and 2048x1024... and the thumbs and microthumbs would go in their directories...

using the above, you could also have a 640x480 directory for those size photos and then you could define one of those four as "default" in the paths settings for that one exhibit... that way, you should be able to switch default sizes quickly by just editing which one is "default" for each gallery and, of course, changing the name of the old default ;)

hummm... i know that pekka has done a lot of work on the paths stuff in the upcoming version but i don't know what... in looking at the above, it'd be nice if he simply had a checkbox beside each exhibit's paths that would denote which was to be the default... that would save having to edit things so much... i'm also not sure, but i suspect, that one might have some stuff to do in the photo editor to adjust the paths for each picture if one alters the default from one to another...

i hope i haven't lost you in my ramblings... i also hope that you may have a better understanding of what is possible with the paths in EE ;)

wkitty42
31st of March 2005 (Thu), 10:51
I thought photos (and their directories) were just dependent of the size, not the exhibition they were in.
whoops... i forgot to add that that is one of the great things that pekka has done in developing EE... nothing is really dependent on anything else... you can set up your exhibit directories any way you like and call them anything you want... i've even seen folk talk about setting their exhibits up like this...

exhibits--+--800x600
| +--#1
| +--#2
| +--#3
| +--#4
+--1024x768
| +--#1
| +--#2
| +--#3
| +--#4
+--2048x1024
| +--#1
| +--#2
| +--#3
| +--#4
+--thumbs
| +--#1
| +--#2
| +--#3
| +--#4
+--microthumbs
+--#1
+--#2
+--#3
+--#4
it all just depends on how you want to set everything up and organize it or if you even want to organize it at all ;)