Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 17 replies - 1 through 17 (of 17 total)
  • Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    Hi, is there any solution to translate the title off buddypress pages until this bug is resolved?

    Thanks and best regards

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    BUMP
    I have same problem

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    just call bp_loggedin_user_avatar fuction, it print html code of the avatar (without echo)

    bp_loggedin_user_avatar( ‘type=full&width=150&height=150′ );

    Hi @meg@info,

    This only works in activity or profile page. In wordpress pages not load the avatar.

    Greetings

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    I know the problem: is the WPUF plugin. Now, the developer send me the solution:

    function wpufe_modify_bp_activity( $post_id ) {
        global $wpdb, $user_ID;
     
        //get the last inserted activity
        $activity = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}bp_activity WHERE secondary_item_id = $post_id AND user_id = $user_ID");
     
        // if activity found, update the activity with custom field
        if ( $activity ) {
            $content = $activity->content . '... Custom Field: ' . get_post_meta( $post_id, 'custom_field', true );
     
            $wpdb->update(
                $wpdb->prefix . 'bp_activity',
                array( 'content' => $content ),
                array( 'id' => $activity->id )
            );
        }
    }
     
    add_action( 'wpuf_add_post_after_insert', 'wpufe_modify_bp_activity' );

    http://wedevs.com/support/topic/custom-fields-in-budypress-activity-content/#post-5889

    Greetings

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    I think the problem is that i can’t get the post id. I tried with this code and it works:
    return get_post_meta(577, 'txt_link', true).'This1';

    I tried in many ways but I cant get the post-id to work with bp_blogs_activity_new_post_content filter

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    Hi, I simplify the code and get same result: the text “this yes” appears, and the custom-field not.

    add_filter( 'bp_blogs_activity_new_post_content', 'record_post_activity_content' );
    function record_post_activity_content(){
          return get_post_meta($post->ID, 'txt_link', true).'this yes';
    }	
    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    @boonebgorges,

    With this code I have NO results:

    function test1(){
    	global $post;
    	$test_customfield = get_post_meta($post->ID, 'txt_documento', true);		
    	return $test_customfield;
    	}
    	
    //function test1( $the_post ) {
    //    $post_id = $the_post->ID;
    //}
    
    function record_post_activity_content($activity_content, $post, $post_permalink ){
        if( $post->post_type == 'post' ) {
        	$not = var_dump( $test_customfield );
    		$activity_content = $not.'this yes';
        }
            return $activity_content;
    }
    add_filter( 'bp_blogs_activity_new_post_content', 'record_post_activity_content',1, 3 );

    But I’ve tested this another code and the result is “NULL”:

    add_action( 'genesis_post_content', 'custom_field_in_content' );
    function custom_field_in_content() {
    if ( in_category('documentos') ) {
    	$ay = var_dump( $test_customfield );
    	echo $ay;
    	}else {
    	}	
    }

    I cant find the problem. Thanks for all your support

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    @boonebgorges YES it works!!!

    But when I tried to show a custom-field stops working. This is my example code:

    function test1(){
    	global $post;
    	$test_customfield = get_post_meta($post->ID, 'txt_documento', true);		
    	return $test_customfield;	
    	}
    
    function record_post_activity_content($activity_content, $post, $post_permalink ){
        if( $post->post_type == 'post' ) {
        	$not = test1();
    		$activity_content = $not.'this yes';
        }
            return $activity_content;
    }
    add_filter( 'bp_blogs_activity_new_post_content', 'record_post_activity_content',1, 3 );

    Thanks!

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    @frequeunce, I think that have one comment thread for post and another comment thread for activity is confusing for users. I would hope that another buddypress user can solve this.

    Greetings

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    BUMP

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    @parakeet yes, I am also confused

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    @andrewgtibbetts do you publish he plugin?

    Thanks

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    I’ve found a solution, deleting this in functions.php:

    define ( ‘BP_ENABLE_ROOT_PROFILES’, true );

    It’s a shame that root permalinks not work. There is another way to set it?

    Thanks

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    Thanks @mercime,

    My goal is to eliminate the buddypress-activity-post-form and replace it with a frontend-post with the capability of publish “asides” format post.

    I don’t know if this modification can generate a problem.

    Thanks

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    Excelent!! Thanks :D

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    Hi, So how do I can use the function out of their component?

    Today I’m tried to create a navbar with name and thumbnail of the user.

    Thanks

    Avatar of ggsalas
    ggsalas
    Participant

    @ggsalas

    Hi, I find this plugin

    http://wordpress.org/support/plugin/buddypress-group-folders

    But i find something with more support, for professional support

    Thanks

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