Multiple permissions for the same gallery

robb58

Joined: 2007-08-01
Posts: 7
Posted: Wed, 2010-06-09 14:15

Hi,

I'm a photographer and I'm toying with the idea of using gallery 2 as a proofing gallery. It seems to fit the bill quite nicely as it gives visitors the option to select favourites to compile list of images they want for an album, and the ability to purchase prints.
However, one snag I've come across is that if the clients want to let their friends and family look at the gallery, these visitors will have the same access rights. This means that if someone wants to compile a list of favourites for an album, their guests could merrily add their own favourite to the list, totally confusing the issue.
Is there anyway that separate permissions can be set for visitors to log in so they can view and purchase prints if they want to, but not add images to the favourites. Different permissions would allow the main client to see the same gallery but have the option to add to favourites.... if you know what I mean

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-06-10 02:32

you could edit te theme to only show the favorites link(s)
{if $user.isRegisteredUser}

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
robb58

Joined: 2007-08-01
Posts: 7
Posted: Thu, 2010-06-10 07:19

Its the favourite links that I only want the main user to see. Friends of the user should be able to view and purchase but not add to the main users list of favourites. I think I've cracked granting separate acces to other uses in the album permissions. Friends and families will have to log in under a different user name.

Is there any way of disabling aor enabling the favourites for individual users?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-06-10 09:10

Rewrite the favourites module to implement (and test for) a new permission.

 
robb58

Joined: 2007-08-01
Posts: 7
Posted: Thu, 2010-06-10 10:44
alecmyers wrote:
Rewrite the favourites module to implement (and test for) a new permission.

sounds like an interesting idea... how would the coding for that look?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-06-10 12:59

You can learn how it would look by examining the code for some other modules that create, set and test their own permissions and seeing how they do it.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-06-10 13:11

There could be an easier way of doing this using virtual Tag albums.

You have a wedding album for the Smiths. Each image/subalbum is tagged "smith". Smiths have view/order prints/favorite privis for that album.
BUT they can sent friends/family a link to the g2_view=tags.VirtualAlbum&g2_tagName=smith and Guests have view/order prints privis for that virtual album.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-06-10 13:35
Quote:
and Guests have view/order prints privis for that virtual album.

G2 has the dynamic albums mechanism - but if that's the way that albums of tagged images are shown, remember that you can't set permissions on a dynamic album.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-06-10 13:47

The image permissions are intact in a dynamic album.
Doesn't the order prints link present in dynamic albums.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-06-10 14:04

You can set permissions on individual pictures, sure. But (to be clear) you suggested "Guests have view/order prints privis for that virtual album" - whereas you can only set permissions on an individual picture basis. You can't set permissions on a virtual album. I'm sure you knew that, but it wasn't entirely clear the way you worded it.

As for ordering prints in a dynamic album. Speaking only for the checkout module (I don't know about zencart or the core cart module) the option to buy a complete album is presented as an itemaction for that album. I'm not sure how or whether itemaction lists for the album are presented inside a dynamic album, someone would have to check. I suspect that they're not, since the dynamic album doesn't have its own itemId which is necessary within module code to decide which itemActions should apply to the item (i.e. test if it canContainItems or not) (*). So I suspect there's never a link generated to purchase a dynamic album. That's just as well as because of the lack of itemId such a link couldn't work.

None of which affects purchasing real items displayed *within* a dynamic album, which works as normal.

(*) I can't think of any itemActions that would make any sense within a dynamic album - for instance, how would you "Add Item" or "Move Album" inside a dynamic album?