Skip to:
Content
Pages
Categories
Search
Top
Bottom

solved: activity index > my groups selected – shows all activity


  • nit3watch
    Participant

    @nit3watch

    Iv’e edited the activity index to have ‘my groups’ selected when you land on the activity page though its returning ‘all members activity’ though showing the ‘my groups’ tab is selected.

    Im a bit confused and would appreciate if some one could have a look at how I lay’d it out, and give me some insight to where im going wrong.

    Here’s the my version: http://pastebin.com/W1t8Zpnv

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

  • nit3watch
    Participant

    @nit3watch

    Im still not able to get the selected tab ( my groups ) to load when you land on the page.

    Basically what I did was swap ‘my groups’ and ‘all members’ around and changed the li class and id. Ive tried a few things but still come up empty handed.

    Here’s my entire activity.php: http://pastebin.com/jbzn7xLN

    the edits are from lines 21-27 and 39-41 ( as I said, basically swapped them around and changed the class of ‘all members’ to just the li id and added the ‘selected’ class to ‘my groups’ )


    nit3watch
    Participant

    @nit3watch

    any one? This little problem is holding up a launch :<


    Boone Gorges
    Keymaster

    @boonebgorges

    Changing the tabs is an appearance issue; it doesn’t have any effect on the activity items shown.

    Try the following function in your functions.php or bp-custom.php. The logic is this: If the query string is empty (as it is when you first visit the activity page) and there is nothing in the POST variable that says which scope to show (that is, the user has not clicked ‘All Activity’ and thus set an AJAX request into effect), then show only my group content.

    `function bbg_my_groups_activity_default( $qs ) {
    if ( empty( $qs ) && empty( $_POST ) ) {
    $qs = ‘scope=groups’;
    }

    return $qs;
    }
    add_filter( ‘bp_ajax_querystring’, ‘bbg_my_groups_activity_default’, 999 );`


    nit3watch
    Participant

    @nit3watch

    Thanks boone! And thanks for the insight of how it works. Ill give it a try when I get home


    nit3watch
    Participant

    @nit3watch

    @boonebgorges if I have ‘my groups’ selected but the member hasn’t joined any groups yet, then nothing will be selected when the member lands on the page.

    If I removed the `( bp_loggedin_user_id() )` in “ it displays the tab though will it affect any functionality?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘solved: activity index > my groups selected – shows all activity’ is closed to new replies.
Skip to toolbar