/** * widget for the community navigation * * @package Custom Community * @since 1.8.3 */ function widget_community_nav($sidebar_id = false) { ?> <?php global $cap; if ($sidebar_id == 'leftsidebar' && $cap->bg_leftsidebar_default_nav && $cap->bg_leftsidebar_default_nav == 'no') { return; } ?> <div id="community-nav" class="widget widget-title" > <h3 class="widgettitle"><?php _e('Community', 'cc'); ?> </h3> <ul class="item-list"> <?php if ('activity' != bp_dtheme_page_on_front() && bp_is_active('activity')) { ?> <li<?php if (bp_is_activity_component()) { ?> class="selected"<?php } ?> > <a href="<?php echo site_url(); ?> /<?php echo BP_ACTIVITY_SLUG; ?> /" title="<?php _e('Activity', 'cc'); ?> "><?php _e('Activity', 'cc'); ?> </a> </li> <?php } ?> <li<?php if (bp_is_members_component() || bp_is_user()) { ?> class="selected"<?php } ?> > <a href="<?php echo site_url(); ?> /<?php echo BP_MEMBERS_SLUG; ?> /" title="<?php _e('Members', 'cc'); ?> "><?php _e('Members', 'cc'); ?> </a> </li> <?php if (bp_is_active('groups')) { ?> <li<?php if (bp_is_groups_component() || bp_is_group()) { ?> class="selected"<?php } ?> > <a href="<?php echo site_url(); ?> /<?php echo BP_GROUPS_SLUG; ?> /" title="<?php _e('Groups', 'cc'); ?> "><?php _e('Groups', 'cc'); ?> </a> </li> <?php if (bp_is_active('forums') && (function_exists('bp_forums_is_installed_correctly') && !(int) bp_get_option('bp-disable-forum-directory')) && bp_forums_is_installed_correctly()) { ?> <li<?php if (bp_is_forums_component()) { ?> class="selected"<?php } ?> > <a href="<?php echo site_url(); ?> /<?php echo BP_FORUMS_SLUG; ?> /" title="<?php _e('Forums', 'cc'); ?> "><?php _e('Forums', 'cc'); ?> </a> </li> <?php } ?> <?php } ?> <?php if (bp_is_active('blogs') && is_multisite()) { ?> <li<?php if (bp_is_blogs_component()) { ?> class="selected"<?php } ?> > <a href="<?php echo site_url(); ?> /<?php echo BP_BLOGS_SLUG; ?> /" title="<?php _e('Blogs', 'cc'); ?> "><?php _e('Blogs', 'cc'); ?> </a> </li> <?php } ?> </ul> <?php if (bp_is_single_item() || bp_is_user()) { ?> <?php if (bp_is_group()) { ?> <div id="community-single-nav" class="widget-title" > <ul class="item-list"> <h3 class="widgettitle"><?php _e('@ Group', 'cc'); ?> </h3> <?php bp_get_options_nav(); ?> <?php do_action('bp_group_options_nav'); ?> </ul> </div> <?php } ?> <?php if (bp_is_user()) { ?> <div id="community-single-nav" class="widget-title" > <ul class="item-list"> <h3 class="widgettitle"><?php _e('@ Member', 'cc'); ?> </h3> <?php bp_get_displayed_user_nav(); ?> <?php do_action('bp_group_options_nav'); ?> </ul> </div> <?php } ?> <?php } ?> </div> <?php }
<?php get_header() ?> <div id="content"> <div class="padder"> <?php do_action( 'bp_before_member_home_content' ) ?> <div id="item-header"> <?php locate_template( array( 'members/single/member-header.php' ), true ) ?> </div><!-- #item-header --> <div id="item-nav"> <div class="item-list-tabs no-ajax" id="object-nav"> <ul> <?php bp_get_displayed_user_nav() ?> <?php do_action( 'bp_members_directory_member_types' ) ?> </ul> </div> </div><!-- #item-nav --> <div id="item-body"> <?php do_action( 'bp_before_member_body' ) ?> <?php if(bp_flickr_is_settings()) locate_template( array( 'flickr/settings.php' ), true ); else locate_template( array( 'flickr/flickr.php' ), true ); ?>
?> </div> <!-- #item-header --> </div> <?php } ?> <div class="col-sm-12"> <div id="item-nav"> <div class="item-list-tabs no-ajax" id="object-nav" role="navigation"> <ul class="responsive-tabs"> <?php bp_get_displayed_user_nav(); ?> <?php do_action('bp_member_options_nav'); ?> </ul> </div> </div> <!-- #item-nav --> </div> <div id="item-body" role="main" class="col-sm-12">
/** * members home: add the sidebars and their default widgets to the members header * * located: members/home.php do_action( 'bp_before_member_home_content' ) * * @package Custom Community * @since 1.8.3 */ function before_member_home_content() { global $cap; if ($cap->bp_profile_header == false || $cap->bp_profile_header == 'on' || $cap->bp_profile_header == __('on', 'cc')) { ?> <div id="item-header"> <?php if (!dynamic_sidebar('memberheader')) { ?> <?php locate_template(array('members/single/member-header.php'), true); ?> <?php } ?> <div class="clear"></div> <?php if (is_active_sidebar('memberheaderleft')) { ?> <div class="widgetarea cc-widget span4"> <?php dynamic_sidebar('memberheaderleft'); ?> </div> <?php } ?> <?php if (is_active_sidebar('memberheadercenter')) { ?> <div class="<?php if (!is_active_sidebar('memberheaderleft')) { echo 'style="group-header-left'; } ?> widgetarea cc-widget span4"> <?php dynamic_sidebar('memberheadercenter'); ?> </div> <?php } ?> <?php if (is_active_sidebar('memberheaderright')) { ?> <div class="widgetarea cc-widget cc-widget-right span4"> <?php dynamic_sidebar('memberheaderright'); ?> </div> <?php } ?> </div> <?php } else { ?> <div id="item-header"> <h2 class="fn"><a href="<?php bp_user_link(); ?> "><?php bp_displayed_user_fullname(); ?> </a> <span class="highlight">@<?php bp_displayed_user_username(); ?> <span>?</span></span></h2> </div> <?php } ?> <?php if ($cap->bp_default_navigation == true) { ?> <div id="item-nav"> <div class="item-list-tabs no-ajax" id="object-nav"> <ul> <?php bp_get_displayed_user_nav(); ?> <?php do_action('bp_member_options_nav'); ?> </ul> </div> </div><!-- #item-nav --> <?php } }