New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi PresPhuture,
    Thank you for posting.
    Yes, it is possible to control which category/tags are shown

    
    
    /**
     * Filter the BuddyBlog form settings and limit category/tag inclusion.
     *
     * @param array $settings settings array.
     *
     * @return array
     */
    function buddydev_filter_buddyblog_form_settings( $settings ) {
    
    	$tax                        = isset( $settings['tax'] ) ? $settings['tax'] : array();
    	$tax['category']['include'] = array( 1, 2, 3 );// category ids to include.
    	$tax['post_tag']['include'] = array( 5, 7, 9 );// tag ids to include.
    
    	$settings['tax'] = $tax;
    
    	return $settings;
    }
    
    add_filter( 'buddyblog_post_form_settings', 'buddydev_filter_buddyblog_form_settings' );
    
    

    Please change the ids with your own. It will only list the category tags with those ids. I hope you can modify it form there on.

    Hope that helps.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: Debug issue list. Please update #12253

    Thank you. Please allow me to check for the Live notifications. Some of the legacy plugins may have notices.

    I appreciate you taking time to report and hep us fix it.

    regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Ekiz,
    I see the problem. You are using ordered list while the code I posted allowed unordered list. I have updated the code to allow ordered list too now

    
    /**
     * Add remove filters to allow more tags.
     */
    function buddydev_add_remove_group_desc_filters() {
    	remove_filter( 'groups_group_description_before_save', 'wp_filter_kses', 1 );
    	add_filter( 'groups_group_description_before_save', 'bp_groups_filter_kses', 1 );
    }
    
    add_action( 'bp_loaded', 'buddydev_add_remove_group_desc_filters');
    
    /**
     * Allow extra tags in group description.
     *
     * @param $tags
     *
     * @return mixed
     */
    function buddydev_allow_extra_group_desc_tags( $tags ) {
        $tags['ul'] = array();
        $tags['ol'] = array();
        $tags['li'] = array();
        $tags['strong'] = array();
        $tags['b'] = array();
        return $tags;
    }
    add_filter( 'bp_groups_filter_kses', 'buddydev_allow_extra_group_desc_tags' );
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Graham,
    There is no error with your code. Are you getting any fatal error or notice from the site after updating this code? You may ignore the editor warning. I don’t see any warning while using PHPStorm. which editor it is?

    Regards
    Brajesh

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

    Hi Beuza,
    It’s strange but quiet possible as we are moving the handlers and all.

    I was trying to avoid settings up it on local as I will need to recreate the whole thing, so Yes, It will be nice if you can give me an account who has the requests pending.

    Regards
    Brajesh

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

    Hi,
    Yes, I too noted it. It seems the google doc viewer has somehow restricted the viewing of zip.

    I am going to put an update in next 1-2 days where zip files won’t be available as view able but just as an attachment.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Graham,
    Ravi has used Nowdoc style string which is very sensitive to the use of spaces/newlines etc. That’s why I wanted to see a copy.

    You don’t need to have an account to post on pastebin(It asks to fill a captcha)

    When you are back, Please do provide me access to it somehow if not using pastebin.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Graham,
    Did you by any chance remove

    
    MAINCONTENT;
    

    on the last line?

    If feasible, please post the modified code on pastebin and link.

    Thank you
    Brajesh