Support » Plugin: WP Photo Album Plus » How to let users edit their photos and limit their upload capacity?

  • Resolved René


    Hello opajaap,

    Thanks for the very good plugin!

    I’m building a website for a photo-club, with a members private part to upload their photos and share them with the members.

    I have set option VII-B5.subscriber to 10 photos per week. This works perfectly as long as I not have ticked option VII-A Upload Photos for a Subscriber. But when the upload limit capacity works, then the members lose the possibility to edit their photos like to change the name, description, etc. I also have ticked option VII-D7.
    Is there a way to have a limit upload capacity for a user role and at the same time the possibility to edit the uploaded photos?

    Thanks in advanced!

    Best Regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jacob N. Breetvelt


    If you give rights to the userrole, this superceeds the other limitations, because they can access their stuff at the backend.

    You better give them edit rights in Table VII-D2. Then they can edit their photo info at the frontend and delete if they regret an upload.

    They will see a Delete and an Edit link in the description box underneith the display in the slideshow view.

    So, do not give them rights in VII-A, Configure VII-B, and tick VII-D1 and 2. Additionally you may decide that they can edit name and description of their ( own ) album if you tick VII-B1.1

    VII-D1 ( Owners only ) is important if you give them any edit and/or upload access to albums.

    Also, try the upload widget or shortcode: [wppa type="upload"][/wppa]. The users will be able to upload to any album they have access to ( is owner, or public albums ). VII-D1 is also important here.

    Thanks for the fast response!

    I have disabled the userroles in Table VII-A, and pick Table VII-D1 and 2 and configured Table VII-B.
    When I click on edit as an user with subscriber role then I get a popup with the message “You do not have sufficient rights to do this”. And this popup does not show anything more.

    Do you have any idea what I’m doing wrong?

    Best regards,

    Additional information:

    I have also configured these settings into a WordPress Single site as testing environment. There it’s working all fine and I can edit photos after they are uploaded.

    On the website of the Photo-club, we are using WordPress Multi site configuration. And this private part of the website is set to the second site in the multi-site environment.

    I hope this extra information is helpful.

    Best regards,

    Plugin Author Jacob N. Breetvelt


    I inspected the code and found this: although I am not sure if it is logical, but they need upload rigths in Table VII-A, so give them those rights to see if it works and see if the limits still work ( in any case do not give them album admin rights! ). If it spoils the limits, i will modify the code for this.

    When I give the user upload rights in table VII-A, the limits are spoiled and can upload as many photos the user likes.

    I did some inspection too and find that for editing photos the validation of current_user_can( 'wppa_upload' ) went wrong when table VII-A Upload Rights is not ticked. In file wppa-ajax.php line 52 I did some little modification and replaces this line of code by:
    if ( wppa_get_user() == wppa_get_photo_owner( $photo ) && ( current_user_can( 'wppa_upload' ) || is_user_logged_in() && wppa_switch( 'wppa_upload_edit' ) ) ) $ok = true;

    This makes it possible for the user to edit its own photos without any rights in table VII-A and VII-D1 and 2 ticked.

    May be there are more places with the current_user_can( 'wppa_upload' ) validation that needs some inspection.

    Thanks for all the good help!

    Best regards,

    Plugin Author Jacob N. Breetvelt


    Wow! You’re smart. This is exactly waht i found this morning. I will change the code as indicated. Thanx for testing.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to let users edit their photos and limit their upload capacity?’ is closed to new replies.