recursively creating thumbnails multiple level directories

gerlag
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 01 Feb 2009, 11:56
Location: Netherlands
Contact:

recursively creating thumbnails multiple level directories

Post by gerlag »

Hi all
I uploaded a multiple level directory structure which should automatically be 'converted' into categories and sub(sub)categories with the function multiple add.
The category structure was made indeed, however, only the thumbnails of the 'main' category were created.
I had to go to the 'images' menu, and select each individual sub(sub)-category individually, to create the corresponding thumbnails of each directory.

I wonder if I've overseen an option somewhere for 'creating thumbnails recursively when adding multiple images'' ?
if it's not there, then I would suggest to add such an option as 'feature request'...
Cheers, Gerlag
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

Re: recursively creating thumbnails multiple level directories

Post by caro84g »

Hi,

in multiple add, if you tick the folder instead of the images, then phoca should create categories and subcategories according to those folders. If you upload new images or remove images from those folders on the disk and with 'multiple add' you tick the folders again, then Phoca detects the changes and creates or removes thumbnails (and categories) according to this.

regards, Carolien
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
gerlag
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 01 Feb 2009, 11:56
Location: Netherlands
Contact:

Re: recursively creating thumbnails multiple level directories

Post by gerlag »

Hallo Carolien,

bedankt voor je antwoord!

I tried what you told me to do. (did it before however, now I tried to figure out how the multiple add function behaves in detail)
  • Images/ subcategories are added recursively first time ticking folder in multiple add. So that would be OK, however,
  • Thumbnails are NOT added...
  • Adding an image afterwards in folder and redo => image is added, however no thumbnail is added
  • deleting an image afterwards in folder and redo => image is NOT deleted, message" Bestandsnaam bestaat niet of bevat fouten" ("file name doesn't exist or has errors")
  • It appears that spaces in directory name causes strange behavior. In stead of stepping down in the tree, it goes back to the root of the gallery. This sooms fairly unhandy ot me, as pictures and directories are often coming from others and can be named with spaces in the name or directory.
I would suggest that a kind of a one click general 'cleaning up function' which adds missing thumbnails and deletes images which aren't there anymore would be very helpful for gallery maintenance.
Cheers, Gerlag
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

Re: recursively creating thumbnails multiple level directories

Post by caro84g »

Hi,

What do you mean with 'thumbnails' are not added? (if you mean that they're not created - do you have thumbnails creation enabled?)

Spaces stuff: some servers handle them better then others - that's why in the documentation it's advised to have good image names, see: https://www.phoca.cz/documents/2-phoca-g ... categories

About deletion of images: I wasn't really sure about this behaviour. So those you have to remove from the gallery first and then you can delete the originals.

Regards, Carolien
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
gerlag
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 01 Feb 2009, 11:56
Location: Netherlands
Contact:

Re: recursively creating thumbnails multiple level directories

Post by gerlag »

Hi Carolien,

Thanks for your reply.

I indeed meant that the thumbnails themselves are not created at all.

I did another verification test at another server, same software version.

I ftp-ed a root directory "02-03", with 14 images in its root and all 324 other images in subdirectories within that root.
Then I did “multiple add” by ticking “02-03”, save, and (almost) immediately thumbnail generation started: 1 of 338, 2 of 338, etc .
However, the generation stopped unexpectedly at image #14.
The images screen came up with the information message in top: "14 Categorieën toegevoegd, 338 Afbeeldingen toegevoegd" ("added 14 categories, added 338 images").

The resulting album can be seen at: http://test.vkij.nl/fotos/category/38-02_03.html
My conclusion: images in root category are thumbnailed, however, images in subcategories aren't.

Regarding the issue of removing images:
In the case of large albums, it's quite difficult (maybe virtually impossible) to manually synchronize database and actual files as you suggest. Usually, for maintenance, images are added/deleted in Phocagallery, so one could 'wish' that a the actual files of images which are deleted in in the Phoca Gallery Panel are deleted 'as file' too. That keeps database and files synchronized.
Maybe such an ‘autosychronisation’ could be chosen as an option in de main settings. I'll put it in the new Phoca Gallery Feedback Forum as a suggested feature.

Regarding the issue of using the proper filename convention:
It's quite unpractical to scan large albums for the proper file name convention. I assume 'repairing' wrong filenames could be done at the fly during thumbnail creation by Phoca Gallery itself. I'll put a feature request too in the new Phoca Gallery Feedback Forum.
Cheers, Gerlag
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

Re: recursively creating thumbnails multiple level directories

Post by caro84g »

Hi Gerlag,

as far as the image thumbnails creation, what happens when you remove image 14 and then try to add them all?
What happens if you go to your backend and try to show the images, it'll be creating thumbs again (please enable thumbnails creation in the parameters)

When you have a 'corrupted' image, then the whole thumbnails creation process stops. See for problem with thumbnails creation: https://www.phoca.cz/documents/2-phoca-g ... s-creation

Regards, Carolien
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
gerlag
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 01 Feb 2009, 11:56
Location: Netherlands
Contact:

Re: recursively creating thumbnails multiple level directories

Post by gerlag »

Hi Carolien,

sorry, it was not 14, but 10 images in the root of of the directory structure.
I folowed your advice, see the results below.
  • I removed an image ( the file) and looked in the admin panel under images, category '02-03'. The image appeared to be still in the database, but is has indication 'file not present' in stead of a thumbnail. Is as could be expected.
  • I deleted this image from the database (ticked 'file not present'-image, did delete in images window)
  • Then, I went to multiple add, ticked folder '02-03' and did save.
  • No thumbnails creation, I was send back to the images window in cat '02-03'
  • Then, I added the file in root 'p2-03' again, using ftp
  • Then I did again multiple add for folder '02-03',
  • Now one thumbnail was being created, after creation I was send back to images window with green info message at the top "0 Categorieën toegevoegd, 1 Afbeeldingen toegevoegd" ('added 0 categories, added 1 image')
So still no recursive thumbnail generation for the deeper folders.

Thumbnail creation in deeper folders is however manually possible, but that's not automatically recursive.
(For doing that, one has to choose all subcategories (subfolders), one at a time, in the images window. In that case thumbnails are being created for each individual subcategory, for the chosen subcategory only. So NOT recursively)

That's a lot of work in the case a large gallery with lots of sub(sub)directories should be added.
Cheers, Gerlag
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

Re: recursively creating thumbnails multiple level directories

Post by caro84g »

Hi Gerlag,

It should work that way, I mean: yesterday it worked for me. (I added a main category with 4 subcategories and those subcategories contained images)

a question: Are the images added to the categories? - so when you go to Phoca Gallery - Images (afbeeldingen), do you see them all with no thumbs? If that's true, then Phoca Gallery adds the images to the categories, but doesn't create the thumbnails.

Could you check your Phoca Gallery parameters (voorkeuren) if 'thumbnails creation' is still enabled? (it turns off when you manually abort the thumbnails creation, and it might turn off too when an error is occurred, but I'm not sure about the latter)

And it can be possible that you set 'pagination thumbnails creation' to yes. Then you have to go to your images tab and Phoca Gallery will create thumbs if you are on the page of those thumbnails. More info: https://www.phoca.cz/documents/2-phoca-g ... n_Settings

Regards, Carolien
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
Post Reply