Skip to:
Content

BuddyPress.org

Changeset 2485 for trunk/bp-activity.php


Ignore:
Timestamp:
01/31/2010 09:45:19 AM (14 years ago)
Author:
apeatling
Message:

Improved noscript support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r2471 r2485  
    107107    bp_core_new_nav_item( array( 'name' => __( 'Activity', 'buddypress' ), 'slug' => $bp->activity->slug, 'position' => 10, 'screen_function' => 'bp_activity_screen_my_activity', 'default_subnav_slug' => 'just-me', 'item_css_id' => $bp->activity->id ) );
    108108
    109     $activity_link = $bp->loggedin_user->domain . $bp->activity->slug . '/';
     109    $activity_link = $bp->displayed_user->domain . $bp->activity->slug . '/';
    110110
    111111    /* Add the subnav items to the activity nav item if we are using a theme that supports this */
    112     bp_core_new_subnav_item( array( 'name' => __( 'Just Me', 'buddypress' ), 'slug' => 'just-me', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_my_activity', 'position' => 10 ) );
    113     bp_core_new_subnav_item( array( 'name' => __( 'My Friends', 'buddypress' ), 'slug' => 'my-friends', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_friends_activity', 'position' => 20, 'item_css_id' => 'activity-my-friends' ) );
     112    bp_core_new_subnav_item( array( 'name' => __( 'Personal', 'buddypress' ), 'slug' => 'just-me', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_my_activity', 'position' => 10 ) );
     113    bp_core_new_subnav_item( array( 'name' => __( 'Friends', 'buddypress' ), 'slug' => 'friends', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_friends', 'position' => 20, 'item_css_id' => 'activity-friends' ) );
     114    bp_core_new_subnav_item( array( 'name' => __( 'Groups', 'buddypress' ), 'slug' => 'groups', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_groups', 'position' => 30, 'item_css_id' => 'activity-groups' ) );
     115    bp_core_new_subnav_item( array( 'name' => __( 'Favorites', 'buddypress' ), 'slug' => 'favorites', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_favorites', 'position' => 40, 'item_css_id' => 'activity-favs' ) );
     116    bp_core_new_subnav_item( array( 'name' => sprintf( __( '@%s Mentions', 'buddypress' ), $bp->displayed_user->userdata->user_login ), 'slug' => 'mentions', 'parent_url' => $activity_link, 'parent_slug' => $bp->activity->slug, 'screen_function' => 'bp_activity_screen_mentions', 'position' => 50, 'item_css_id' => 'activity-mentions' ) );
    114117
    115118    if ( $bp->current_component == $bp->activity->slug ) {
     
    153156}
    154157
    155 function bp_activity_screen_friends_activity() {
    156     global $bp;
    157 
    158     /* Make sure delete links do not show for friends activity items */
     158function bp_activity_screen_friends() {
     159    global $bp;
     160
     161    if ( bp_is_deactivated( 'bp-friends.php' ) )
     162        return false;
     163
    159164    if ( !is_site_admin() )
    160165        $bp->is_item_admin = false;
    161166
    162     do_action( 'bp_activity_screen_friends_activity' );
    163     bp_core_load_template( apply_filters( 'bp_activity_template_friends_activity', 'activity/my-friends' ) );
     167    do_action( 'bp_activity_screen_friends' );
     168    bp_core_load_template( apply_filters( 'bp_activity_template_friends_activity', 'members/single/home' ) );
     169}
     170
     171function bp_activity_screen_groups() {
     172    global $bp;
     173
     174    if ( bp_is_deactivated( 'bp-groups.php' ) )
     175        return false;
     176
     177    if ( !is_site_admin() )
     178        $bp->is_item_admin = false;
     179
     180    do_action( 'bp_activity_screen_groups' );
     181    bp_core_load_template( apply_filters( 'bp_activity_template_groups_activity', 'members/single/home' ) );
     182}
     183
     184function bp_activity_screen_favorites() {
     185    global $bp;
     186
     187    if ( !is_site_admin() )
     188        $bp->is_item_admin = false;
     189
     190    do_action( 'bp_activity_screen_favorites' );
     191    bp_core_load_template( apply_filters( 'bp_activity_template_favorite_activity', 'members/single/home' ) );
     192}
     193
     194function bp_activity_screen_mentions() {
     195    global $bp;
     196
     197    if ( !is_site_admin() )
     198        $bp->is_item_admin = false;
     199
     200    do_action( 'bp_activity_screen_mentions' );
     201    bp_core_load_template( apply_filters( 'bp_activity_template_mention_activity', 'members/single/home' ) );
    164202}
    165203
     
    345383    global $bp, $wp_query;
    346384
    347     if ( $bp->current_component != $bp->activity->slug || !$bp->displayed_user->id || $bp->current_action != 'my-friends' || $bp->action_variables[0] != 'feed' )
     385    if ( $bp->current_component != $bp->activity->slug || !$bp->displayed_user->id || $bp->current_action != 'friends' || $bp->action_variables[0] != 'feed' )
    348386        return false;
    349387
     
    359397    global $bp, $wp_query;
    360398
    361     if ( $bp->current_component != $bp->activity->slug || !$bp->displayed_user->id || $bp->current_action != 'my-groups' || $bp->action_variables[0] != 'feed' )
     399    if ( $bp->current_component != $bp->activity->slug || !$bp->displayed_user->id || $bp->current_action != 'groups' || $bp->action_variables[0] != 'feed' )
    362400        return false;
    363401
Note: See TracChangeset for help on using the changeset viewer.