'first-section', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebars( 1, array( 'name' => 'second-section', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebars( 1, array( 'name' => 'third-section', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebars( 1, array( 'name' => 'blog-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); /* Load the AJAX functions for the theme */ require_once( TEMPLATEPATH . '/_inc/ajax.php' ); /* Load the javascript for the theme */ wp_enqueue_script( 'jquery-livequery-pack', get_template_directory_uri() . '/_inc/js/jquery-livequery.js', array( 'jquery' ) ); wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/js/ajax.js', array( 'jquery', 'jquery-livequery-pack' ) ); /* Make sure the blog index page shows under /[HOME_BLOG_SLUG] if enabled */ function bp_dtheme_show_home_blog() { global $bp, $query_string, $paged; if ( $bp->current_component == BP_HOME_BLOG_SLUG && ( !$bp->current_action || 'page' == $bp->current_action ) ) { unset( $query_string ); if ( ( 'page' == $bp->current_action && $bp->action_variables[0] ) && false === strpos( $query_string, 'paged' ) ) { $query_string .= '&paged=' . $bp->action_variables[0]; $paged = $bp->action_variables[0]; } query_posts($query_string); bp_core_load_template( 'index', true ); } } add_action( 'wp', 'bp_dtheme_show_home_blog', 2 ); function bp_dtheme_firstname( $name = false, $echo = false ) { global $bp; if ( !$name ) $name = $bp->loggedin_user->fullname; $fullname = (array)explode( ' ', $name ); if ( $echo ) echo $fullname[0]; else return $fullname[0]; } /* Activity Widget */ class BP_Activity_Widget extends WP_Widget { function bp_activity_widget() { parent::WP_Widget( false, $name = __( 'Site Wide Activity', 'buddypress' ) ); if ( is_active_widget( false, false, $this->id_base ) ) wp_enqueue_script( 'activity_widget_js', BP_PLUGIN_URL . '/bp-activity/js/widget-activity.js' ); } function widget($args, $instance) { global $bp; extract( $args ); echo $before_widget; echo $before_title . $widget_name . '   ' . __( '[RSS]', 'buddypress' ) . '' . $after_title; ?>
loggedin_user->fullname ); printf( __( "What's new %s?", 'buddypress' ), $fullname[0] ) ?>
 
:
200, 'per_page' => 25 ) ); $per_page = strip_tags( $instance['per_page'] ); $max_items = strip_tags( $instance['max_items'] ); ?>

loggedin_user->id ) ) { echo "-1

" . __( 'No activity found', 'buddypress' ) . '

'; return false; } $friend_ids = implode( ',', $friend_ids ); $query_string = 'user_id=' . $friend_ids; break; case 'groups': $groups = groups_get_user_groups( $bp->loggedin_user->id ); $group_ids = implode( ',', $groups['groups'] ); $query_string = 'object=groups&primary_id=' . $group_ids; break; } /* Build the filter */ if ( $filter && $filter != '-1' ) $query_string .= '&action=' . $filter; /* Add the per_page param */ $query_string .= '&per_page=' . $per_page; } if ( bp_has_activities( $query_string . '&display_comments=threaded' ) ) : ?>

" . __( 'No activity found', 'buddypress' ) . '

'; ?>