Assign photos & videos posted to an individual user gallery. Is it possible ? To catch images & videos and create a view that displays them ?
Assign photos & videos posted to an individual user gallery. Is it possible ? To catch images & videos and create a view that displays them ?
Comments
Comment #1
Topcheese commentedWouldn't it be better to have it available as a group feature, then you could still build a list or something of an individuals contributions?
Comment #2
autolyst commentedI didn't want to start a new thread because I had been debating on this a bit for Commons use and I had an expansion on this idea based on the Commons Event content type. To keep the content in an Event node more active with Radioactivity my thought was to allow Registered attendees to post thier own images to an Event node to be displayed as a user generated gallery for an Event. This would allow the Event node to continue to remain active after the event. Limiting this ability to just users that were registered as an attendee could also prevent spam within the gallery limiting moderator overhead for frequent events. Creating a view of images posted to specific Commons nodes, submitted by an individual user, would allow you to not only create a view of images submitted but having those images link back to thier respective relevant nodes. The user images gallery for instance could then have categories such as Events or Groups and be further grouped by by the Event name or the Group name. Clicking on an image could bring you to the full image and clicking the Event Name or Group Name could bring you to those respective full galleries where other contributing users images can be viewed. So essentially you would gain both feature rich nodes that attract future visits and individual user galleries that are well organized by time and place.
Comment #3
Topcheese commented@autolyst, that sounds like a good answer and a good way to introduce a gallery feature. I kind of bumped this up to major because this other thread is kind of related and postponed, Better compatibility with Media module
Comment #4
autolyst commentedThe Media module does appear to be so far the way to go, it definitely has its fair share of submodules and expansions. Though it is not one that I have any particular high level of experience with but I will do some experiments.
My thought was to use Entity Reference prepopulate to a new node type that would simply have a multiple value Image field. Then create a view of all of the values in that field that reference to the node being viewed. Creating a gallery for the view can be achieved with a .tpl.php file something like "field--field_image--commons-gallery.tpl.php" this way you are working with the core module Image. I was inspired by the add event link on the events page and thought an add images link on other nodes would do the trick. I was thinking of rather that making a big deal out of turning the view into the gallery just building a template file on how you want the multiple images to render would make things simple enough.
I can work with the Media module for now and see what I can do. there are so many contributed modules and plug-ins that it might take while to work through them enough to find what works.
Any ideas on what to start playing with here?
Comment #5
geresy commentedis there a way to link the images back to their users ? so you have a small gallery for users on their profiles ?
Comment #6
autolyst commentedCreating a gallery of images that the user has added can be accomplished, my only concern with just adding a page of just those files is that perhaps it may be a bit redundant in certain circumstances. Like with the events system for instance, say the user is promoting a whole series of events, all using the same logo, but with different times and places (an event tour if you will), I run into this a bit since I am developing for an automotive culture site and car shows such as Hot Import Nights and Autorama have touring shows, the way Commons is currently configured the logo image would have to be uploaded multiple times for each Event time and place.
This presents a question of do I want to create a filter to not display that logo image, and if I don't how do I get the logo image to display only once. Do I create a parent container or entity for the Events that are in series, am I willing to turn on repeating event dates and risk a complete slow down of the system because too many contributing users chose the option for no end date and it balloons the database creating a backlog for my search engine. Then you have to look at what if the user created a one time Event and would like that logo image displayed as part of their gallery.
This brings me back to my original question of would putting user images in a separate node type that can reference a related node be the better option in this case. Since the parent node may contain an image the user wouldn't necessarily want to see repeated over and over if they ran a series. This gives you a filter based on the parent node and allows users the ability to go in and out of the gallery and edit only the images that they had contributed to that respective referenced gallery.
Making a blanket view of all the images a user submitted is certainly able to be accomplished my concern is that you set that gallery up to be naturally organized to where the user wouldn't want to delete an image that is required by another node type because it is repeated 10 times.
On a side note the option for a gallery visitor to vote up or down on submitted images to a public gallery would be more relevant if a logo image or avatar weren't thrown into the mix to cause confusion.
So simply put, yes, however laying a good foundation for removing redundancy should be accomplished first.
A simple view such as this may seem great at first, however some Commons users may not care for having a gallery, or even upload images to nodes. Being specific on when that panel or block should appear (after a user uploads a gallery image for instance) would accomplish that. If a user uploads nothing more than an avatar image and a group logo. Those have already been seen recently on the profile page by the visitor, and thus have no substance. If you want to get a real feel for that user and their interactions within a group, all the other images that are uploaded allow you to view that Event or Group from their perspective, and thus through their eyes. I may be a bit weird and my opinions I would hope to come across here as humble...albeit very long winded but humble. I just have a strong conviction that a gallery should appear as a view into that users soul in the contexts of a social network rather than a folder of files, and the same thing for a collection of images about a relevant node.
How you package the images (insert any random viewer here) afterwards is fine as long as they are organized.
Comment #7
autolyst commented@geresy I have got a good working view/block and content pane that should do this as you requested. I built it in a different theme than the default one and will test it in the latest Commons and adjust as necessary. So far it looks like I can give you an importable View that will give you the content blocks, and you will have to add the Pane into your user page. For gallery use I tested with YoxView and just added the code into my libraries folder and rendered the images within the pane with a template I added to theme folder so as to not alter the integrity of the Commons theme. I will post some instructions and code to test later this evening, I didn't do anything complex here just sought out the images that the particular user had posted to various nodes on the site and did my best to render them into a gallery.
Comment #8
autolyst commented@geresy Well I have run into a little snag on this one. Apparently the only image fields that exist in Commons are field_logo and field_group_logo. I built a panel for use with the default field_image machine id, and can add the two other fields. However, I have a few additional content types on my development site that have multiple image fields for articles and such. Since these are the only two field in commons so far that support images it doesn't quite make sense to add the panel into commons.
If you want to build the panel to suit your specific needs here are some basic instructions.
First start off in Structure > Views and add a new View. You wont need to add a page or block so you can leave those boxes unchecked.
Name the View (something like My Images be creative)
Add a Content pane to the Master view that was generated and make the following changes to the Content pane:
Format
- Format - Unformated list
- Show: Fields: default setting are fine
Fields
-Content: Group Logo
add any other image fields that are relevant to your site and you wont need to create a label on any of the fields and can strip off any whitespace if you want too
Criteria
-Author UID and criterion should be set to is one of
Sort Criteria (optional)
-Sort Desc or Asc for Content post date (its up to you)
Pager settings are also your choice it depends on how much real estate you are going to dedicate to the content
Under Advanced set the Contextual Filter to Author UID and specify the default value of User ID from logged in user
Save and preview this should give you a number of images that you yourself have added to the site.
If all is well save the pane and lets move on to adding it to your user_view page.
In Structure > Pages
click the Edit link on the User profile template
Go to the Summary section of you User profile Variant and hit the clone button
1. Rename the cloned Variant to Own User profile
2. Add the Pane we just created into the Content tab area of the Own User Profile Variant
3. Save the Changes we will look at them after the next few steps
4. On the Summary Tab add a selection rule to the new variant panel of User:Compare > First User: User being viewed > Second User: Logged in User and Grant Access if user contexts are "Equal" (in other words if the logged in user is the same as the user being viewed show this page, if not show the default one.
5. Save your work
6. The rule doesn't work unless the panels are in the right order so we will also have to re-sort the variants to Own User Profile then User profile. Do this with the handy re-order variants button at the top of the page afterwards save your work.
Ok that should do it (roughly you should now have a panel of images that you submitted and that only you can view on your profile page. Test with other users if you have the authority by checking your profile while logged in with their User Id's it should not show you the Panel.
Theming is going to be up to you you can attempt a simple grid or or add your own CSS to pretty up the gallery. I was able to successfully run a custom template for the panel to render the images in YoxView popup slideshow in Garland and Skeleton however I ran into some javascript errors on the Commons default theme. Likely my fault but I'm troubleshooting it.
Making a separate panel for use when viewing other users profile images is next. And I will continue theming the images by other methods to get it to work with the Commons theme.
Ultimately I hope to get some Entity referenced images going in Commons as well I really like the idea of being able to allow a social community to add their own media to enrich an Event or Group. you are kind of limited on your image results with just the two core fields.
But in the meantime I hope this does help with your original question of can an image be added to a User specific gallery, making it pretty will take a bit of work.
Comment #9
summit commentedHi @autolist, thanks for sharing your insights. Could you may be also export the view and panes and share them here?
Thanks a lot in advance for considering.
greetings, Martijn
Comment #10
devin carlson commentedIssues around better file/media handling, including adding gallery support, are being discussed at #1867524: [meta] Better media handling capabilities.
Marking this as a duplicate.