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: create THUMBS and NORMAL in subdirectories  (Read 3783 times)

0 Members and 1 Guest are viewing this topic.

wooff

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
create THUMBS and NORMAL in subdirectories
« on: May 25, 2006, 09:06:24 pm »

Hi,
I would like to have "thumbnails" and "reduced size images" files in SUBDIRECTORY of actual album.
I thought that it will be easy to do in settings. But when I put config -> Files and thumbnails advanced settings -> The prefix for thumbnails *
Code: [Select]
/subdirectory/thumb_ instead of
Code: [Select]
thumb_ but its not working. It will fall down during adding new images with message Unable to create thumbnail or reduced size image.

So, its mean that it cannot create dirrectory ))-: ... Iam tried to evolve the code a little bid, but unfortunately Iam not so skilled one.
Can you somebody help me? or show me the right way..
Thanks in advance
Have a nice day ((-:
Wooff
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: create THUMBS and NORMAL in subdirectories
« Reply #1 on: May 26, 2006, 12:28:16 am »

First of all, you shouldn't have a slash at the beginning of the prefix.  Use instead:
Code: [Select]
subdirectory/thumb_
Secondly, Coppermine does not know it needs to create a subdirectory to hold the thumbs and normal images, so you are getting that error.  I have been using the subdirectory as shown above and all I do is create the subdirectory manually in any new album folders I create.  As long as I make sure the subdirectory exists before adding the photos, Coppermine is happy and will create the thumbs and normal images in the subdirectory.

Yes, you could add some code to create the subdirectory, but I haven't done so yet and have still been able to use the subdirectory scheme fine.  If I forget, I merely create the subdirectory and run the "add" again.

Keep in mind that Coppermine is not designed to allow such subdirectories but it does work, at least for now.
Logged

wooff

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: create THUMBS and NORMAL in subdirectories
« Reply #2 on: May 26, 2006, 12:52:15 pm »

hi,
Iam already tried all possible places for slash. With/without slash at the begging and/or end.

Problem with me is... that I have database of 10GB and thousands of photos. And I dont want to do it manualy.
And also I would like to separate the original files from the "cpg" files. All of them. And this looked to me like easy way to do that.

OK, nevermind. I will try to add some code or solve it other way. (keep all the photos somewhere else in duplicity).
Thanks for reply.
W
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: create THUMBS and NORMAL in subdirectories
« Reply #3 on: May 26, 2006, 04:29:08 pm »

I have thousands of photos as well, but I only add a hundred or so at a time in a few albums, so I just create the folder in those few folders each time.  (And I use the MassImport plugin to add new photos & albums, with a mod to ignore the thumbs subdirectories.)

It sounds like the difference between us is that I did this at the beginning, before any photos were in the database, and have carried it through.  It sounds like you are trying to do this *after* you have thousands of photos in the database.  As the config setting help says, you must not change this setting *after* you have photos in the database because this setting is used on adding the photo and the prefix (including the subdirectory) is hard-coded into each photo entry.  To change the setting now, you'd have to modify all those filepaths in the database to sync things up with your new prefix.

As for the slash, I use a Thumbs subdirectory in each album.  If you wanted one subdirectory for all albums' thumbs, an absolute reference using a beginning slash would probably work - I just haven't tried that.

The code for what you want to do shouldn't be that complicated.  A similar thing exists in the File2AlbumMover plugin which syncs up your Coppermine albums with the file structure on the server (by modifying the file structure).  A mod to this plugin would probably do what you want.  That would get things from the past ready.  For the future additions, you'd still have to add extra code, to this plugin hopefully so you can keep things organized.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: create THUMBS and NORMAL in subdirectories
« Reply #4 on: May 27, 2006, 12:38:25 am »

What's the point in keeping the thumbs and intermediates in a separate directory anyway? Just curious.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: create THUMBS and NORMAL in subdirectories
« Reply #5 on: May 27, 2006, 07:25:49 am »

It's not really a big deal - there is no grand advantage.  I guess I mostly find it easier to sync things and browse directories when there aren't 3 times as many files.  I think of the thumbs and normals are being "internal" to Coppermine and so prefer to keep them out of sight (and out of mind, as the saying goes).
Logged

wooff

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: create THUMBS and NORMAL in subdirectories
« Reply #6 on: May 28, 2006, 07:33:06 pm »

Why, you ask?
Because I have all my photos in the tree structure which is similar to category - albums structure of cpg.
  • home
    • me
    • dog
  • work
    • office
    • car
  • ...
And Iam using regular file browser (Total Commander or Krusader) do browse and then just hit enter to start image viewer program (setted to fullscreen). Then I can easily and very fast browse my photos. Or start slide show inside one directory (like album) to view all the photos inside... But if there will be a lot of (for this moment) trash pictures like thumbs_* and normal_* or even comment_* ... then the easy browsing will be unclear, chaotic... The slide show will show also all the thumbs_, normals_,... what I dont want. So, I want to have structure like
  • home
    • me
      • support_files
    • dog
      • support_files
  • work
    • office
      • support_files
    • car
      • support_files
  • ...
Inside the support_files subdirectory can be any mixture of files (panorama source files backup, thumbs_, normals_, comments_, alternatives, ...), because I will never browse inside it by hand, only exeptionaly if I need to do something special. This subdirectory could be (and I will do) set to hidden attribut. Any help program like CPG will have acces only to this subdirectory and not to original one. It could prevent any accidential damage to original photos.

Its why I want to have sepparated subdirectory in every album. (.. you said.. which is also not bad idea - to have all these pictures in parallel directory structure - possibly on totally different harddisk... it will have some more advantages... but let it be for now... its just hypothetic option).

Iam open to any critique and I will welcome it... please, anybody feel free to your oppinion on this. May be I will chance my possition under the pressure of arguments.
Have a nice day ((-:
W
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: create THUMBS and NORMAL in subdirectories
« Reply #7 on: May 28, 2006, 08:49:08 pm »

Using your desktop PC as webserver is not recommended...
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.