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?
Q2: Is there any way that I can get a link with the actual path of the images? i.e. www.mydomain.com/gallery2/albums/vacation/image01.jpg

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.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-09-20 17:25

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

 
jpavly

Joined: 2009-09-20
Posts: 7
Posted: Sun, 2009-09-20 21:24

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

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-09-20 23:39
Quote:
I have installed the Geturls plugin, but the paths that I can get even with URL rewrite are not the actual ones.

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

 
jpavly

Joined: 2009-09-20
Posts: 7
Posted: Mon, 2009-09-21 08:52

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

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2009-09-21 13:23

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

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-09-21 19:24

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.

floridave wrote:
It needs to go below the webroot.

Dave, I think you mean above webroot, right?

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
jpavly

Joined: 2009-09-20
Posts: 7
Posted: Tue, 2009-09-22 09:01

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

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-09-22 13:32

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

 
jpavly

Joined: 2009-09-20
Posts: 7
Posted: Wed, 2009-09-23 09:49

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?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-09-23 12:35
Quote:
I want my team to be able to upload pics, but not delete them.

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

 
jpavly

Joined: 2009-09-20
Posts: 7
Posted: Wed, 2009-09-23 13:25

That's nice. I will check Gallery3 later today maybe.

Is URL Rewrite plugin supported at G3?

Thanks a lot

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-09-23 13:41

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

 
jpavly

Joined: 2009-09-20
Posts: 7
Posted: Thu, 2009-09-24 06:53

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.