BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 24697

    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: 24697

    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: 24697

    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: 24697

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 24697

    Hi Anders,
    Welcome to BuddyDev forum.

    Thank you for asking this. There is a catch and that’s why We haven’t implemented it. If we implement it in simple ways, Admins may reset the preference for the existing users(who already updated).

    Is that ok? We want to go with all or nothing approach to use simple sql update. If we start checking for user preference and then updating, It will be a very resource consuming operations.

    If the all or nothing approach is fine, please let me know and we will have it implemented.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24697

    Hi Devin,
    1. Please upgrade to simple front end post plugin version 1.2.2

    2. Please put the following code in your bp-custom.php

    
    
    add_filter( 'buddyblog_post_form_settings', 'buddyblog_show_custom_cats', 100 );
    
    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
    	);
    	
    	$settings['tax'] = $tax;
    	
    	return $settings;
    }
    

    Change the vale of child_of with the actual ID of your “User Blog” category.

    That will show the dropdown list on Post Create/edit. will work for any level deep.

    Now, to show the category parents, Please make sure you copy wp-content/plugins/buddyblog/template/buddyblog folder to your theme. So, now you have yourtheme/buddyblog folder where three files are there. These files are used to display the BuddyBlog post etc on user profile.

    Now, check for the file/code that generates link to category. In that file, you will see code like this

    
    get_the_category_list( ', '  )
    

    Please change that to

    
    get_the_category_list( ', ','single' ) )
    

    After that, try posting and see if it works. Please do let me know how it went for you.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24697

    And to achieve what I said in my last post will be as simple as changing

    
    get_the_category_list( ', ')
    
    

    to

    
    get_the_category_list( ', ','single' )
    

    in our post listing template

  • Keymaster
    (BuddyDev Team)
    Posts: 24697

    Hi Devin,
    I have got the first case working. I had to modify the simple front end post plugin slight to accommodate child_of argument for taxonomy.

    I have a question about your last requirement. Why not we just assign the child selected category only to the post and while listing, we list from that child to the top level.

    A post in any child category of a category will also appear in the archive of the parent category of the selected category, so that is never a problem.

  • Keymaster
    (BuddyDev Team)
    Posts: 24697

    Hi Maelga,
    The delete and edit are not capabilities.

    Please take a look at this page for using the proper capabilities.
    https://codex.wordpress.org/Roles_and_Capabilities#delete_posts

    It should be edit_posts and delete_posts. Also, if your custom post type is mapping the capability, in that case, you may need to use the mapped capability. Please try the edit_posts and delete_posts and see if that works.

  • Keymaster
    (BuddyDev Team)
    Posts: 24697

    Hi Devin,
    Welcome to the BuddyDev forum and thank you for Buying the support.

    Your details and very clear and concise. If I understand correctly, all we need to do is allow the users to select from sub category of the User blogs and when the post is saved assign the sub category as well as parent category?

    If that is correct, please give me a couple of hours and I will post the code.

    PS: We are phasing out all other support channels in favor of this support forum.