Image Folder Paths

Louva-Deus

Joined: 2014-05-30
Posts: 2
Posted: Fri, 2014-05-30 04:32

I have two questions. I recently upgraded from Gallery 1 to Gallery 3 and now I am having some technical challenges that I need help with. The first major challenge is file path related and here are my questions regarding that:

The first is, how can I make Gallery 3 put the full size, resized, and thumb sized images all into the same album folder and be able to function properly that way (just like Gallery 2 did)?

Quote:
var/albums/album01/myimage.jpg
var/albums/album01/myimage.resized.jpg
var/albums/album01/myimage.thumb.jpg

Having them separated makes no sense to me, personally.

My second question is, how can I remove the 'albums' sub-folder from the file path?

Quote:
var_path/albums/album01 -> var_path/album01

Thanks in advance! I wanted to ask before I tried to hack the software to pieces myself trying to address these two issues.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-05-30 13:36

They are grouped into albums as that was a request from many G2 users and G1 users. They wanted the items stored hierarchically. It also allows for items with the same name to be in different albums.
It would not be a simple change to make and you are the first one that I can recall requesting this.
You could try:
FAQ: I want to move my /var directory
Then there is a couple of places in the items.php file that you will have to deal with to hack the software.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Louva-Deus

Joined: 2014-05-30
Posts: 2
Posted: Fri, 2014-05-30 14:00

Yes, I would have to be the oddball. But at least I get to be the first at something, maybe! :P

Could you explain why most people wanted a separate /albums/, /resizes/, and /thumbs/ folders? Is it just to have the same filename for each size?

What I have done so far is edit the items.php file to remove those folders from the path/url functions so now G3 reads from var/<albumname> which, at the moment, means there are no sized or thumbnails being used. My next step would be to make changes using a php replace function to add those old-styled names to it .sized.EXT and .thumb.EXT. The problem is that I think I need to change some other functions related to saving and generating those other sizes, but I can't figure out where to do that yet. Gallery 3 is completely different code-wise and quite confusing. :/

For that /var thing, do I just move the contents of my /var folder to another path and then update the index.php file?

Quote:
public_html/gallery3/var/<contents> -> public_html/images/gallery/<contents>

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-05-30 18:04
Quote:
Could you explain why most people wanted a separate /albums/, /resizes/, and /thumbs/ folders?

I think one of the reasons was to keep originals separate for backup or less confusion. I can't recall but I'm sure there is lots of reasons that people can chime in to tell you.

Quote:
Is it just to have the same filename for each size?

No, I'm sure there is a different reason for different users, just like you, you want to have it all the same for some reason.

Quote:
For that /var thing, do I just move the contents of my /var folder to another path and then update the index.php file?

No, there is some places in the items.php file that need updating to get the paths right to the images.
I have never tried to move the /var path myself I have just tried to assist others in doing so for their situation.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team