Replies
- This reply has been marked as private.
- Brajesh Singh on January 7, 2018 at 5:02 pm in reply to: [Resolved] Buddypress – How to Hide / Restrict Primary Name field? #12743
Thank you.
- Brajesh Singh on January 7, 2018 at 4:59 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12742
Hi George,
you can use
if( function_exists('mediapress') ) { // }to check if MediaPress is active.
To mark a gallery as global shared, you can do the follwoing
mpp_update_gallery_meta( $gallery_id, '_mpp_is_all_upload_allowed', 1);Hope that helps.
Hi Tristan,
Welcome to BuddyDev Forums.Can you please provide me a link to your site? That will allow me to assist you better.
Thank you
Brajesh- Brajesh Singh on January 6, 2018 at 8:50 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12733
sure, I am looking forward to it 🙂
- Brajesh Singh on January 6, 2018 at 8:39 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12731
Thank you.
In order to update the gallery details, you can use the following function(s)
Updating gallery status(If you only need to update status)
mpp_update_gallery_status( $gallery, $status ); // $status can be any valid status e.g 'public', 'private' etc.Or you can use
mpp_update_gallery( $args );where $args can be
$args = array( 'id' => $gallery_id, // *Required 'title' => 'gallery title', // optional, if not given, keeps the current gallery title. 'description' => 'gallery description', //optional. 'slug' => 'gallery-unique-slug', 'creator_id' => $user_id,//who created this gallery. 'order' => 0, // menu order. 'component_id' => $user_id,//optional. will keep current component if not given. 'component' => 'sitewide', // optional 'status' => 'public', //new status 'type' => 'photo', //new type? );Everything except the id is optional.
For example, Here is how we are updating the gallery description.
https://github.com/buddydev/mediapress/blob/master/core/ajax/mpp-ajax.php#L1049
Hope that helps.
Regards
Brajesh - Brajesh Singh on January 6, 2018 at 8:28 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12730This reply has been marked as private.
- Brajesh Singh on January 6, 2018 at 8:13 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12727
Thank you for the update.
You can do that by using the following code
$associated_gallery_id = get_post_meta( $post_id, '_mppc_associated_photo_gallery_id', true );You should use the actual post id for fetching gallery id.
- Brajesh Singh on January 6, 2018 at 8:04 pm in reply to: [Resolved] MediaPress Gallery Tab in Private Groups #12724
Thank you Graham.
I am glad I was able to fix it in time.
Thank you for your patience and helping me in making MediaPress better 🙂
Best regards
Brajesh - Brajesh Singh on January 6, 2018 at 8:03 pm in reply to: [Resolved] Adding a gallery automatically on post creation #12723
Thank you George.
I am looking forward to your feedback 🙂