Posted by jjjames on December 8, 2008 at 8:30am
I know it can be done, but I'm looking for the best way to achieve image galleries based on locations. Say I have 20 offices and I want a photo gallery for each office. Each office should be able to login and add photos only to their gallery. Each office's location should be visible on a map and have location info, and office details attached to it.
I have to give each office a unique login to manage their photos. Also, I would like to be able to see "All offices in CA" or "All offices in Zip Code 90210"
What's the best way to do this?
Thanks!
Comments
Office Node Gallery
There are probably many ways you could do this, but think I might do this:
Create an 'office' content type and enable location information storage on that type. These can be shown on a map, used like any content type with location info.
Install CCK image and create a content type for images (note - this solution will not use standard image content type and galleries). Install image_cache, etc. to get thumbnail/preview sizes of images uploaded generated by the system.
On your 'image' content type add a node reference field to reference fields of type 'office'. Make a view to limit the nodes that are valid and have that view only return office nodes that the current user created. Make this a mandatory, non-blank field.
Create another view that shows 'image' content types. Use the grid layout in views extras if you like. Use an argument that can be used to specify the reference node. Create a menu item (in a tab) on a path like 'node/$arg/gallery'. You might want to use the token and pathauto module to have office nodes appear on their own path rather than under 'node' so you can hide the menu item from other node types.
I might have missed a few steps, but you get the idea.
You might also want to create a user ref CCK field for 'office' fields and have that hold a list of users allowed to post in this office's gallery, and have the view in step 3. look at that user ref field rather than the 'office' node's creating user.
Hope this helps and gives you some ideas anyhow.