Closed (fixed)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2014 at 16:27 UTC
Updated:
27 Feb 2014 at 20:00 UTC
Jump to comment: Most recent
Comments
Comment #1
miromarchi commentedI'm interested in a media browser per organic group too.
Should we modify the media browser view, adding a relationship to "og membership from node", then a contextual filter to "(og membership from node) og group ID", and then a filter criteria "(og membership from node) og membership: group type=node"?
Comment #2
devin carlson commentedI'm not sure what the best way to have a media browser per group would be, but you could alter the media element (
hook_element_info_alter()) in order to output the group's ID to JavaScript and then implementhook_query_media_browser_alter()in order to alter the media browser depending on the group ID.If you want to restrict certain files to certain groups, you might want to implement
hook_schema_alter()in order to add a group ID column to the {managed_file} table or use the Flag module to add a flag to files which represents which group they belong to.