Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)

  • 3T_MJ
    Participant

    @3t_mj

    well, I did that already. The original pic is a jpg taken with a proper DSLR. But doing the same crop via buddypress and my image editing programme makes a notable difference, it’s set to 72 dpi when editing. Not sure what compression buddypress uses (0.9 or lower?) when storing the image but it seems bad. It seems worse compared to ste crop wordpress does when uploading pics. And to make it worse, the buddypress crop file size is larger compared to doing the same crop with the image editing programme – and that with lower quality. I’m devastated.


    3T_MJ
    Participant

    @3t_mj

    thanks @buddycore but I already did that. I even uploaded a larger avatar to get it resized but not a big difference. So I assume it’s due to the image compression when cropping/resizing. When I edit the image with an image editor and replace the files created by buddypress (given the exact same names and dimensions) it looks far better then having it done with by buddypress. But that’s nothinhg members of the site will be able to do. They rely soley on buddypress.

    Is there a way to set the quality of the avatar when cropiing/resizing?


    3T_MJ
    Participant

    @3t_mj

    Not sure if the problem is image size related or if it’s the compression set for buddypress. The crop preview looks much better than the final avatar pic! Any thoughts how to solve this?


    3T_MJ
    Participant

    @3t_mj

    @danbp: I just want to display the total number of the given post types combined. I haven’t implemented it to the activities yet but to my understanding it should be displayed indepently from the activity setup, shouldn’t it? It works for the header correctly.


    @shanebp
    : I haven’t tested your version yet. What do you mean with your-lang-domain? My website is only written in english, is it necessary then?


    3T_MJ
    Participant

    @3t_mj

    @danbp unfortunately this doesn’t make any difference. I tried different priorities but custom post type posts still don’t get counted.


    3T_MJ
    Participant

    @3t_mj

    @henrywright but apparently I need to use bp_setup_nav to add a navigation tab. I don’t understand why bp_setup_nav doesn’t let me to count custom post types.


    3T_MJ
    Participant

    @3t_mj

    OK, it was my fault, had some other error in my css file. Thx helping me out.


    3T_MJ
    Participant

    @3t_mj

    If this solution works for everyone else, Maybe there’s another mistake somewhere. I will check.


    3T_MJ
    Participant

    @3t_mj

    I read this thread but as I just said before, I need a div container just wrapping the iframe. But I don’t know how to achieve this.

    If I add the css generally to the div of the activity stream images and posts with any embeds aren’t displayed correctly anymore. If I don’t add css to the div, just to the iframe the videos get cut off.


    3T_MJ
    Participant

    @3t_mj

    Sorry for my late reply. It works perfectly.

    Not sure if it is possible but is there a way to show all published posts and make it paginated instead of showing only a certain number of postst?


    3T_MJ
    Participant

    @3t_mj

    I’m still stuck. I am able to generate main tabs showing the content I want but I don’t know how to maike this work having a common main tab and showing the content in sub tabs of the main tab.

    That’s the code for the main tabs that’s working for me:

    function bpfr_get_post() {
    	
    	/*
    	 * to get all post, comment the line 'author'
    	 */
    	$myposts = get_posts(  array(
    	'posts_per_page' => 25, // set the number of post to show
    	'author'         => bp_displayed_user_id(), // show only this member post
    	'post_type'      => 'post',
    	'orderby'          => 'post_date',
    	'order'            => 'DESC',
    	'post_status'      => 'publish'
    	));
    	
    	if( ! empty( $myposts ) ) { 
    
    		
    		foreach($myposts as $post) {
    			setup_postdata( $post );
    			$page_object = get_post( $post );			
    			
    			/* 
    			 * uncomment next line to show only a list of titles linked to full post
    			 * if you uncomment, you have to comment the 2 echo below
    			 */
    			
    		echo '<div><div class="tab-item-thumbnail" style="float:left;padding-right:5px;"><a href="' . get_permalink($post->ID) . '">' . get_the_post_thumbnail($post->ID, array( 25, 25) ) . '</a></div><div class="tab-item-inner group"><p><a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a></p></div></div>';			
    			
    			/*
    			 * comment the 2 following echo (or remove them) if you use the above
    			 */
    			
    		 // echo '<h3 class="profile_post">'. $page_object->post_title .'</h3>';
    		 // echo $page_object->post_content;
    		}
    
    		
    		wp_reset_postdata();	
    
    	} else { 
    		
    		echo '<div class="info" id="message">No posts to show actually.</div>';
    	}
    }
    add_action ( 'my_profile_post', 'bpfr_get_post' );
    
    function bpfr_post_profile_setup_nav() {
    	global $bp;
    	$parent_slug = 'contributions';
    	$child_slug = 'posts';	
    	
    	bp_core_new_nav_item( array(
    	'name' => __( 'Posts' ),
    	'slug' => $parent_slug,
    	'screen_function' => 'bpfr_profile_post_screen',
    	'position' => 40,
    	'default_subnav_slug' => $child_slug 
    	) );
    	
    	//Add subnav item 	 
    	bp_core_new_subnav_item( array( 
    	'name' => __( 'Latest posts' ), 
    	'slug' => $child_slug, 
    	'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', 
    	'parent_slug' => $parent_slug, 
    	'screen_function' => 'bpfr_profile_post_screen'
    	) );
    }
    
    function bpfr_profile_post_screen() {	
    	add_action( 'bp_template_content', 'bpfr_profile_post_screen_content' );
    	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    }
    
    function bpfr_profile_post_screen_content() {
    	do_action( my_profile_post);
    }
    
    add_action( 'bp_setup_nav', 'bpfr_post_profile_setup_nav' );
    
    function bpfr_get_image() {
    	
    	/*
    	 * to get all post, comment the line 'author'
    	 */
    	$myimages = get_posts(  array(
    	'posts_per_page' => 25, // set the number of post to show
    	'author'         => bp_displayed_user_id(), // show only this member post
    	'post_type'      => 'image',
    	'orderby'          => 'post_date',
    	'order'            => 'DESC',
    	'post_status'      => 'publish'
    	));
    	
    	if( ! empty( $myimages ) ) { 
    		
    		foreach($myimages as $post) {
    			setup_postdata( $post );
    			$page_object = get_post( $post );			
    			
    			/* 
    			 * uncomment next line to show only a list of titles linked to full post
    			 * if you uncomment, you have to comment the 2 echo below
    			 */
    			
    		echo '<a href="' . get_permalink($post->ID) . '">' . get_the_post_thumbnail($post->ID, array( 75, 75)) . '</a>';			
    			
    			/*
    			 * comment the 2 following echo (or remove them) if you use the above
    			 */
    			
    		 // echo '<h3 class="profile_post">'. $page_object->post_title .'</h3>';
    		 // echo $page_object->post_content;
    		}	
    		
    		wp_reset_postdata();	
    	} else { 
    		
    		echo '<div class="info" id="message">No images to show actually.</div>';
    	}
    }
    add_action ( 'my_profile_image', 'bpfr_get_image' );
    
    function bpfr_image_profile_setup_nav() {
    	global $bp;
    	$parent_slug = 'images';
    	$child_slug = 'images_sub';	
    	
    	bp_core_new_nav_item( array(
    	'name' => __( 'Images' ),
    	'slug' => $parent_slug,
    	'screen_function' => 'bpfr_profile_image_screen',
    	'position' => 50,
    	'default_subnav_slug' => $child_slug 
    	) );
    	
    	//Add subnav item 	 
    	bp_core_new_subnav_item( array( 
    	'name' => __( 'Latest Images' ), 
    	'slug' => $child_slug, 
    	'parent_url' => $bp->loggedin_user->domain . $parent_slug.'/', 
    	'parent_slug' => $parent_slug, 
    	'screen_function' => 'bpfr_profile_image_screen'
    	) );
    }
    
    function bpfr_profile_image_screen() {	
    	add_action( 'bp_template_content', 'bpfr_profile_image_screen_content' );
    	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    }
    
    function bpfr_profile_image_screen_content() {
    	do_action( my_profile_image);
    }
    
    add_action( 'bp_setup_nav', 'bpfr_image_profile_setup_nav' );

    Hope someone can help me.


    3T_MJ
    Participant

    @3t_mj

    Unfortunately this doesn’t help me much. Because I will have both blog and activity comments on my site. I find it confusing for the members if the latest and top comments have to appear devided in two different plugins. I was hoping there would be a solution to combine both types of comments at one place.


    3T_MJ
    Participant

    @3t_mj

    That’s exactly where I put it. I really don’t understand why this causes a problem.

Viewing 13 replies - 1 through 13 (of 13 total)
Skip to toolbar