Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activity, Groups Cluttered?

  • @scotm

    Participant

    Is it just me or does BuddyPress create a very cluttered stream of content for Activity and Groups? For example, when posting an update in a Group, I’m not sure BP needs to provide the details of that update directly above the update itself: ‘eg. admin posted an update in the group buddypress 1 second ago’

    Why not simply:

    admin: this is my post

    1 second ago

    I find Groups even more convoluted and not very reader friendly. Facebook, for example, has a much cleaner activity stream that is ideal for quick scanning.

    Has anyone tried any alternate formatting for these activity streams?

    Thx

Viewing 17 replies - 1 through 17 (of 17 total)
  • @cnorris23

    Participant

    I haven’t tried anything, but I did see some filters that would allow this sort of thing to take place.

    @modemlooper

    Moderator

    Facebook only shows updates in it’s group activity streams. I think they should get rid of the non filtered group filter and start out with just updates.

    @apeatling

    Keymaster

    This is something you can adjust to your own tastes via filters. The default output is never going to please everyone.

    @modemlooper

    Moderator

    Andy, can you give a code example on how to do this?

    @nuprn1

    Participant

    for groups – crack open bp-groups.php and search for each instance of groups_record_activity and you’ll see certain filters on the action/content

    ie

    'action' => apply_filters( 'groups_activity_new_update_action', $activity_action ),
    'content' => apply_filters( 'groups_activity_new_update_content', $activity_content ),

    @boonebgorges

    Keymaster

    @modemlooper @scotm – Check out the Filtering Options at https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/. For example, if you want the main site activity stream to show only updates, use something like this in functions.php of your theme:

    function my_custom_query_filter( $query_string ) {
    global $bp;
    if ( bp_is_activity_component() && !$bp->displayed_user->id )
    $query_string .= '&action=activity_update';

    return $query_string;
    }
    add_filter( 'bp_dtheme_ajax_querystring', 'my_custom_query_filter' );

    Play around with that conditional statement and the query string arguments to make the activity stream show what you want it to show.

    @hnla

    Participant

    If we’re talking cluttered, something that has been pointed out to me is that comments made to updates from the activity stream (and also other types of data) are displayed in full, if a comment is rather verbose it can tend to mean that that one piece of activity can tend to knock all else of the screen, I was looking at filters to find whether there is a means of truncating display, but find the documentation on what filters are available a little sparse? I looked through the WP codex to see what is involved in writing a custom filter if that is the way I would have to proceed?

    @nuprn1

    Participant

    you could use bp_create_excerpt to truncate the messages (either before they are saved – see my post above or when pulled out in the theme)

    @hnla

    Participant

    Ah that sounds like what I need must have missed that looking through codex; thanks.

    @scotm

    Participant

    Awesome feedback…will try some of these suggestions.

    @scotm

    Participant

    @Boone

    Tried your example to limit activity to just updates but it’s not working in my install. (wpmu 2.92 and bp 1.2.3 with child theme)

    @boonebgorges

    Keymaster

    @scotm – Hm, I have a dev environment just like that and it works fine. Maybe in a bp-custom file instead. Create a file called bp-custom.php in your plugins directory. Make sure you have php delimiters at the beginning and end of the file, and put the code above in between them. So the whole file would be:

    <?php
    function my_custom_query_filter( $query_string ) {
    global $bp;
    if ( bp_is_activity_component() && !$bp->displayed_user->id )
    $query_string .= '&action=activity_update';

    return $query_string;
    }
    add_filter( 'bp_dtheme_ajax_querystring', 'my_custom_query_filter' );
    ?>

    @scotm

    Participant

    @Boone

    White screen of death. :)

    @boonebgorges

    Keymaster

    Yikes. Make sure you’ve taken it out of the functions.php file. The same function name cant exist in two places.

    @scotm

    Participant

    Yeah I’ve done that…it’s not the issue.

    @boonebgorges

    Keymaster

    Hmmmm…so you’re saying that a plugins/bp-custom.php file with only that as the content whitescreens an installation that works perfectly without it? Are you sure you copied over the opening/closing delimiters? Or have you duplicated them maybe? I’ve tested it on three different installations and it’s working on all of them. (Sorry for the problems btw!)

    @scotm

    Participant

    I’ll try again…

Viewing 17 replies - 1 through 17 (of 17 total)
  • The topic ‘Activity, Groups Cluttered?’ is closed to new replies.
Skip to toolbar