Allow moderators to create subgalleries
lewmich - June 30, 2008 - 07:15
| Project: | Image Gallery Access |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
It would be really helpfull if we can allow gallery's moderator to create subgalleries in his gallery. I haven't found possibility to do that yet.

#1
Yes, indeed, that's a nice idea! I'd like to have that feature, too.
#2
Hello Salvis,
YES, it would be great that with admin gallery unchecked for authenticated user, only galery moderate could create some subgalleries.
Is it possible ?
(i'm not develloper)
Vincent
#3
There are several problems:
-- Can moderators set IGA controls? I don't think so — the IGA settings would have to be taken over from the parent gallery.
-- Can moderators edit the other settings of their gallery? I don't think so, they could rename their gallery to something completely different and change its intended purpose.
-- But there are some fields that need to be filled in when defining a new gallery. Fill in, yes, but edit, no — is that a viable strategy?
-- Moderators generally don't have access to anything under admin. How could we make this functionality available, i.e. where can we place what link?
This is unlikely to happen for D5 anymore.
#4
Thanks Salvis for your answer...
- Of course no IGA controls
- For a photo share gallery moderators create and edit their gallery (but not edit permission on the root gallery the administrator gave them)
- There is only name, description and weight for a new gallery... all these fields could be fill in and editable for the moderators... i d'ont see problems here...
- About the permission to add a new term in the gallery taxonomy tree : it is possible without taxonomy admin like we do with IGA (but i don't know HOW !!) We could put the link either in image node creation form (after gallery list) or in the menu ?
It's great to discuss about that,
Thanks again,
Vincent
#5
That is difficult. A user either is moderator in any given gallery or not. We'd have to check whether he's also moderator in the parent gallery. I'm not sure it's worth the trouble to allow editing existing subgallery settings. Again, if we do, where can we put the 'edit gallery' link? It would have to go on the gallery page, but I have doubts whether that is possible with the Views version of the galleries...
Adding a new term is certainly possible, but we need a way to select the parent, i.e. it must be a link lik 'add sub-gallery' on a page where we know the parent gallery. We cannot let the user select the parent from a selection list, because we cannot reduce the selection list to just those galleries where he's moderator, without the selection list falling apart.
So, again, we'd have to put a link on the gallery page...
#6
For doing this on views:
/**
* This hook is called at the very beginning of views processing,
* before anything is done.
*
* Adding output to the view cam be accomplished by placing text on
* $view->attachment_before and $view->attachment_after
*/
function hook_views_pre_view(&$view, &$display_id, &$args) {
// example code here
}
#7
Ah, great, thanks joachim!