Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing ”display_comments” Value in profile/activity/friends/ to ”stream”


  • sicksight
    Participant

    @sicksight

    Hey!

    I’m back again with a new job! :) I would like to activate “stream” as a display option in the activities of my friends in my profile. I hope you know what I mean …?

    I tried with this code in my functions.php, but had no success so far …:
    `
    function tf_threaded_or_stream( $display_comments ) {
    global $bp, $activities_template;

    if ( ‘friends’ == $bp->current_action )
    $display_comments = ‘stream’;

    return $display_comments;
    }
    add_filter( ‘bp_has_activities’, ‘tf_threaded_or_stream’ );
    `

    Maybe someone has a solution, or a tip how I can filter the function “bp_has_activities” correctly?

    SickSight

Viewing 2 replies - 1 through 2 (of 2 total)

  • sicksight
    Participant

    @sicksight

    Nobody? oO


    Roger Coathup
    Participant

    @rogercoathup

    I’m not 100% sure what you are trying to achieve. Do you want to add an extra filtering option on the activity list? This will involve some UI work as well as a call to bp_has_activities() template tag.

    I think you might be getting confused between the bp_has_activities() template tag, and the bp_has_activities hook / filter.

    It’s the template tag bp_has_activities() that lets you set ‘display_comments=stream’ as a parameter. I think you want to working with this template tag, and not the filter.

    As a filter bp_has_activities accepts 2 parameters which you would then have to work with and modify (the list of activities, and a reference to the activities template).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing ”display_comments” Value in profile/activity/friends/ to ”stream”’ is closed to new replies.
Skip to toolbar