BuddyDev

Search

[Resolved] Mediapress Upload Permissions

  • Participant
    Level: Initiated
    Posts: 4
    Ian on #6940

    Using WP(4.7) with buddypress(2.7.4) & mediapress(1.0.7)

    Active Plugins:
    – bbPress 2.5.12
    https://bbpress.org

    – BuddyPress 2.7.4
    https://buddypress.org/

    – Custom Admin Page by BestWebSoft 0.1.1
    http://bestwebsoft.com/products/wordpress/plugins/custom-admin-page/

    – MediaPress 1.0.7
    https://buddydev.com/mediapress/

    – Members 1.1.2
    http://themehybrid.com/plugins/members

    – New User Approve 1.7.4
    http://www.picklewagon.com/wordpress/new-user-approve/

    – PHP Event Calendar 1.5.9
    http://phpeventcalendar.com/

    – Shortcode Widget 1.2
    http://wordpress.org/extend/plugins/shortcode-widget/

    – Sidebar Manager Light 1.12
    http://otwthemes.com/?utm_source=wp.org&utm_medium=admin&utm_content=site&utm_campaign=sml

    – Simple Ajax Shoutbox 2.2.0
    https://wordpress.org/plugins/simple-ajax-shoutbox/

    – SysInfo 1.1.0
    http://wordpress.org/extend/plugins/sysinfo/

    – WoWpi – the World of Warcraft API Armory plugin 2.3.4
    https://wordpress.org/plugins/wowpi/

    – WP Custom Widget area 1.2.5
    http://kishorkhambu.com.np/plugins/

    – WP Email Users 1.3.10
    http://www.techspawn.com

    – WP ULike 2.4
    http://preview.alimir.ir/developer/wp-ulike/

    Having trouble getting the sitewide gallery permissions working the way I want them, I only have the sitewide gallery enabled but it seems only I can upload to it since im the Super-admin, how can I enable normal users to upload. I want all registered members to be able to upload. I have already enabled the ‘can_upload’ permission for all members both in wordpress and buddypress.

    Commenting permissions are working though…

    But I don’t want to use the ‘user’ or ‘group’ galleries…

    I did try in bp-custom.php

    [code]

    `function mpp_custom_user_can_upload_photo() {
    return current_user_can( ‘upload_files’ );
    }

    function mpp_custom_upload_permission( $can_do, $component, $component_id, $gallery ) {

    if ( empty( $gallery ) ) {
    return $can_do;//do not change the permission
    }

    $type = $gallery->type;

    if ( $type == ‘photo’ && ! mpp_custom_user_can_upload_photo() ) {
    $can_do = false;
    }

    return $can_do;
    }

    add_filter( ‘mpp_user_can_upload’, ‘mpp_custom_upload_permission’, 10, 4 );

    [/code]

    but doesn’t seem to work. The code is modified from another topic ‘Role Based Permissions

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #6941

    Hi Ian,
    Welcome to BuddyDev.
    My apologies for the inconvenience.

    I am looking at it and will update you in next 1-2 hours.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #6949

    Hi Ian,
    I just tested and you are right about the issue. The problem happens because the plugin is unable to decide the current component to be ‘sitewide’.

    Please allow me 1-2 days to put this and a few more changes(Currently, if you disable the BuddyPress integration, Even the shortcode for creating gallery is not working). I am working on a fix to properly detect the components.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 4
    Ian on #6987

    Any news on this yet?

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #6991

    Hi Ian,
    It has taken a little more that expected. We will have an update ready by tomorrow.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 4
    Ian on #6996

    Thankyou, wasn’t trying to rush you, just wanted an update, personally I’d rather it take time and be done right, then rushed and full of bugs, lol, love MP btw (fits what I need better then anything else out there), keep up the good work

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #7018

    Hi Ian,
    My apologies for the delayed reply.,

    I have fixed it on the github repo.

    https://github.com/buddydev/mediapress/commit/4d0de6c2519a2d6775c69e9cd1b7c701b7c2cd6b

    If you want you can update from there, I will pus on wp.org too in next 1-2 days(Just need a few more enhancements to go in).

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 4
    Ian on #7034

    Just tested thew changes from the git repo, still getting no permissions to upload from normal users
    (with the ‘can_upload’ permission) either in the gallery itself or the widget.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #7035

    Is this happening for a Gallery created by the user? by default, A user can upload to their own gallery.

    If you want to have some galleries where everyone can upload, please use this plugin

    https://github.com/mediapress/mpp-global-shared-gallery

    You will need to mark a gallery as global shared to allow everyone to upload to it.

    Otherwise, you can use the shortcode [mpp-create-gallery] to allow users to crate gallery and upload.

    Hope that helps.

  • Participant
    Level: Initiated
    Posts: 4
    Ian on #7036

    ah, thats working now (at the very least it’s enabled the upload widget for normal users which is all I needed).

    Thankyou, this last part was probally me mis-understanding something…

    Anyway, thankyou again, Love the system, and kudos on the excellent user support…

The topic ‘ [Resolved] Mediapress Upload Permissions’ is closed to new replies.

This topic is: resolved