BuddyDev

Search

BP Gallery shortcakes ?

Tagged: 

  • Keymaster
    (BuddyDev Team)
    Posts: 22211
    Brajesh Singh on #1699

    Hi,
    No, These plugin can not be used with BP Gallery. BP Gallery does not use custom post type( Custom post type was not available when we initially released BP Gallery).

    MediaPress does use custom post type and all these plugin can be used with MediaPress not with BP Gallery. If we need to add any such functionality to Bp Gallery, It will need custom creating loop and using javascript.

  • Participant
    Level: Initiated
    Posts: 8
    lb20 on #1700

    many thanks for your support, we wait for media press, meanwhile we can wait with some changes …

    – where we can change image style of each image in this shortcake , we.re looking in core/shortcode.php but here we only can remove title, we need a image adjust to full box (our community is for artist and they like show his works in a bigger way)

    – we need use full image not thumb image, where we can change that ?

    thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 22211
    Brajesh Singh on #1701

    Thank you.

    1. Everything is coming from this function bp_gallery_list_medias
    I am sorry about the code quality there. It looks bad( not clean and not upto the current standards )
    It starts from line 108 on shortcode.php

    You can change everything there.

    2. For large images, you will see this code in that function

    
    bp_get_gallery_media_thumb_html()
    
    

    replace that with

    
    bp_get_gallery_media_full_html()
    
    

    Hope that helps. Please ignore the code quality for now. It is too old and not clean. That’s why we dropped BP Gallery in favor of MediaPress with modern architecture and better codebase.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    lb20 on #1740

    Thanks, when we change bp_get_gallery_media_thumb_html() with bp_get_gallery_media_full_html() we get an error …

    Warning: Missing argument 1 for bp_get_gallery_media_full_html(), called in /usr/home/cOiS3BAGeHp2/olemiarte.com/web/wp-content/plugins/bp-gallery/core/shortcodes.php on line 118 and defined in /usr/home/cOiS3BAGeHp2/olemiarte.com/web/wp-content/plugins/bp-gallery/core/media/template-tags.php on line 579

    any idea to solve ?

    many thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 22211
    Brajesh Singh on #1741

    Hi, Sorry about the delay. Checking now, Looking at it will get back to you in 30 mins.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    lb20 on #1749

    Thanks any help is welcome

  • Keymaster
    (BuddyDev Team)
    Posts: 22211
    Brajesh Singh on #1757

    Hi ,
    sorry about that. In the shortcodes.php, please replace the whole “bp_gallery_list_medias” function by this

    
    
    function bp_gallery_list_medias( $args, $echo = true ) {
    	
    	$content = "";
    	
    	$params = wp_parse_args( $args, array( "show_thumb" => true ) );
    	
    	extract( $params );
    	global $medias_template;
    	
    	if ( bp_gallery_has_medias( $args ) ):
    		while ( bp_gallery_medias() ):bp_gallery_the_media();
    		    
    			$media = $medias_template->media;
    			
    			$content .= "<div " . bp_get_media_css() . " id='gallery_media_" . bp_get_media_id() . "'>";
    			$content .= "<div class='media-content'> <h5 class='media-title'>" . bp_get_media_title() . "</h5>";
    			
    			if ( $show_thumb ) {
    				
    				$content .= "<a href='" . bp_get_media_permalink() . "'>" . bp_get_gallery_media_full_html( $media ) . "</a>";
    				$content .= "<br class='clear' />";
    			}
    			//  $content.="<p class='media-description'>".bp_get_media_description()."</p>";
    			$content .= "</div>"; //media content div ends here
    			// endwhile;
    			$content .= "</div>";
    		endwhile;
    		$content .= "<br class='clear' />";
    	endif;
    	
    	if ( ! $echo ) {
    		return $content;
    	} else {
    		echo $content;
    	}
    }
    

    That will solve it.
    Hope that helps.

You must be logged in to reply to this topic.

This topic is: not resolved