Way to make Group A not see Group B album (instead of seeing "Private")? Way to make Group A not see Group B album (instead of seeing "Private")?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Way to make Group A not see Group B album (instead of seeing "Private")?

Started by super_kev, January 15, 2005, 12:35:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

super_kev

Hey guys,
Just picked up Coppermine this morning (after searching the web for 5-6 hours yesterday for a solution) set it up, customized it, and tested it.  This will be used as a client login to select/view pictures, so ideally I would like to be able to create a user account with log/pass, and have a private user album.  But that's not possible right now (maybe version 1.4? :)) so I created a group album, and assigned a user to that group, marked the albums private, and it works fine.  More work to set up though.  

So, I have a question.  I searched for this using many different terms and keywords and haven't come across anything that could help...

When I log in with one user (Group A, I created two user accounts assigned to their own group and album to test) I can see the other user's (Group B) album, even though there's a "Private" stamp on it.  Is there a way that I can modify CM so the logged in user doesn't see the other user's albums?  Because when this gets up and running, I don't want to make user A scroll through pages of albums just to find the one that doesn't say "Private".  I'm hoping this feature will be supported in 1.4, so that's why I've started to use CM and customize it.  But until then, is there some code that will let me do this?

Thanks,
super_kev

kegobeer

QuoteI would like to be able to create a user account with log/pass, and have a private user album.  But that's not possible right now

Huh?  Of course Coppermine can do that.  It's one of the key design features.  You should read the documentation.  Each user has a private gallery, and can create any number of albums within that gallery.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

super_kev

kegobeer,
From what I've been able to see (and I've worked on this all afternoon) I can create a new user and let them have a private album (even without assigning them to a group, you're right), but I don't want the other users to be able to see that the album is even there.  I've attached a screenshot so you'll know what I'm saying.

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.snowcrest.net%2Fmsent%2Fcoppermine.jpg&hash=e2aec69f379f0d397b31331199f7c04adfd539a3)


I don't want the user to be able to see Bubba's album, which is private.  I just want him (Webstrer) to be able to see his album (also private, but visible right now since he's logged in) and his album only.  If I have... oh, say 50 private albums, I want the client to be able to log in, and boom, there's his album of pictures, and make it so he doesn't have to go through pages of albums (and I know I can change how many are on a page) marked private until he gets to one that he can access, as that would be frustrating.  So far, I have not found anything in the docs which would tell me how to do this.  

Thanks,
super_kev

super_kev

After more searching, reading, and using coppermine, here is some more explaination of what I'm looking for...

Ideally I would need some code that says (and forgive me, I no experience coding PHP, but it's what I'd code if I knew how):

Look at logged_user
If <false> user album is private
Then visiblity for album is <true>
If <true> user album is private
Then visiblity for album is <false>

If that didn't make sense, I want it to look at the logged in user, and then check the albums.  If they are private and don't belong to the logged in user, then don't display them (that way the user can still see public albums, if I were to ever do that).

  The docs mention how to send the user directly to his private album once he logs in, but I will be creating the albums and users from my admin account, and I see that when I create an album from the admin account, it's my (admin) album, and I can't assign it to another user to be his private album.  So even if I do the send directly to private album hack, it won't work, since the albums were created by the admin.

 So I need to be able to assign an album that I created (in my admin account, as I removed upload and album creating privys for users) to a specific user.  I would be glad and try to code this option into the admin account (along with the crude code I typed above) except I have no experience other than a few hacks and creating a theme.  If someone could point me in the right direction (or code it, as that would be faster me trying to learn it/code it/troubleshoot it, although I'll be glad to do if no one else can, since I need these options) I'd appreciate it.  :)

Thanks,
super_kev

Nibbler

Have you tried disabling the option 'Show private album Icon to unlogged user' in config ?

super_kev

I tried it and it hides the other user's private album.  ;D  Thanks man, I don't know how I missed seeing that in the config.  :-[

However, I will still say that it would be nice to be able to create an album in the admin account and assign it to a user.  Otherwise, the way I was doing it (not any more, workaround below) is creating an album, assigning it to a custom group, and then creating a user and assigning him to that custom group.  I'd would have given the user account (registered users) privys to create and upload an album (so that the album is created by the user and not the admin) but if I have users browsing the forum at the time I'm doing that, then they might see that "Hey, for some reason we can now create and album and upload pics" and then I'd have that chance of someone doing that when I'm creating a new album within a user, until I can reset things.  

For a workaround, I've created a group that I assign new users to, and that gives them (me) creating privys so I can then sign into their account, create the album, and then come back to the admin account and change their group to the standard registered, where they can't create an album or upload pics.  More work, but at least I can get the gallery up and running now.  :)