BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #46625

    I appreciate your advice on this. It took me a while to try it.

    I have deleted basically all the content from buddypress/activity/post-form.php (in my child override directory). Now the file just looks like:

    
    
    <?php
    /**
     * BuddyPress - Activity Post Form
     *
     * @package BuddyPress
     * @subpackage bp-legacy
     * @version 3.0.0
     *
     */
    
    ?>
    
    

    This *appears* to work. Does that look right? I do need the closing ?> at the end, right?

    Mike

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #46622

    The code appears to work on my test site. I updated the bbP ticket:
    https://bbpress.trac.wordpress.org/ticket/3454#comment:2

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #46585

    Thanks Brajesh. I wasn’t sure if it was BP or bbP. Do you know if there’s a bbP track bug for it? I’ll also ask on the bbP forum. I’ll let you know if I manage to try the fix.

    Mike

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #46311

    So post-form.php should just be an empty file?

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #46301

    No, my goal is to eliminate the “what’s new” field completely.

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #44301

    Just an update – I finally did open a ticket:

    https://buddypress.trac.wordpress.org/ticket/8676

    I’m kind of a novice at this. If anyone knows how to improve it or knows any more information, please feel free to add it.

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #43947

    Hi Brajesh,

    Thank you for looking at this. I don’t feel like it’s a good idea for me to report a bug on this. At least not yet. For all I know it could be a plugin conflict or some conflict with custom code of mine. I want to gather more info first. I also have a post on the BuddyPress forum waiting for input.

    We’ll see what happens, but thanks again.

    Mike

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #42407

    Thanks very much Ravi. That definitely works on my test site. I need to spend some time understanding how the ajax stuff works exactly, but that something I need to learn.

    This have been very helpful. Once again, thank you!

    -Mike

  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #42358

    Hi Ravi,

    I would actually like to create a 2nd drop-down, as I mentioned above. However, let me try to understand what you are suggesting. I think my problem is that I don’t know how to communicate the asc and desc options to bp_ajax_querystring. When I do what you are suggesting, the “asc” or “desc” parameters show up as “type” not as “sort” when they get to bp_ajax_querystring.

    I don’t know if I’m explaining that very well 🙂

    Mike

    
    function add_order_options( $options ) {
        // If not on single user screen return default options.
        if ( ! bp_is_user() ) {
            return $options;
        }
    
        $log_me = "\nVer 8:";
        $log_me .= "\nBefore: " . json_encode($options);
    
        if ( ! isset( $options['asc'] ) ) {
            $options['asc'] = __( 'Ascending Order' );
        }
    
        if ( ! isset( $options['desc'] ) ) {
            $options['desc'] = __( 'Descending Order' );
        }
    
        $log_me .= "\nAfter: " . json_encode($options);
        error_log($log_me);
        return $options;
    }
    add_filter( 'bp_get_activity_show_filters_options', 'add_order_options');
    
    function filter_bp_aqs( $bp_aqs, $object )
    { 
        /*
        $query_sort = $_GET['sort'];
    
        if ( isset( $query_sort ) && $query_sort === 'asc' )
        $bp_aqs .= 'sort=ASC';
         */
    
        error_log('filter_bp_aqs: ' . $bp_aqs); 
        return $bp_aqs;
    }
    add_filter( 'bp_ajax_querystring', 'filter_bp_aqs', 999, 2 );
    
  • Participant
    Level: Initiated
    Posts: 11
    Mike Witt on #42343

    Hi Brajesh, the site in question uses Legacy. Thanks.