Category and thumbs placement?

Phoca Gallery - image gallery extension
User avatar
akerman
Phoca Member
Phoca Member
Posts: 42
Joined: 07 Jul 2008, 18:42
Location: Sweden - Stockholm
Contact:

Category and thumbs placement?

Post by akerman »

Hi,

If I understand the instructions and FAQ ....and forum correctly, I should be able to do the following:

Directory structure already in place under /images/phocagallery/.. :
Originals
......People
............image1.jpg

Resized_Images

......People
...........thumbs
...............thumb_l_image1.jpg

1. I create a Category called 'People and attach a folder to it called 'Resized_Images/People
2. I upload images to the directory 'Originals/People'
3. I save these images/connect them, to the Category created unde #1 above.

The result should be that the originally uploaded images are still in the upload folder and that the thumbnails created (large, med, sml) are all created in the category connected folder as set under #1 above.

But this does not happen! Instead the thumbs are ALWAYS created in the upload directory.

I've spent some hours reading and testing. Hopefully it's something I'm missing. Right?

-----------------------------------------------------------------------------------------------------------------------
Alternatively,

if above is not possible and the original image ALWAYS is parallel to the 'thumb' path, is it inside the 'helpers' that I change this? (Any other place?)

You see Jan, I think there's an opportunity here to actually secure the original file (without watermark) and leave the others (watermarked) unprotected. (Because I think I've found a way by means of '.htaccess' and Apache2 module 'mod_rewrite' to make this work.) but I can't do that as long as the original is nested inside/parallel with thumbs. This shouldn't have a big impact on the component, just that the thumb is not created alongside the original, and that the user has to create a directory structure under the gallery path before upload.

The final effect of this added Apache2 security is that when a user actually clicks the Download icon, he/she is presented with a question to give a userid/password. (This is something that can be set per category or per category tree... :wink: ) Administrator can either inform the users via email about these credentials or it can be handed out inside the category (in ex. the description), as long as normal visitors outside access to the category can't see the credentials, this should be sufficient for most installations.

I'd be happy to write a proper tutorial for this if it works.

(Sorry for writing so much, but hopefully this info is beneficent for others, as always in a forum... :) )

Regards
Akerman
http://www.AkermansCove.com - CMS Addons! & Royalty Free Images
http://www.InfoClip.se - Swedish site for Practical knowledge.
Ubuntu LAMP / Joomla 1.5.8 / VM 1.1.2 Stable / JoomFish / Mosets Tree
/ Joomsuite / Phoca / JoomGallery /
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category and thumbs placement?

Post by Jan »

Hi the sctructure is not so easy ... maybe it is better to say it is very difficult...

Multiple Add - mutliple add function is there because of very fast adding of images into the gallery and very fast updating of e.g. new added images...

Example:
I have a folder structure on my PC

[CATEGORY1]
- image1.jpg
[SUBCATEGORY1]
- image11.jpg
[CATEGORY2]
- image2.jpg

If I upload the folder structure to phoca gallery folder on the server and go to multiple add, select category1 and category2 folder, then click on SAVE, Phoca gallery will add categories and images into the database (only filenames, not the images), so this structure will be created:

[CATEGORY1]
- image1.jpg
[SUBCATEGORY1]
- image11.jpg
[CATEGORY2]
- image2.jpg

into DATABASE and this on the server:

[CATEGORY1]
- image1.jpg
- [THUMBS]
- 3 thumbnails of image1.jpg
[SUBCATEGORY1]
- image11.jpg
- [THUMBS]
- 3 thumbnails of image11.jpg
[CATEGORY2]
- image2.jpg
- [THUMBS]
- 3 thumbnails of image2.jpg

Such structure is needed, because you can have e.g. the same image in both categories and e.g. for category 1, you have size: 640x480 (large thumbnail) and for category 2 (724x1024)... it is a little bit difficult, because Phoca Gallery try to use only one thumbnail for images which are saved in more categories ( if you have thumbnail size allways the same, all images will use only one thumbnail) ... Then Phoca Gallery needs to know if the thumbnail is created, becasue it still tests if there is a thumbnail for the image, so it needs to have thumbs folder for every folder (category)

But so are the images added with help of multiple add, but you can then move the images, change the categories, etc... if the image e.g. will be added into other category, it will have still the old thumbnail (to prevent from creating thumbnails by every change)... if e.g. the thumbnails will be deleted (by user e.g. in ftp mode), Phoca Gallery will get this change and will do the thumbnails on other or on the same place (it depends on the current image location - in which category is the image saved)...
Folders and Categories are independed eachother, folder "ABC" don't need to be joined with category "ABC"... so as I said it is not so easy, the main idea is to separate "folder structure" - server area from "category structure" - database area....

Jan
If you find Phoca extensions useful, please support the project
User avatar
akerman
Phoca Member
Phoca Member
Posts: 42
Joined: 07 Jul 2008, 18:42
Location: Sweden - Stockholm
Contact:

Re: Category and thumbs placement?

Post by akerman »

Hi,

oh, OK I see.

For most installations/usage of PG I think that structure works well/is great, and is as it should be.
However, for my part, this will create an issue since I'm striving to get functionality for serving subscribers with images based on a category structure. (Different rights/access per category/resolution and such).

Still, thanks Jan for the detailed information. It really aids in my decision making.

Regards
Akerman
http://www.AkermansCove.com - CMS Addons! & Royalty Free Images
http://www.InfoClip.se - Swedish site for Practical knowledge.
Ubuntu LAMP / Joomla 1.5.8 / VM 1.1.2 Stable / JoomFish / Mosets Tree
/ Joomsuite / Phoca / JoomGallery /
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category and thumbs placement?

Post by Jan »

:wink:
If you find Phoca extensions useful, please support the project
Post Reply