Page 1 of 1

FEU, Custom Content & Gallery

Posted: Sat Aug 25, 2012 8:58 pm
by mskeet
Hello everybody.

What I need to do is as following: On a photography website, I need to upload the proofs for each client, for each photo session that that client has. Also, all these galleries should be only accessible with username/password.

I don't know how to approach this so it would work something in this way:

The page /clients should have the login form. After a user logs in, he/she should only see the albums that are corresponding to his/hers username. When an album is clicked to be redirected to a page that will show only that album. I was thinking to have a page for each album that client has.

Each client would be in a different group, so it would be easier to implement.

So if I would go with something like this:

{if
($ccuser->memberof('group1') && $page_alias=='group1-page') ||
($ccuser->memberof('group2') && $page_alias=='group2-page') ||
($ccuser->memberof('group3') && $page_alias=='group3-page') ||
($ccuser->memberof('group4') && $page_alias=='group4-page') ||
($ccuser->memberof('group5') && $page_alias=='group5-page')
}

what code should be here to show only let's say group3 if it's logged in?

{else} {FrontEndUsers nocaptcha="1"}
{else} {redirect_page page='error-page'}
{/if}


Thank you.

Re: FEU, Custom Content & Gallery

Posted: Mon Aug 27, 2012 9:59 pm
by mrenigma
Simplest answer would be to have a Gallery directory for each group and then have sub-dir for each album.

So when someone is logged in you can assign the group to a variable and then call the gallery, this is easier since you only have one group per person:

Code: Select all

{assign var="userGroups" value=$ccuser->groups()}
{Gallery dir=$userGroups.0}
After calling this you would then get a directory/image list to use.

Re: FEU, Custom Content & Gallery

Posted: Wed Aug 29, 2012 12:43 am
by mskeet
mrenigma wrote:Simplest answer would be to have a Gallery directory for each group and then have sub-dir for each album.

So when someone is logged in you can assign the group to a variable and then call the gallery, this is easier since you only have one group per person:

Code: Select all

{assign var="userGroups" value=$ccuser->groups()}
{Gallery dir=$userGroups.0}
After calling this you would then get a directory/image list to use.
I will have a gallery directory for each group, and the rest exactly as you said.

Everything makes sense for me as I read it.. it's just that I really don't know how to implement this. If there is somebody that knows this, I'd appreciate all the help.

Re: FEU, Custom Content & Gallery

Posted: Sun Oct 07, 2012 11:44 pm
by mskeet
So there's no one that know this stuff better than us, the newbies and could provide some help?

Re: FEU, Custom Content & Gallery

Posted: Mon Oct 08, 2012 12:47 am
by Jo Morg
Why not a directory for each client?
Wouldn't this be similar?
GBFilePicker: create dynamic folders on the fly
With a few changes it would create a directory for each user...
Just a thought!

Re: FEU, Custom Content & Gallery

Posted: Mon Oct 08, 2012 12:59 am
by mskeet
I'm not sure.. I'm no developer nor a programmer.
I can follow directions, but can't manage to write code from scratch.

How much would cost me to have this thing working in the way described before?

A page where the log in form is shown.
If the user logs in he/she can only view his/hers photo album/s.

Since for each user, will be a gallery folder I thought it would be easy.. for someone who know how to do it.

Thanks