BuddyDev

Search

Mediapress Manage Settings Page

  • Participant
    Level: Enlightened
    Posts: 21
    Axel on #15220

    Hi, I am trying to create a menu item that links directly to a users Edit Details page rather than having to go to the user gallery then click the Edit link to open manage/edit before access to the manage/settings link is available.
    Thanks for any help 🙂

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #15226

    Hello Axel,

    Thank you for posting. I am not sure I understand your question. There are no edit link per user. Edit links are per gallery. Will you like to show the edit link on gallery list page( next to view/upload/delete )

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 21
    Axel on #15227

    Sorry Ravi, I will try again. I would like to have the Edit Details subnav on the same level as the Edit subnav.

    ie current default is

    1. Gallery
    2. My Gallery, Edit, etc
    3. View, Edit Media, Reorder, Edit Details

    I would like to move Edit Details to the number 2 position if it is possible.

    Thanks again for your time 🙂

  • Participant
    Level: Enlightened
    Posts: 21
    Axel on #15229

    I figured out what I was trying to achieve but can you suggest a function to put in bp-custom.php`

    I edited mediapress/mpp-core-component.php and changed the default Edit nav to point to settings.

    I changed the below code

    if ( mpp_user_can_edit_gallery( mpp_get_current_gallery_id() ) ) {
    		$url = mpp_get_gallery_edit_media_url( mpp_get_current_gallery() ); // bulk edit media url.
    		$links .= sprintf( '<li><a href="%1$s" title ="%2$s"> %3$s</a></li>', $url, _x( 'Edit Gallery', 'Profile context menu rel attribute', 'mediapress' ), _x( 'Edit', 'Profile contextual edit gallery menu label', 'mediapress' ) );

    to

    if ( mpp_user_can_edit_gallery( mpp_get_current_gallery_id() ) ) {
    		$url = mpp_get_gallery_settings_url( mpp_get_current_gallery() ); // bulk edit media url.
    		$links .= sprintf( '<li><a href="%1$s" title ="%2$s"> %3$s</a></li>', $url, _x( 'Edit Settings', 'Profile context menu rel attribute', 'mediapress' ), _x( 'Edit', 'Profile contextual edit gallery menu label', 'mediapress' ) );

    Thanks again 🙂

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #15238

    Hello Axel,

    Try the following code in you bp-custom.php file. We can not fix the position order. Please check.

    
    function buddydev_modify_gallery_nav_items() {
    
    	if ( ! function_exists( 'mediapress' ) || ! mpp_is_single_gallery() ) {
    		return;
    	}
    
    	if ( mpp_is_gallery_management() || mpp_is_media_management() ) {
    		return;
    	}
    
    	$links = '';
    
    	if ( mpp_user_can_edit_gallery( mpp_get_current_gallery_id() ) ) {
    		$url = mpp_get_gallery_settings_url( mpp_get_current_gallery() );
    		$links .= sprintf( '<li><a href="%1$s" title ="%2$s"> %3$s</a></li>', $url, _x( 'Edit Settings', 'Profile context menu rel attribute', 'mediapress' ), _x( 'Edit Settings', 'Profile context menu rel attribute', 'mediapress' ) );
    	}
    
    	echo $links;
    }
    
    add_action( 'bp_member_plugin_options_nav', 'buddydev_modify_gallery_nav_items' );
    
    

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 21
    Axel on #15261

    Thanks Ravi 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #15267

    I will be working on it in 1.5 release. We will have the menu items sortable. For now, Please continue with the edit.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved