Working with Buddylist

terripaajanen - August 5, 2008 - 18:07
Project:IMCE_Gallery
Version:5.x-1.x-dev
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I've been struggling with the ability to create user-specific photo galleries, and IMCE gallery is the only thing that seems to work for my needs. There are a few features missing, but I don't want to start over with a whole new module arrangement.

Is there any way to make this work with buddlyist, so that photos and/or galleries can be marked public, private OR buddies-only? I'm currently using private_node to add this function to most other content (works great) but since IMCE doesn't seem to create nodes, it doesn't work.

Can anyone share a way to add this functionality?

#1

sdsheridan - November 21, 2008 - 22:59

I've just done a lot of work on this module for my own needs. I've added to it significantly, so that now:

  1. Private galleries can be 'unlocked' on a per-other-user basis. There is a new section that appears on a user page entitled "Private Gallery Permissions" that lists the currently-logged-in user's private galleries with checkboxes and a submit button.
  2. Private galleries now have a "who can view" link beside them that takes the current user to a page showing all users that can view that gallery. Unchecking the checkbox beside a user name and clicking submit removes permission to see that gallery.
  3. Fixed a bug that permitted anyone to see a private gallery if they knew the gid (so so much for it really being private). Did this by creating a function to check permissions and putting it in the hook_menu.
  4. When viewing a user's gallery tab, you will only see public galleries and the private galleries to which you have been granted permission to see. Other private galleries of that user will not appear if you have not been given permission to see them.
  5. Photos can now have captions.
    • When adding a photo to a gallery, there is now a text area to specify a caption.
    • In the thumbnail view of a gallery, there are links to add/change the caption for a photo, as well as to remove that photo from that gallery, or move it to another gallery.
    • Also altered the javascript file so that the captions appear in the full-sized view under the photo.
  6. I created an imcegalleryapi, so that I could create a contrib module for the activity module to register imce_gallery activity.
  7. Did some code clean-up and commenting. Could use more, but I think it's better.

Now that I've written that all up, it doesn't seem like that much, but it was a fair bit of work. It required a new table as well as adding a 'caption' column to the imce_gallery_items table. I've attached an ERD. So I also updated the imce_gallery.install to do that.

Now, does anyone care? I've noticed that the latest dev version of this module is over a year old. I don't know if anyone but me is actually using it. But, just thought i'd ask... Wouldn't mind a review of my code as well. It seems to be working fine for me nonetheless.

shawn

AttachmentSize
ERD.jpg 32.87 KB

#2

Larus - November 27, 2008 - 06:03

sdsheridan,

I was looking for module for 5 drupal, where multiuser galleries are availible, and imce_gallery is one, which can do it.
But how can I see (as you) I'll need to write some code for adoptation for my needs, and it would be great if you post post your code of your imce_gallery here or mail it on sssimple {@} gmail.com

Thank a lot!

#3

sdsheridan - November 27, 2008 - 19:02

OK, well, check out the attached .zip, and start with the readme.txt file. If you want to see all the things I changed, I've found SourceGear's DiffMerge utility very helpful for that.

Let me know what you think. Note that this is not a patch, but rather the whole directory contents that would appear in /sites/all/modules/imce_gallery. The activity-contrib folder contents should be placed in /sites/all/modules/activity/contrib if you use that module.

If you want to see this on a production site, go to www.livingOUTthere.com/user/2/imce_gallery .

shawn

AttachmentSize
imce_gallery livingOUTthere.com version.zip 53.12 KB
 
 

Drupal is a registered trademark of Dries Buytaert.