BuddyDev

Search

Member Gallery Names

  • Participant
    Level: Enlightened
    Posts: 23
    wingflap on #51194

    Thanks. You can close the topic I just started with the edit issue or just respond there.

    But for this topic, I’d like to address this from above:

    Making the change made it so that in the Profile Gallery tab, the gallery names for Wall Gallery are being changed to include the member’s name.

    My Gallery page for the sitewide gallery is a page with the shortcode [mpp-list-gallery]. The gallery name’s are not changing on that page.

    Should I be using something else for my Gallery directory page?

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2952
    Ravi on #51199

    Hello

    To work on shortcode as well. Use the following code:

    
    
    add_action( 'mpp_before_gallery_entry', 'buddydev_modify_gallery_title' );
    add_action( 'mpp_before_gallery_shortcode_entry', 'buddydev_modify_gallery_title' );
    remove_action( 'mpp_after_gallery_entry', 'buddydev_modify_gallery_title', 10 );
    remove_action( 'mpp_after_gallery_shortcode_entry', 'buddydev_modify_gallery_title', 10 );
    
    function buddydev_modify_gallery_title() {
    	add_filter( 'mpp_get_gallery_title', function ( $title, $gallery_id ) {
    
    		if ( mpp_is_wall_gallery( $gallery_id ) ) {
    			$gallery = mpp_get_gallery( $gallery_id );
    
    			if ( 'groups' === $gallery->component ) {
    				$title = sprintf( '%s wall gallery', bp_get_group_name( $gallery->component_id ) );
    			} else {
    				$title = sprintf( '%s wall gallery', bp_core_get_user_displayname( $gallery->user_id ) );
    			}
    		}
    
    		return $title;
    	}, 10, 2 );
    }
    
    

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 23
    wingflap on #51287

    I’m using BuddyX theme, BuddyPress, and MediaPress. Before BuddyPress upgraded to 12.0, I thought that it created a Gallery page that would display the gallery index. After upgrading to 12.0, I can’t seem to find it. That’s why I created a page with a shortcode. Am I missing something or is using a shortcode on a custom page the way to display sitewide galleries now?

    This would affect which of the above methods I’d use to change the gallery names.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2952
    Ravi on #51291

    Hello,

    Thank you for your acknowledgement. MediaPress plugin is not compatible with BuddyPress 12 so to make it work please use the BP Classic plugin. You can check it here:

    https://wordpress.org/plugins/bp-classic/

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 23
    wingflap on #51299

    I am currently using the BP Classic plugin, but am not seeing a gallery page that’s created for BuddyPress. That’s why I’m using a custom page with the gallery shortcode. With theh BP Classic plugin, should I be seeing a gallery page or do I just continue with the shortcode page until MediaPress is compatible with BuddyPress 12?

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2952
    Ravi on #51347

    Hello,

    Sorry for the delayed reply. The gallery page is not created automatically by MediaPress. If not created create one and set a gallery page. You can set directory pages under Settings > BuddyPress > Pages > Directories look for ‘Gallery’ and select the created page as a directory page.

    Look at the following screenshot:

    http://tinyurl.com/ysz86nm8

    Please give it a try and let me know.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved