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.
FEU, Custom Content & Gallery
Re: FEU, Custom Content & Gallery
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:
After calling this you would then get a directory/image list to use.
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}
~ Life is like water, every movement you make changes the way it flows ~
Re: FEU, Custom Content & Gallery
I will have a gallery directory for each group, and the rest exactly as you said.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:After calling this you would then get a directory/image list to use.Code: Select all
{assign var="userGroups" value=$ccuser->groups()} {Gallery dir=$userGroups.0}
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
So there's no one that know this stuff better than us, the newbies and could provide some help?
Re: FEU, Custom Content & Gallery
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!
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!
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: FEU, Custom Content & Gallery
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
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