create THUMBS and NORMAL in subdirectories create THUMBS and NORMAL in subdirectories
 

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

Main Menu

create THUMBS and NORMAL in subdirectories

Started by wooff, May 25, 2006, 09:06:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wooff

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 * /subdirectory/thumb_ instead of 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

Paver

First of all, you shouldn't have a slash at the beginning of the prefix.  Use instead:
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.

wooff

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

Paver

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.

Joachim Müller

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

Paver

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

wooff

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

Joachim Müller

Using your desktop PC as webserver is not recommended...