Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Michel,
    I have pushed the update on wp.org. It will give you the option to limit content with number of words.

    If you limit the content, It won’t show any image. All tags are stripped.

    Please let me know if that works for you or not?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Michel,
    The CSS needed will only affect the SWA widget. We can specifically target the selectors, so that should not cause any problem.

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Michel
    Thank you for the reply.

    I went ahead with refactoring the SWA plugin so that we won’t have to worry about it next 2 years anymore.

    I will put it anytime today. I am not sure If we need to put a filter for images but I will see. The images can be hidden case by case using css.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Anders,
    Just updating. Have been doing some update and we will have this ready for you in next 12 hours or so.

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Devin,

    1. to set a default category when the user does not choose it

    
    
    add_action( 'bsfep_post_saved', 'buddydev_add_default_category_to_post' );
    function buddydev_add_default_category_to_post( $post_id ) {
        
    	$tax = array_filter( $_POST['tax_input'] );
    	
    	if( empty( $tax ) && $post_id ) {
    		//no category was set
    		$term = 32;//ID
    		wp_set_object_terms( $post_id, $term, 'category' );
    		
    	}
        
    
    }
    
    

    Change the value of term with the ID of the category you want to assign.

    2. To Order the list display, I am sorry but that will need another update for simple front end post. you can download it from the site now. and then, as in my previous replies, I had posted the code for modifying setting, here is updated version of that

    
    function buddyblog_show_custom_cats( $settings ) {
    	$tax = array();
    	 
    	$tax['category'] = array(
    
    		'taxonomy'		=> 'category',
    		'view_type'		=> 'dd',
    		'child_of'		=> 29, //CHAGE It with the correct ID,
    		'orderby'		=> 'slug',
    		'order'			=> 'ASC'
    	);
    	
    	$settings['tax'] = $tax;
    	
    	return $settings;
    }
    
    

    Hope that helps.

    Please do let me know how it went for you.

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Anders,
    I am sorry but I won’t be able to have the second option included in today’s upgrade. To make that efficient, It will need time to implement.

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Devin,
    Thank you.
    I am glad that it did work 🙂

    1. That is doable, we will need to use some code to do that

    2. Yes, it is doable too. We are using wp_dropdown_categories() which allows us to sort by ID,Name,slug in ascending or descending order. which order you want?

    Please let me know and I will put the code 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Anders,
    Thank you. I will have this option today 🙂

    About the 2nd option, That depends on the size of the community. If there are 1000 users, It is not too much but if there are 100,000 users, then It will take a lot of time as we will have to check the preference for individual users if it is set or not and then update.

    If we plan to implement it in future, It will be all about time as PHP scripts have time limit, the update will be like doing it in batches. So, It is not going to consume all resources but take a lot of time for the larger community.

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Michel,
    Welcome to BuddyDev Forums.

    I just looked at the pdf an I see you just want to shorten the displayed activity content.

    At the moment, SWA uses normal BuddyPress ‘bp_activity_content_body’ method and we can filter on

    
    
    bp_get_activity_content_body
    
    

    The problem with this approach is we are not sure if the output is being generated by the BuddyPress or the SWA.

    I think, SWA needs an update to cleanup the code too, so please allow me upto 8-12 hours and I will have this available as an option in the widget itself.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25365

    Hi Hans,
    Can you please open a new topic with enhancement. Let us leave this topic for Delyth.

    I have added some enhancement 2-3 days ago to the plugin and will be happy to continue doing that 🙂

    Thank you
    Brajesh