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]   Go Down

Author Topic: Explain subdirectory names within userpics  (Read 5052 times)

0 Members and 1 Guest are viewing this topic.

dustyb

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Explain subdirectory names within userpics
« on: June 26, 2004, 11:23:47 pm »

Hello,

Sorry for the dumb question here... I have a dozen or so album categories. Each category contains at least one album. My Coppermine installation is integrated with vBulletin, and all vBulletin Registered users and Admins can post pictures to all albums.

My question: Uploads in this configuration appear to be going to the userpics directory. Does that sound right? Can somebody explain how the subdirectories of userpics get named? I can't find any relation between these subdirectories and the album id to which they were uploaded.

Also, related question: I know it has been asked and answered many times.... do not batch upload from userpics, I know. But I'm looking at the best way to absorb a 300 picture PhotoPost gallery into my existing Coppermine. I certainly could batch upload from an area in /albums, but I was hoping to not have to develop some major script to map out the rest of the PhotoPost fields to Coppermine. Any suggestions?

Dustyb
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Explain subdirectory names within userpics
« Reply #1 on: June 27, 2004, 12:41:01 am »

My question: Uploads in this configuration appear to be going to the userpics directory. Does that sound right? Can somebody explain how the subdirectories of userpics get named? I can't find any relation between these subdirectories and the album id to which they were uploaded.
I don't get your point, please rephrase.

Also, related question: I know it has been asked and answered many times.... do not batch upload from userpics, I know. But I'm looking at the best way to absorb a 300 picture PhotoPost gallery into my existing Coppermine. I certainly could batch upload from an area in /albums, but I was hoping to not have to develop some major script to map out the rest of the PhotoPost fields to Coppermine.
Totally unrelated question imo. Import from PhotPost has nothing to do with batch-uploading to userpics or not. Please do only post one question per thread in the future. There's no converter available for PhotoPost yet afaik.

GauGau
Logged

dustyb

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Explain subdirectory names within userpics
« Reply #2 on: June 27, 2004, 06:23:51 am »

I don't get your point, please rephrase..

1. There are no personal User Galleries on my site, that feature has been disabled, yet all uploads to the regular gallieries go to userpics. I was just verifying this behavior was correct and that I hadn't misconfigured my regular galleries somehow as User Galleries. The 'userpics' directory name could be suggestive of that.

2. There are subdirectories under userpics containing upoaded photos. How are those subdirectories named by the application? Their names don't seem to correspond in any way to the album id into which the photo was uploaded which would be my first instinct.

Totally unrelated question imo. Import from PhotPost has nothing to do with batch-uploading to userpics or not. Please do only post one question per thread in the future. There's no converter available for PhotoPost yet afaik.

Sorry. I was alluding to the possibility that I might attempt a PhotoPost conversion script which would append records directly into the Coppermine mysql tables as well as moving the image and thumb. In other words I'd skip the batch-upload because I'd be writing the image data, file, filepath, dimesnions, title, captions, views, etc all automatically with a conversion/mapping script. The field filepath in the pictures table obviously describes the path to the image... and in my installation (as per above) that path is /userpics/some_subdirectory_name.

So again, just wondering how the userpics subdirectories got their names and whether there was logic I'd need to write into my script which related the /userpics/subdirectory name to the album id (aid).
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Explain subdirectory names within userpics
« Reply #3 on: June 27, 2004, 10:00:47 am »

The folder "userpics" is the place where all http uploads go to - it is named userpics for historical reasons, nothing to worry. In fact coppermine creates a sub folder within userpics for each user who uploads pics - the only relation to the albums they actually appear in is the mySQL database that keeps track of the relation "path info" - "category/album". Once the pics are uploaded, coppermine doesn't move them around if you move pics from one album to another. There's no relation between the sub-folder name within userpics and the album id ("aid"). Of course you're encouraged to write a converter (and even post it as a mod), but I have to warn you: others have tried to do so and have failed, it's not an easy task. To avoid double-naming, I'd add the export the PhotoPost files to a folder within the albums directory named "export" or whatever (instead of "userpics/foobar") to avoid double-naming.

GauGau
Logged

dustyb

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Explain subdirectory names within userpics
« Reply #4 on: June 28, 2004, 01:57:48 am »

Thanks GauGau. I see now the userpics subdirectory names follow the convention 1xxxxxx, where x is the user id (which in my case comes over from the vBulletin side). I'm not a strong PHP programmer, so I'd probably attempt the conversion/import script in straight Perl and I'm sure it would be a real hack and not post worthy. I'll have to review all the details a little more closely...

Maybe I could trash the PhotoPost thumbs and do a batch load of the PhotoPost pics from /album/exports under my id. Then I suppose I could take note of the pid range of the resulting new Coppermine picture records and establish a mapping between the old PhotoPost pid and the new Coppermine pid. With that, I could loop through with a bunch of update queries on the fields I want to bring over... pretty much title, caption, and keywords. Rebuild the album counts, etc. I dunno, as you say there are obviously other details. But if I'm willing to basically lose any of the old user information, comments, ratings, views, maybe this is do-able. Thanks again.
Logged

dustyb

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Explain subdirectory names within userpics
« Reply #5 on: July 02, 2004, 05:08:34 am »

Of course you're encouraged to write a converter (and even post it as a mod), but I have to warn you: others have tried to do so and have failed, it's not an easy task. To avoid double-naming, I'd add the export the PhotoPost files to a folder within the albums directory named "export" or whatever (instead of "userpics/foobar") to avoid double-naming.

Well, I took a quick and dirty approach... did a batch upload of the PhotoPost pics one album at a time. When Coppermine finished inserting them, I joined the PhotoPost pictures table on the Coppermine pictures table on filename, and given that basic structure, I was able to put together a series of mysql update and append queries to bring over the picture fields and comments. I needed a couple extra fields too.

Anyway, worked pretty well, but I'm left with a problem: I assumed the Sort Date +/- function keyed off the ctime field. It appears that is not the case and that the program uses the pid field instead, making the valid assumption that the larger the pid the more recent the addition. Is that correct? It appears that ctime is only used in the picture info hash (the mouseover information). Is that correct?

My problem then stems back to the batch upload where the images were added (pid created) in some order that I can't remember, probably file name. I updated the ctime value from PhotoPost table, but I'm stuck of course with the Coppermine pids which do not correspond to the PhotoPost pids in sequence... thus my Date sort doesn't yield anything resembling a date added sequence.

Is there a mod to Date Sort by ctime rather than pid? How about a mod to specifiy the add order within a batch upload? I read a little about a new date field that could be read out of the .jpg. Do you think I need to wait for that in order to bring some true date sort back to my after-PhotoPost import environment?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Explain subdirectory names within userpics
« Reply #6 on: July 02, 2004, 07:18:57 am »

I must admit I haven't looked into those mechanisms in detail, but maybe you'll want to take a look at the mods board - afaik there are some postings that deal with non-standard sorting.

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 17 queries.