Just started working with G2, and have been looking into creating a module.
I want the module to add some permissions (everyone group - core.viewAll) to an image/album, by clicking a link (in the sidebar or under image). Is there a module like this that anyone knows of?
I currently am using useralbum (with edited default permissions) to set permissions so only the user who created/uploaded an album/image can see them.
However I need the option to allow certain images/albums to be viewed by everyone, chosen by the user, so it needs to be in a link.
I've been working with a few modules (tutorial module, jensperms, ItemPermissions.inc) but am not getting very far.
I'm having trouble getting the image/album id to be passed into the module, I just can't seem to get it.
Every time I run the module I get the following error:
Error (ERROR_PERMISSION_DENIED) : user id: 6 doesn't have permission: core.addDataItem for item id:
* in modules/core/classes/helpers/GalleryUserHelper_simple.class at line 47 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 477 (GalleryUserHelper_simple::assertHasItemPermission)
* in modules/publiclink/MyPage.inc at line 51 (GalleryCoreApi::assertHasItemPermission)
* in main.php at line 231 (MyPageController::handleRequest)
* in main.php at line 94
* in main.php at line 83
From what I can see it doesn't seem to be passing the itemId correctly.
I'm trying to access itemId with
I'm simply running the module by typing the url http://www.example.com/main.php?g2_view=publiclink.MyPage
I'm logged in as admin.
Unfortunately I can't give the URL for the gallery2 install, heres the sys info.
Gallery version 2.2.2
PHP version 5.2.1 apache2handler
Webserver Apache/2.2.3 (Ubuntu) DAV/2 SVN/1.4.3 PHP/5.2.1
Database mysqli 5.0.38-Ubuntu_0ubuntu1-log
Toolkits ImageMagick, Thumbnail, Gd
Operating system Linux <boxname> 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686
Browser Mozilla/5.0 (X11; U; Linux i686; en-US; rv:220.127.116.11) Gecko/20061201 Firefox/18.104.22.168 (Ubuntu-feisty)
I've searched for adays through the forum and can't find anything (easy enough for me to understand).
I can give more info if needed.
Any help would be greatly appreciated.