Allow People to Add a Sub Album but not add pictures

vividnewmedia

Joined: 2011-09-21
Posts: 6
Posted: Thu, 2011-10-13 19:55

Hi There,

Making a community website, want to allow new registered users to create a sub album but not be able to add photos to this top level album.

Once they have created their own album they can then add photos to this.

When i set permission for add sub item no link is in the top level folder to add an album?

Only when set permission to add items dose add photo link come up which then means they can add an album as such, seems a pretty long winded way to add a sub album??

Thanks

Craig

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-10-13 20:17
 
vividnewmedia

Joined: 2011-09-21
Posts: 6
Posted: Thu, 2011-10-13 20:41

Dosnt solve problem.

I have 5 top level albums for different sections.

Want people to be able to create a sub album in anyone of the 5 but not add photos.

Above useralbum means the system dictates where album is not user.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Thu, 2011-10-13 20:59

Create five clones of the useralbum module (with different names) and set each one up to create a sub album in each of your five main albums.

--
dakanji.com

 
vividnewmedia

Joined: 2011-09-21
Posts: 6
Posted: Thu, 2011-10-13 21:24

That means that for every user even if they have nothing to do with that section they will have an empty album??

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Thu, 2011-10-13 22:09

You have not given clear information about the setup you are trying to achieve and what the parameters are and we are simply guessing at it. A bit of a case of the XY Problem.

The follow on comments/questions show you are looking for an unusual and non standard setup that was not clear from the original query.
Nevertheless, the answer is that useralbum module handles user album creation and management. You will then need to amend the code to suit your particular needs.
Not an impossible task.

--
dakanji.com

 
vividnewmedia

Joined: 2011-09-21
Posts: 6
Posted: Fri, 2011-10-14 08:24

SOLVED Simply.

1) For top level album go to permissions

2) Add permission --> Registered Users --> Core Add Sub Album ( nothing else)

3) goto source code for theme album.tpl

4) add code

**********
{if isset($theme.permissions.core_addAlbumItem)}
<p><a href="{g->url arg1="view=core.ItemAdmin" arg2="subView=core.ItemAddAlbum" arg3="itemId=`$theme.item.id`"}">Add an Album</a></p>
{/if}
**********

5) Upload

Jobs a good'n

Thanks for help!

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Fri, 2011-10-14 14:34

Unfortunately, it is not as simple as that.

The sub albums will inherit the parent album's permissions and since you have not allowed registered users to add photos to the parent, they will not be able to add photos to the sub albums.

You, as admin, will be able to add photos and will not notice this limitation unless you log in as an ordinary user.

However, you are close and now need to write up a small module that will listen for album creation events in those main albums and then grant users permission to add photos to the sub albums and perhaps remove permissions to create further sub albums under these.

--
dakanji.com