BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25218
    Brajesh Singh on in reply to: [Resolved] BP Simple Front End Post Form #3544

    Hi Leo,
    I am sorry. Ravi will be back tomorrow.
    I had a look at the above code and I see that Ravi missed to post the last line.

    Please add this line

    
    $form->show();
    

    after this

    
    $form = bp_get_simple_blog_post_form( $form_id );
    

    That should work.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25218
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25218

    Hi Andrew,
    Can you please point me to your registration page. I will be in a much better position to help you if I can see the fields.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25218

    Hi Phil,
    Please use the following code to assign a default category.

    
    
    //set default categorywhen post is being saved
    function bcg_set_default_category_to_post( $post_id ) {
    	
    	$post = get_post( $post_id );
    	
    	if ( ! $post ) {
    		return ;
    	}
    	
    	$terms = wp_get_object_terms( $post_id, 'category' );
    	
    	if ( empty( $terms ) || ( count( $terms ) == 1 && $terms[0]->term_id == 1 ) ) {
    		
    		$term_id = 32;//please change it with the default term you want to assign
    		
    		wp_set_object_terms( $post->ID, $term_id, 'category' );
    		
    	}
    	
    }
    
    add_action( 'bsfep_post_saved', 'bcg_set_default_category_to_post' );
    
    

    Please make sure to change $term_id to your choice of default term id.

    Hope that helps

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25218

    Closing it as resolved due to lack of reply. Please feel free to reopen if you need further assistance.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25218

    Hi Phil,
    Ravi will be away for the weekend. I will post the code tonight.
    It is a quick fix and not any paid service.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25218

    A solution may be deleting the automatically created activity based on tags, but I am not sure if that will be appropriate.

  • Keymaster
    (BuddyDev Team)
    Posts: 25218

    Hi Jan,
    I am sorry about this.
    There are two issues:-
    1. I do not understand the requirement using tags. Are these tags, post tags?

    2. The posting to activity for simple posts are governed by the Blog Tracking settings. We can not do much there. It is either all or none. You can see it in your BuddyPress Settings-> Components screen.

    I am sorry about that but I may not be able to help much here. It is either all enabled or none.

  • Keymaster
    (BuddyDev Team)
    Posts: 25218
    Brajesh Singh on in reply to: Buddypress – Hiding or removing the username #3531

    Hi Tina,
    Welcome to BuddyDev.

    I may not have understood your requirement completely, but here is what you can do. Please put the following code in bp-custom.php

    1. Change @ name to display name for logged in/displayed user

    
    
    function buddydev_show_fullname_for_displayed_user( $username ) {
    	return bp_get_displayed_user_fullname();
    }
    add_filter( 'bp_get_displayed_user_username', 'buddydev_show_fullname_for_displayed_user' );
    
    function buddydev_show_fullname_for_loggedin_user( $username ) {
    	return bp_loggedin_user_fullname();
    }
    add_filter( 'bp_get_loggedin_user_username', 'buddydev_show_fullname_for_loggedin_user' );
    
    

    2. Change the label username to User Login

    
    //this is a bad idea, use translation instead
    function buddydev_change_login_labels( $translated_text, $text, $domain ) {
    	
    	if ( $text =='Username' ) {
    		$translated_text = 'User Login';
    	}
    	
    	return $translated_text;
    }
    add_filter( 'gettext', 'buddydev_change_login_labels', 20, 3 );
    
    

    For your 3rd step, I believe that is not required. Any number of people can have same name and will use it for display name. So, I don’t think that is a good idea.

    Hope that helps.
    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25218

    Hi Dandy,
    Thank you for the details.

    There are no available solutions for this and you will need to add it manually. I will suggest creating a map from keyword to image and then using some image hover popup script to display that.

    Regards
    Brajesh