BuddyDev

Search

[Resolved] Uploading to MediaPress as a visitor

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

    Hi Iain,
    Thank you.

    1. Yes, you can specify the parameter gallery_id to the numeric value of the gallery.

    2. The pseudo element is not added by us. The notice is added by us. TO avoid that notice, please wrap the shortcode in a code that checks if the current user can upload to gallery or not?

    3. Are you using object cache? MediaPress should work fine with object cache. If you are using static page caching, you will probably need a way to exclude these pages.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 52
    Iain Claydon on #50371

    Hi Brajesh,

    Thanks for the reply, however I’m not at your level 😉 For point 2 can you advise the file path location for that piece of text, as I cannot find it… also I would not know the code to check if user can upload or not.

    Kind regards as always,
    Iain

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

    Hi Iain,

    Please add the following option to shortcode show_error=0
    That would hide the error.

    That would solve your issue.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 52
    Iain Claydon on #50391

    Hi Brajesh,

    Thanks for the that additional code, I’ve added that in, I did find location for the text in any case though to remove.

    One thing I have noticed, since adding the alternative code to loop-gallery.php, the mpp lightbox close button (.mfp-close) has disappeared! Would you know how to retrieve this? The media opens in a lightbox but there is no close button anymore, very strange – it was there before.

    Kind regards,
    Iain

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

    Hi Iain,
    Thank you.
    I am glad that the notice is gone.

    The lightbox issue seems css conflict. I will suggest using browser debug console to inspect and check the issue.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 52
    Iain Claydon on #50396

    Hello Brajesh, I did fix the lightbox close button issue, it was a javascript error in my site.

    Regarding my point 1 above, would you be able to specify where I need to apply the numeric value of the gallery?

    Kind regards,
    Iain

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

    Hi Iain,
    You will need to add it in the shortcode

    e.g

    
     <?php echo do_shortcode('[mpp-uploader gallery_id=32]');?>
    

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 52
    Iain Claydon on #50439

    Hi Brajesh,

    This won’t work for each individual user – I tested with a new account, and the uploader box doesn’t display. If I remove gallery_id= then the uploader does display but with an empty dropdown list “Please select a gallery” — but there is no gallery to select with a new user, and if I try to bypass this and just upload anything we get an error “Please select a gallery before uploading”

    There must be a way to display the uploader without a gallery? My client doesn’t want galleries, just a basic media grid.

    Any thoughts?
    Many thanks,
    Iain

  • Participant
    Level: Enlightened
    Posts: 52
    Iain Claydon on #50497

    Hi Brajesh,

    A further update to this

    echo do_shortcode(‘[mpp-uploader]’);?> This does not show the uploader for a visitor to someone’s profile unless that visitor is an Administrator level

    mpp_get_template( ‘gallery/manage/upload-form.php’ ); does show for a visitor to another profile

    Why does “echo do shortcode” not show up for a visitor, but “mpp_get_template” does?

    I need the uploader to show for a visitor, but without the need to assign to a gallery. Are we able to achieve this result?

    Kind regards as always,
    Iain

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

    Hi Iain,
    Thank you for the replies.
    I am sorry, I could not get back to you earlier.

    Why does “echo do shortcode” not show up for a visitor, but “mpp_get_template” does?

    Because the shortcode check for the upload permission(authentication and autherization to upload to the gallery).
    As I have replies in one of your previous topics, only the gallery creator(owner) or site admin has the rights to upload.

    Int his thread, you had requested for showing upload on /mediapress(landing page of user gallery) and there was no mention of it being available to all users.

    This won’t work for each individual user – I tested with a new account, and the uploader box doesn’t display. If I remove gallery_id= then the uploader does display but with an empty dropdown list “Please select a gallery” — but there is no gallery to select with a new user, and if I try to bypass this and just upload anything we get an error “Please select a gallery before uploading”

    I hope you understand that the gallery needs to be created and available for it to be used in the shortcode. You will need a way to automatically create gallery on user registration(or their own profile visit).

    Regards
    Brajesh

The topic ‘ [Resolved] Uploading to MediaPress as a visitor’ is closed to new replies.

This topic is: resolved