Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activity, Groups Cluttered?

  • Avatar of Scotm
    Scotm
    Participant

    @scotm

    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)
  • Avatar of Brandon Allen
    Brandon Allen
    Participant

    @cnorris23

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

    Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

    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.

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

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

    Avatar of @modemlooper
    @modemlooper
    Moderator

    @modemlooper

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

    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 ),

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    @modemlooper @scotm – Check out the Filtering Options at http://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.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    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?

    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)

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

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

    Avatar of Scotm
    Scotm
    Participant

    @scotm

    Awesome feedback…will try some of these suggestions.

    Avatar of Scotm
    Scotm
    Participant

    @scotm

    @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)

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    @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' );
    ?>

    Avatar of Scotm
    Scotm
    Participant

    @scotm

    @Boone

    White screen of death. :)

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

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

    Avatar of Scotm
    Scotm
    Participant

    @scotm

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

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    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!)

    Avatar of Scotm
    Scotm
    Participant

    @scotm

    I’ll try again…

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

You must be logged in to reply to this topic.