BuddyDev

Search

Replies

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

    Hi Brajesh,

    Thanks for the advice, I tweaked the file to say:
    function mpp_user_can_upload
    is_user_logged_in
    $can_do = true

    This now allows all those logged in to upload to a gallery whilst retaining edit/delete rights for admin and owner only.

    I hope this post helps other users, we are all trying to help with the buddypress and mediapress development.

    Kind regards,
    Iain

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

    Hi Brajesh,

    It is easy to get onto other requirements in a thread, it did start out though as wanting a visitor to upload to another profile. I do realise this isn’t possible, so I added an extra register form thinking a ‘subscriber’ could add to someone else’s gallery. This is the bit that is crucial for my client. If this is doable, what would the steps be to achieve this?

    Kind regards,
    Iain

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

    Hi Brajesh,

    Thanks for coming back on this one.
    I am somewhat confused, as the title of my thread is “Uploading to MediaPress as a visitor” – so it’s clear that is the requirement I’m after. My site relies on the sharing of a profile link and the visitor then logs in as a subscriber (because they can’t upload when not logged in) and is then able to add to a gallery. This must be possible surely? Those that join the site are not going to have admin rights, nor would I want them to.

    If I could use “mpp_get_template (‘gallery/manage/upload-form.php’);” instead, is it possible to add the select gallery drop down to this template, as this would be a work around. Then at least when someone has created a gallery the visitor could then select it. Is this do-able?

    Many thanks as always,
    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

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

    Hi Ravi,

    Yes you’re right, I knew it was something simple!

    Regards,
    Iain

  • 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 #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

  • 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

  • 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

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

    Hi Brajesh,

    Thanks for the new code snippet, this is really close!
    Just a couple of observations:

    1. is there a possibility to choose the default album (We won’t more than 1 album, just a photo grid) rather than the select list “please select a gallery”?

    2.Before the photo grid, a visitor sees the words “Sorry, you are not allowed to upload here.” as a pseudo element (:before) – and it shifts the photos across a column width – I can’t locate this text in the files to remove, and I can’t get CSS to remove it either. I won’t need this line of text so would like to remove it.

    3. General question about content refresh with MediaPress/BuddyPress – I have to manually clear cache each time there is a page update, however members will need to see instant content refresh. Do you know the best way to achieve auto page refresh when uploading new media or BuddyPress content? I’ve read through some other posts but can’t see an answer. I’m using litespeed at the moment but happy to change.

    Many thanks as always,
    Iain