Images storage and actual paths display?
jpavly
Joined: 2009-09-20
Posts: 7 |
Posted: Sun, 2009-09-20 14:02 |
Hi there, Q1: Images I upload are stored in subfolders of the top album folder I have defined and not on the database, right? I really need the 2nd one, so that just in the case that something happens to my gallery, the paths of the images do not depend to Gallery2 and my hotlinks will still work. Thanks for your help. |
|
Posts: 27300
Q1: right. They are stored in hierarchical format in the /g2dat/albums direcotry.
Q2: Where do you want this info? there is a permalink module that might be what you are after.
There is a few threads about getting the path to the item and there is a 'download' module as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 7
Hi Dave, thanks for your reply. What we need is a gallery for our forums, so we can host our pics and then BBcode them to threads.
I have installed the Geturls plugin, but the paths that I can get even with URL rewrite are not the actual ones. If you know a way I can configure it that way, please point me to the right direction.
Thanks
Giannis
Posts: 27300
They should be unless you rename the item/album.
What do you mean by 'are not the actual ones'?
Got an example?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 7
Hi Dave,
I can give you this example:
I have installed Gallery2 at the path www.mydomain.com/gallery2 and configured it to use the folder www.mydomain.com/gallery2/hosting for uploads.
Then, I create a new album with the name "news", so Gallery2 makes a new dir "albums" and inside it the folder "news", so we now have www.mydomain.com/gallery2/hosting/albums/news.
When I upload a new picture, it is written in that folder, i.e. www.mydomain.com/gallery2/hosting/albums/news/image001.jpg
When I need the path, Gallery2 gives me a path like http://www.mydomain.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=1328&g2_serialNumber=3
If I install and configure URL Rewrite, all I can get is http://www.mydomain.com/gallery2/d/23-9/image001.jpg but what I really want is to get www.mydomain.com/gallery2/hosting/albums/news/image001.jpg, which is the actual path of the file.
I hope you can understand the situation now.
Thanks
Giannis
Posts: 27300
I don't know how you can't do that. G2 serves image through an image firewall. Where you placed the g2data direcotry is not in our recommended location.
It needs to go below the webroot.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 16504
Yeah, that setup will break G2. You can't manually create directories for albums, nor upload files into the same directories G2 uses for g2data.
Dave, I think you mean above webroot, right?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 7
Hi again and thanks for your replies.
I do understand the reasons that gallery2 works that way, but all I really want is an php image viewer more than a gallery.
It seems to me that Gallery2 won't work for me, since what I'm looking for is something simpler than that. It's a great product though.
Thanks for you time guys
Take care,
Giannis
Posts: 27300
nivekiam, right.
jpavly, a simple php image viewer is not what G2 is. There are lots of other simpler products out there.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 7
Thanks for your replies guys. What I need is not a simple php image viewer, I have tried at least 20 the past few days.
What I need is:
1) Multi user environment with custom permissions. I want my team to be able to upload pics, but not delete them.
2) Absolute path images, so that in any case of problems the image links won't break
3) Subfolder creation per album, i.e. gallery/reviews/graphics and gallery/reviews/photos
Maybe Gallery1 can do these things?
Posts: 16504
You can't do this in G2 (or G3 or G1). The person who uploads the files is the owner and has full permission on that item. We don't have explicit deny permissions in Gallery like you have in NTFS if dealing with windows file permissions. You can give people the ability to delete, but you can't block the ability if they own or have that ability. Permission systems are an extremely complex problem, that's why in G3 we've simplified stuff.
WAIT. I just tested in G3. I don't know if this is going to be the final behavior or if something is broken, but you can give someone Add permissions and Edit permissions. If they only have Add permission they can't delete. I some how have a feeling that behavior may change, but we'll see. I just fired off a question asking about this behavior.
2) Easy, check out the URL Rewrite plugin. One thing to note, if you're looking for links to the actual image itself and plan on upgrading to G3 later, I'm not sure those will be preserved or what the plan is there.
3) Not a problem
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 7
That's nice. I will check Gallery3 later today maybe.
Is URL Rewrite plugin supported at G3?
Thanks a lot
Posts: 16504
Yes, it's just a manual edit you need to do in the .htaccess that ships with G3 to enable that.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 7
Hi, just wanted to inform you that after I tested G3 it worked exactly as I wanted out of the box!
Thanks for your help guys.