Replies
- KerryMusic on August 26, 2019 at 11:45 pm in reply to: Only one Gallery per user and auto create gallery during registration #25001
Really Thanks for Help
I just add the code. Seem it still go to Gallery List page!!
Is that possible to hide/disable the delete button for user?? dont let user delete.
I thinks the site will be no more need change to be use for Public
1. Create Gallery when registration (OK)
2. myGallery go to Media List
3. User not allow to delete
4. User cannot Create GalleryThanks for you support
Kerry - KerryMusic on August 26, 2019 at 4:57 pm in reply to: Only one Gallery per user and auto create gallery during registration #24987
http://cover.y-popstyle.com/members/charissa/mediapress/charissa/
Yes, Press MyGallery should jump to that gallery user page
http://cover.y-popstyle.com/wp-content/uploads/2019/03/usermediapage-3.png
- KerryMusic on August 26, 2019 at 3:02 pm in reply to: Only one Gallery per user and auto create gallery during registration #24986
- KerryMusic on August 26, 2019 at 2:52 pm in reply to: Only one Gallery per user and auto create gallery during registration #24985
Really Thanks for your reply and your help.
Yeah, I just use your code and the gallery will be created.
Another question I search for web and your site about the media listing shortcode. also cannot find the answer.
As I only have one gallery for one user, therefore, I want user click “myGallery” will just list out all the media but not only one gallery
I want to list all the media photo of that “USER” if click the menu of “myGallery”, I cannot find ANY shortcode of media listing only for that “LOGIN USER”
https://buddydev.com/mediapress/shortcodes/mpp-list-media/
see picture here
http://cover.y-popstyle.com/wp-content/uploads/2019/03/medialist.pngThanks for your help
Kerry
- KerryMusic on August 25, 2019 at 1:44 pm in reply to: Only one Gallery per user and auto create gallery during registration #24957
I try myself to follow your example and have some progress!
1. I can not let user create delete edit Gallery
2. I can set the Title of the Gallery as the nickname
3. can Auto create after pressing the ProfileWhat I dont know how to do are:
1. Auto Create during registration
2. remove the “Please Select Gallery” in upload shortcode, because each user only have one gallery so dont need selectfunction mpp_custom_auto_create_gallery() { if ( ! bp_is_my_profile() ) { return ; } //make sure that user gallery functions are available if ( ! function_exists( 'mpp_create_gallery' ) ) { return; } $user_id = get_current_user_id(); $username = $user_id->user_login; $nickname = get_user_meta($user_id, 'nickname', true); //does this user has predefined gallery? //we use this check to avoid same type of gallery again and again for the user if ( ! get_user_meta( $user_id, '_mpp_predefined_gallery_photo_1', true ) ) { //No, then we need to create it. //repeat it as you want $gallery_id = mpp_create_gallery( array( 'creator_id' => $user_id, 'title' => $nickname, 'description' => '', //add description if any 'status' => mpp_get_default_status(),//can use any of the status e.g. 'public' , 'private', 'loggedin', 'friends' etc 'component' => 'members',//for user 'component_id' => $user_id,//no need to change 'type' => 'photo', //can change to "audio", "video", "doc" ) ); //let us keep the id in usermeta to avoid creating it again, right? if ( ! is_wp_error( $gallery_id ) ) { update_user_meta( $user_id, '_mpp_predefined_gallery_photo_1', $gallery_id ); //you can change the key to anything } }//end of repeatable block //go ahead, do it for other types too } add_action( 'mpp_actions', 'mpp_custom_auto_create_gallery' );
- KerryMusic on August 25, 2019 at 8:35 am in reply to: Only one Gallery per user and auto create gallery during registration #24955
This is our Gallery site, we want to have gallery for Magazine cover girl. Each user only have one gallery
http://cover.y-popstyle.com/1. I want the NAME field as the Gallery Name
2. Auto create ONE gallery when the user registration
3. No need to have Create Gallery (I follow your instruction and that OK)
4. The “Drop File Upload Area”, It got the “Please Select Gallery”, I dont need that because I only have one gallery. How can I remove that ?I would provide 3 more photos to explain what I want to achieve!
http://cover.y-popstyle.com/wp-content/uploads/2019/03/buddydev1.png
http://cover.y-popstyle.com/wp-content/uploads/2019/03/buddydev2.png
http://cover.y-popstyle.com/wp-content/uploads/2019/03/buddydev3.pngThanks a lot
Kerry
- KerryMusic on August 25, 2019 at 4:12 am in reply to: Only one Gallery per user and auto create gallery during registration #24953
https://buddydev.com/support/forums/topic/mediapress-predefined-user-galleries/
I have seen this post and can disable user to create edit and delete gallery but don’t know how to auto create gallery when registration
And use the Name as the gallery name
Kerry