User permission questions
toejamm10
Joined: 2003-11-11
Posts: 1 |
![]() |
Let me first off say this is a nice app. Questions: 1) Is there a way for a user (non Admin) to log in and when they choose to change the permissions to their albums I can disable them to view other members login names? I don't want a user to see the list of all the other users (i.e NOBODY, EVERYBODY ...etc) If so, how? (I believe I have exhausted my search on this forum) 2) Is there a way for a user (non Admin) to log in and when they choose their albums I can limit the choices under the drop down <Admin Options> so lets say I can disable users to choose "poll properties" and/or "poll results" and/or "poll reset"? If so, how? (I believe I have exhausted my search on this forum) If there is a way to do both of these I'd be happy with a global option for all users, well except for Admin of course :D Thanks Running v1.4.1-cvs-b215 on RH 9 |
|
joan
![]()
Joined: 2002-10-21
Posts: 3473 |
![]() |
Moving to customization forum |
|
iwantmyphoto
Joined: 2003-11-05
Posts: 98 |
![]() |
this is exactly what im looking for too. . |
|
newtech
Joined: 2004-08-13
Posts: 83 |
![]() |
I need the same customization as listed in the first message. There never was a reply to the post. Any body have the answer? |
|
newtech
Joined: 2004-08-13
Posts: 83 |
![]() |
Still need an answer on this |
|
giorgos
![]()
Joined: 2002-08-19
Posts: 115 |
![]() |
Also there are users that allow (by mistake or not) everybody to add/delete albums, add/delete photos etc. under their own album. Thanks in advance Giorgos |
|
brocaa
Joined: 2004-05-06
Posts: 39 |
![]() |
OK, I think I've understood what you are looking for. What I have done at http://www.moopics.com is to limit the permission choices to everybody and nobody by changing the code in the album_permissions.php file to the following <?php if ($gallery->user->isAdmin) { ?> <?php } ?> This way the admin can see all the users and the users can only see everybody and nobody. I also set up the albums so that the permission options are limited to "who can see the album" "who can view full images", "add comments" and "view comments" I saw a gallery site ages ago where you could search for a user but it wasn't integrated into the permissions and I'm currently working on a way to do this now - although I dont know if you can already do it in G2 In answer to the 2nd part essentially you need to do the same thing for the options, either delete the lines of code for the option that you dont want or more it to the section that starts if ($gallery->user->isAdmin) Hope this helps |
|
giorgos
![]()
Joined: 2002-08-19
Posts: 115 |
![]() |
brocaa, Thanks you for your quick reply. I've checked moopics.com and the permissions modifications looks really nice. For the moment I don’t care that users can see all users ( I think I should wait for the user search solution). What I want is the permission options to be limited to "who can see the album" "who can view full images", "add comments" and "view comments". But I couldn't make it work. You said: Quote:
I also set up the albums so that the permission options are limited to "who can see the album" "who can view full images", "add comments" and "view comments" How did you do that? Thanks ps I saw your portfolio. I will send you a PM regarding a project |
|
brocaa
Joined: 2004-05-06
Posts: 39 |
![]() |
Essentially to limit the options I set the gallery up so that when someone registers it creates them a new album and when they login they are taken directly to this album (there's a couple of posts on the forum as to how to do this but I cant find them right now - from memory there was a post about how to create a new album when someone registers and another post about how to direct someone to their album when they login) I then changed the default permissions in classes\album.php to get the desired result Hope this helps Aaron |
|
giorgos
![]()
Joined: 2002-08-19
Posts: 115 |
![]() |
Aaron, Thanks for your help. I will check the posts you mention. Regards |
|
brocaa
Joined: 2004-05-06
Posts: 39 |
![]() |
sorry - think I've confused you In the classes\album.php file you set the default permissions for the album, eg if all users can see the album or if access is limited to logged in users only. In album_permissions.php you need to adjust the code to give the specific form options that people can choose from. I'll be back at my desk tonight and will post a modded copy of the code here for the album_permissions.php for you |
|
brocaa
Joined: 2004-05-06
Posts: 39 |
![]() |
Here's the copy of the modded album_permissions.php file <?php if (!isset($GALLERY_BASEDIR)) { require(dirname(__FILE__) . '/init.php'); // Hack check if (isset($allUid) && isset($submit_text) && strchr($submit_text, ">")) { if (isset($allUid) && isset($submit_add) && strchr($submit_add, ">")) { if (isset($allUid) && isset($submit_write) && strchr($submit_write, ">")) { if (isset($allUid) && isset($submit_delete) && strchr($submit_delete, ">")) { if (isset($allUid) && isset($submit_createSub) && strchr($submit_createSub, ">")) { if (isset($allUid) && isset($submit_viewFullImages) && strchr($submit_viewFullImages, ">")) { if (isset($allUid) && isset($submit_addComments) && strchr($submit_addComments, ">")) { if (isset($allUid) && isset($submit_viewComments) && strchr($submit_viewComments, ">")) { if ( isset($save) && $ownerUid) { if ($changed) { // Start with a default owner of nobody -- if there is an $uRead = $gallery->album->getPermUids("canRead"); foreach ($gallery->userDB->getUidList() as $uid) { $owner = $gallery->album->getOwner(); asort($uRead); correctPseudoUsers($uRead, $ownerUid); ?> <center> echo makeFormIntro("album_permissions.php", <?php if ($gallery->user->isAdmin) { ?> <table border="0" cellspacing="0" cellpadding="0" width="90%"> </td> <td>& </td> <td valign=top> <tr> </td> <tr> <tr> </table> <input type="submit" name="save" value="<?php echo _("Save") ?>"> </div> |
|
giorgos
![]()
Joined: 2002-08-19
Posts: 115 |
![]() |
Aaron, Thanks a lot. Works perfect. Only tiny modification I would like to see is that owner of the album could see the buttons EVERYBODY and NOBODY but also the user list as he could decide to give access to specific users. regards |
|
brocaa
Joined: 2004-05-06
Posts: 39 |
![]() |
HI Surely that's what you had in the original list? Or am I completely miss understanding you |
|
giorgos
![]()
Joined: 2002-08-19
Posts: 115 |
![]() |
Maybe I mess it up a bit. lets explain with a screenshot Your modified permissions for the admin looks like this [img]http://www.dailyalbum.com/admin.jpg[/img] and for the owner like this [img]http://www.dailyalbum.com/user.jpg[/img] I would like that the album owner can see the same as the admin plus the NOBODY and EVERYBODY buttons above the users list. should look like this [img]http://www.dailyalbum.com/likethis.jpg[/img] I hope is more clear now. Thanks |
|
brocaa
Joined: 2004-05-06
Posts: 39 |
![]() |
Hi Are the options for nobody and everybody in your scroll list? It's quite easy to do what you want just change the following <!--AB Ammend --> for <input type="checkbox" name="allUid" value="everybody"> EVERYBODY</option><br> I think that should do the trick |
|
giorgos
![]()
Joined: 2002-08-19
Posts: 115 |
![]() |
Thank you very much. I test it a bit more tomorrow Regards |
|
MyWebsiteAdviser
Joined: 2007-04-12
Posts: 46 |
![]() |
Hi, There is detailed Gallery permission article, include how to set up Gallery permission video. Enjoy, |
|