Add Media
-
How can we add a user capability to add media images to the notes section of their profile?
The page I need help with: [log in to see the link]
-
Only admins can add media. This security measure is in place because allowing users to include media will allow user access to the Media Library.
I hope this helps!
But as it stands they can upload a logo and an image — so is there a way to integrate that feature anywhere else? In another messageI had asked about having a gallery for each member which we integrated but they need to be able to manage that gallery.
RE: as it stands they can upload a logo and an image
Correct, but these fields do not interact with the WordPress Media Library.
RE: is there a way to integrate that feature anywhere else? … I had asked about having a gallery for each member which we integrated but they need to be able to manage that gallery.
You could try one of these two plugin that restrict users to only their uploaded file in the Media Library:
- https://www.ads-software.com/plugins/frontier-restrict-media/
- https://www.ads-software.com/plugins/restrict-media-library-access/
The second has not been updated in years and may no longer be viable.
In combination with one of those plugins above, you would edit your WP User Role capabilities to allow access to the Media Library, which I think are
upload_files
and at leastedit_posts
capabilities are required. That should allow the users access to the Media Library and manage their images with the gallery plugin, but; this may also give your users roles far more access than you wish them to have.I hope this helps; please let me know.
How do I change the user capabilities within Connections? Or are you saying I need a plugin to change directly in wordpress?
Connections cannot change the core WordPress user roles capabilities; only the custom role capabilities it adds for permissions.
To change core WordPress user role capabilities, you’ll need to use a user role plugin. This one seemed decent the last time I had a need for one:
I hope this helps!
I meant the connections roles — if you navigate from connections to roles it has a list of roles and capabilities – but it isn’t changing when i add those from the wp admin user roles capabilties.
RE: it isn’t changing when i add those from the wp admin user roles capabilties.
What steps are you following to make the changes so I can attempt to replicate the issue?
I added the capability under the user role editor but when you go to Connections – roles it does not show the additional capability as an option so when I log in as a subscriber (which is the role associated with the connections user) it still doesn’t show “add media” for the notes or biography sections.
I actually found this
https://connections-pro.com/documentation/link/#Shortcodes
And it worked!RE: I added the capability under the user role editor but when you go to Connections – roles it does not show the additional capability as an option
The Connections Roles admin page will only ever display the custom capabilities for Connections. It will not show any core WordPress capabilities or custom capabilities added by other plugins.
Since you are using User Roles Editor, you could actually manage all capabilities for user roles in that plugin, even the custom capabilities added by Connections and other third-party plugins. For example, you grant the Contributor role the Connections View Admin menu and View Dashboard capabilities in User Role Editor; when you navigate to the Connections Roles admin page, you will see that change will be reflected. This is because both the Connections Roles admin page and the User Role Editor both interact with the core WordPress Roles and Capabilities API.
RE: I actually found this https://connections-pro.com/documentation/link/#Shortcodes And it worked!
I’m not sure how the Link add-on shortcode helps with user role capabilities and the media library, but it’s great to hear that they help you accomplish what you need.
I hope this helps; please let me know.
Spoke too soon. We are getting an error when we go to upload to the media folder when logged in as a member:
Sorry, you are not allowed to attach files to this post.
So the steps I had taken were:
Installed User Role Editor
Added ‘upload_files’ to the subscriber capability (which is the capability assigned to connections member)
Added the snippet suggested in that other link (posted above)add_filter(
‘connections_link_allow_media_upload’,
function( $show ) {
return true;
}
);The add media button is where i need it to be and it opens the media libary to the folder that the user has access to (done with another plugin) but it is saying
Sorry, you are not allowed to attach files to this post.
The thing I am still stuck on is that if I go to Connections – roles – the ‘upload_files’ option doesn’t show up under subscribers like you are saying it should above so maybe this is where this is not closing the gap?I think you also need to allow the
edit_posts
capability.I hope this helps!
I did that and it worked but then the member went in and tried and got the same error – which i am getting again too now…so not sure what is happening.
- The topic ‘Add Media’ is closed to new replies.