add photos to album of friends

Hi there,

how do I change the code to enable friends adding photos to albums? Right now only admins can add photos to an album. But I want friends to add photos to my albums as well. Should be possible, right?

 

Cheers

  • I mean: Should be the same as the permission for group members to post photos to a group album - or am I wrong?

  • Have a look at the alternative hype-gallery plugin which supports this and is generally a very nice photo-plugin too.

  • Thanks Krischan! I would give it a try, but I have several plugins that depend on tidypics. And I am pretty happy with it, too. I think I have to find out, where the write permissions are set and change it to $friends or something.

  • Not easy - I'm not able to tell you what you would have to modify to get the uploading of images to friends working without some detailed code review - and I don't have the time to do that currently. Sorry.

    But it should be possible for sure. For example, the container_guid/entity is used to verify if a user is allowed to upload images to an album. The container entity of an album is either a user or group. You would need to modify this check to add also a check for friend relationships to allow for other users to add images to an album. But you would need to change more: "Upload photos to this album" button show up also for friends, "Upload photos" (album selection) to also show up friends's albums and you would also need to grand writing permissions for the album entities in the actions, modify the edit pages for images and albums. And I think there might also be other things to change that I miss right now...

  • Wow, sounds more complicated than I thought. My guess was I had to change $admin to $friends somewhere ;) Thank you again, iionly! I will have a closer look, maybe with success.

  • The admin user access level permissions is not something you can rely on here. Elgg core already allows an admin user to have read/write access to everything. A corresponding access level handling is not implemented for friends in core. The handling of content within groups is also slightly different. On the one hand, there are some additional restrictions possible (like no access for non-group members) but it also makes collaborative access handling easier to implement for group members.

    What I missed to mention is the existence of the permission plugin hooks available in Elgg core (this mechanism is also used in Tidypics for handling access / upload sharing on group albums). Adding an appropriate callback function to allow write access to albums for friends of a user might make the implementation slightly easier. Still, you would need to modify the views also for the upload buttons to show up for friends and maybe still modify other things.