Example #1
0
 /**
  * Set up navigation
  *
  * @since 1.3
  */
 function setup_nav($main_nav = array(), $sub_nav = array())
 {
     // Add 'Example' to the main navigation
     $main_nav = array('name' => __('Projects', 'collabpress'), 'slug' => $this->slug, 'position' => 44, 'screen_function' => array($this, 'template_loader'), 'default_subnav_slug' => 'tasks', 'show_for_displayed_user' => array($this, 'show_tab_for_current_user'));
     $projects_link = trailingslashit(bp_loggedin_user_domain() . $this->slug);
     // Add a few subnav items under the main Example tab
     $sub_nav[] = array('name' => bp_is_my_profile() ? __('My Tasks', 'collabpress') : sprintf(__('%s&#8217s Tasks', 'collabpress'), bp_get_user_firstname()), 'slug' => 'tasks', 'parent_url' => $projects_link, 'parent_slug' => $this->slug, 'screen_function' => array($this, 'template_loader'), 'position' => 10);
     parent::setup_nav($main_nav, $sub_nav);
 }
function bp_dtheme_js_terms()
{
    ?>
<script type="text/javascript">
<?php 
    if (get_option('priority_loading') == 'enable') {
        ?>
head.ready(function() {
<?php 
    }
    ?>
	var bp_terms_my_favs = '<?php 
    _e("My Favorites", "buddypress");
    ?>
';
	var bp_terms_accepted = '<?php 
    _e("Accepted", "buddypress");
    ?>
';
	var bp_terms_rejected = '<?php 
    _e("Rejected", "buddypress");
    ?>
';
	var bp_terms_show_all_comments = '<?php 
    _e("Show all comments for this thread", "buddypress");
    ?>
';
	var bp_terms_show_all = '<?php 
    _e("Show all", "buddypress");
    ?>
';
	var bp_terms_comments = '<?php 
    _e("comments", "buddypress");
    ?>
';
	var bp_terms_close = '<?php 
    _e("Close", "buddypress");
    ?>
';
	var bp_terms_mention_explain = '<?php 
    printf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", "buddypress"), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
    ?>
';
<?php 
    if (get_option('priority_loading') == 'enable') {
        ?>
});
<?php 
    }
    ?>
</script>
<?php 
}
function bp_tpack_init()
{
    global $wp_themes;
    /* Check to make sure the active theme is not bp-default */
    if ('bp-default' == get_option('template')) {
        return false;
    }
    /* Load the default BuddyPress AJAX functions */
    if (!(int) get_option('bp_tpack_disable_js')) {
        require_once BP_PLUGIN_DIR . '/bp-themes/bp-default/_inc/ajax.php';
        /* Load the default BuddyPress javascript */
        wp_enqueue_script('bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'));
        // Add words that we need to use in JS to the end of the page so they can be
        // translated and still used.
        $params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'mention_explain' => sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname())));
        wp_localize_script('bp-js', 'BP_DTheme', $params);
    }
    /* Add the wireframe BP page styles */
    if (!(int) get_option('bp_tpack_disable_css')) {
        wp_enqueue_style('bp-css', plugins_url($path = basename(dirname(__FILE__))) . '/bp.css');
    }
}
/**
 * Enqueues BuddyPress JS and related AJAX functions
 *
 * @since 1.2
 */
function bp_tpack_enqueue_scripts()
{
    // Do not enqueue JS if it's disabled
    if (get_option('bp_tpack_disable_js')) {
        return;
    }
    // Add words that we need to use in JS to the end of the page so they can be translated and still used.
    $params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'));
    // BP 1.5+
    if (version_compare(BP_VERSION, '1.3', '>')) {
        // Bump this when changes are made to bust cache
        $version = '20110818';
        $params['view'] = __('View', 'buddypress');
    } else {
        $version = '20110729';
        if (bp_displayed_user_id()) {
            $params['mention_explain'] = sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
        }
    }
    // Enqueue the global JS - Ajax will not work without it
    nxt_enqueue_script('dtheme-ajax-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array('jquery'), $version);
    // Localize the JS strings
    nxt_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
}
/**
 * Returns a compliment button for a given user.
 *
 * @since 0.0.1
 * @package BuddyPress_Compliments
 *
 * @global object $bp BuddyPress instance.
 * @global object $members_template Members template object.
 * @param array|string $args {
 *    Attributes of the $args.
 *
 *    @type int $receiver_id Compliment receiver ID.
 *    @type int $sender_id Compliment sender ID.
 *    @type string $link_text Link text.
 *    @type string $link_title Link title.
 *    @type string $wrapper_class Link wrapper class.
 *    @type string $link_class Link class. Default "compliments-popup".
 *    @type string $wrapper Link wrapper. Default "div".
 *
 * }
 * @return string Button HTML.
 */
function bp_compliments_get_add_compliment_button($args = '')
{
    global $bp, $members_template;
    $r = wp_parse_args($args, array('receiver_id' => bp_displayed_user_id(), 'sender_id' => bp_loggedin_user_id(), 'link_text' => '', 'link_title' => '', 'wrapper_class' => '', 'link_class' => 'compliments-popup', 'wrapper' => 'div'));
    if (!$r['receiver_id'] || !$r['sender_id']) {
        return false;
    }
    // if the logged-in user is the receiver, use already-queried variables
    if (bp_loggedin_user_id() && $r['receiver_id'] == bp_loggedin_user_id()) {
        $receiver_domain = bp_loggedin_user_domain();
        $receiver_fullname = bp_get_loggedin_user_fullname();
        // else we do a lookup for the user domain and display name of the receiver
    } else {
        $receiver_domain = bp_core_get_user_domain($r['receiver_id']);
        $receiver_fullname = bp_core_get_user_displayname($r['receiver_id']);
    }
    // setup some variables
    $id = 'compliments';
    $action = 'start';
    $class = 'compliments';
    /**
     * Filters the compliment receiver name.
     *
     * @since 0.0.1
     * @package BuddyPress_Compliments
     *
     * @param string $receiver_fullname Receiver full name.
     * @param int $r['receiver_id'] Receiver ID.
     */
    $link_text = sprintf(sprintf(__('Send %s', 'bp-compliments'), BP_COMP_SINGULAR_NAME), apply_filters('bp_compliments_receiver_name', bp_get_user_firstname($receiver_fullname), $r['receiver_id']));
    if (empty($r['link_text'])) {
        $r['link_text'] = $link_text;
    }
    $wrapper_class = 'compliments-button ' . $id;
    if (!empty($r['wrapper_class'])) {
        $wrapper_class .= ' ' . esc_attr($r['wrapper_class']);
    }
    $link_class = $class;
    if (!empty($r['link_class'])) {
        $link_class .= ' ' . esc_attr($r['link_class']);
    }
    // make sure we can view the button if a user is on their own page
    $block_self = empty($members_template->member) ? true : false;
    // if we're using AJAX and a user is on their own profile, we need to set
    // block_self to false so the button shows up
    if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' && bp_is_my_profile()) {
        $block_self = false;
    }
    // setup the button arguments
    $button = array('id' => $id, 'component' => 'compliments', 'must_be_logged_in' => true, 'block_self' => $block_self, 'wrapper_class' => $wrapper_class, 'wrapper_id' => 'compliments-button-' . (int) $r['receiver_id'], 'link_href' => wp_nonce_url($receiver_domain . $bp->compliments->compliments->slug . '/' . $action . '/', $action . '_compliments'), 'link_text' => esc_attr($r['link_text']), 'link_title' => esc_attr($r['link_title']), 'link_id' => $class . '-' . (int) $r['receiver_id'], 'link_class' => $link_class, 'wrapper' => !empty($r['wrapper']) ? esc_attr($r['wrapper']) : false);
    // Filter and return the HTML button
    /**
     * Filters the compliment button.
     *
     * @since 0.0.1
     * @package BuddyPress_Compliments
     *
     * @param string $button Button HTML.
     * @param int $r['receiver_id'] Receiver ID.
     * @param int $r['sender_id'] Sender ID.
     */
    return bp_get_button(apply_filters('bp_compliments_get_add_compliment_button', $button, $r['receiver_id'], $r['sender_id']));
}
	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'vibe'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'vibe'), bp_get_user_firstname());
}
?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" class="bp-suggestions" id="whats-new" cols="50" rows="10"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
}
?>
Example #7
0
	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<p class="activity-greeting"><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'buddypress'), bp_get_group_name(), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
} else {
    printf(__("What's new, %s?", 'buddypress'), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
}
?>
</p>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"
				<?php 
if (bp_is_group()) {
    ?>
data-suggestions-group-id="<?php 
    echo esc_attr((int) bp_get_current_group_id());
    ?>
" <?php 
}
Example #8
0
?>

	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=60&height=60');
?>
		</a>
	</div>

	<h5>
		<?php 
printf(__("Comment on this link, %s?", 'buddypress-links'), bp_get_user_firstname());
?>
	</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" id="whats-new" value="" /><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
}
?>
</textarea>
Example #9
0
// Load the AJAX functions for the theme
require_once( TEMPLATEPATH . '/_inc/ajax.php' );

// Load the javascript for the theme
wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ) );

// Add words that we need to use in JS to the end of the page so they can be translated and still used.
$params = array(
	'my_favs'           => __( 'My Favorites', 'buddypress' ),
	'accepted'          => __( 'Accepted', 'buddypress' ),
	'rejected'          => __( 'Rejected', 'buddypress' ),
	'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
	'show_all'          => __( 'Show all', 'buddypress' ),
	'comments'          => __( 'comments', 'buddypress' ),
	'close'             => __( 'Close', 'buddypress' ),
	'mention_explain'   => sprintf( __( "%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress' ), '@' . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) )
);
wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params );

/**
 * Add the JS needed for blog comment replies
 *
 * @package BuddyPress Theme
 * @since 1.2
 */
function bp_dtheme_add_blog_comments_js() {
	if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
}
add_action( 'template_redirect', 'bp_dtheme_add_blog_comments_js' );

/**
Example #10
0
            bp_activity_delete_link();
            ?>
</p>
	</div>
	
	<?php 
        }
    }
    ?>

	<?php 
} else {
    ?>

	<h5><?php 
    printf(__('What are your thoughts on %s, %s?', 'bpgr'), bp_get_group_name(), bp_get_user_firstname());
    ?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<div>
				<textarea name="review_content" id="whats-new" value="" /><?php 
    if (!empty($bp->group_reviews->previous_data->review_content)) {
        echo esc_html($bp->group_reviews->previous_data->review_content);
        ?>
 <?php 
    }
    ?>
</textarea>
			</div>
Example #11
0
        ?>

				<form action="<?php 
        bp_activity_comment_form_action();
        ?>
" method="post" id="ac-form-<?php 
        bp_activity_id();
        ?>
" class="ac-form"<?php 
        bp_activity_comment_form_nojs_display();
        ?>
>
                <div class="activity-comments-inner">
                  <div class="ac-comment-head"><i class="fa fa-comment"></i> Kommentera aktivitet</div>
                  <div class="ac-comment-user"><?php 
        printf(__("Du är inloggad som %s", 'buddypress'), bp_get_user_firstname());
        bp_loggedin_user_avatar('width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT);
        ?>
</div>
					<div class="ac-reply-content">
						<div class="ac-textarea">
							<textarea id="ac-input-<?php 
        bp_activity_id();
        ?>
" class="ac-input form-control" name="ac_input_<?php 
        bp_activity_id();
        ?>
"></textarea>
						</div>
						<input type="submit" name="ac_form_submit" class="btn btn-primary btn-small" value="<?php 
        _e('Post', 'buddypress');
Example #12
0
	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<p class="activity-greeting"><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'wonderflux'), bp_get_group_name(), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
} else {
    printf(__("What's new, %s?", 'wonderflux'), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
}
?>
</p>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<label for="whats-new" class="bp-screen-reader-text"><?php 
_e('Post what\'s new', 'wonderflux');
?>
</label>
			<textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"
				<?php 
if (bp_is_group()) {
    ?>
data-suggestions-group-id="<?php 
	<?php 
if (is_user_logged_in()) {
    ?>

		<?php 
    do_action('bp_before_sidebar_me');
    ?>

		<div id="sidebar-me" class="widget">
						
			<h3 class="widgettitle"><?php 
    _e('Hi', 'buddyboss');
    ?>
 <?php 
    echo bp_get_user_firstname();
    ?>
!</h3>
			
				<a href="<?php 
    echo bp_loggedin_user_domain();
    ?>
">
					<?php 
    bp_loggedin_user_avatar('type=full');
    ?>
				</a>
	
				<ul id="quicklinks">
					<li id="icon-profile"><a href="<?php 
    echo bp_loggedin_user_domain();
/**
 * Returns a follow / unfollow button for a given user depending on the follower status.
 *
 * Checks to see if the follower is already following the leader.  If is following, returns
 * "Stop following" button; if not following, returns "Follow" button.
 *
 * @param array $args {
 *     Array of arguments.
 *     @type int $leader_id The user ID of the person we want to follow.
 *     @type int $follower_id The user ID initiating the follow request.
 *     @type string $link_text The anchor text for the link.
 *     @type string $link_title The title attribute for the link.
 *     @type string $wrapper_class CSS class for the wrapper container.
 *     @type string $link_class CSS class for the link.
 *     @type string $wrapper The element for the wrapper container. Defaults to 'div'.
 * }
 * @return mixed String of the button on success.  Boolean false on failure.
 * @uses bp_get_button() Renders a button using the BP Button API
 * @author r-a-y
 * @since 1.1
 */
function bp_follow_get_add_follow_button($args = '')
{
    global $bp, $members_template;
    $r = wp_parse_args($args, array('leader_id' => bp_displayed_user_id(), 'follower_id' => bp_loggedin_user_id(), 'link_text' => '', 'link_title' => '', 'wrapper_class' => '', 'link_class' => '', 'wrapper' => 'div'));
    if (!$r['leader_id'] || !$r['follower_id']) {
        return false;
    }
    // if we're checking during a members loop, then follow status is already
    // queried via bp_follow_inject_member_follow_status()
    if (!empty($members_template->in_the_loop) && $r['follower_id'] == bp_loggedin_user_id() && $r['leader_id'] == bp_get_member_user_id()) {
        $is_following = $members_template->member->is_following;
        // else we manually query the follow status
    } else {
        $is_following = bp_follow_is_following(array('leader_id' => $r['leader_id'], 'follower_id' => $r['follower_id']));
    }
    // if the logged-in user is the leader, use already-queried variables
    if (bp_loggedin_user_id() && $r['leader_id'] == bp_loggedin_user_id()) {
        $leader_domain = bp_loggedin_user_domain();
        $leader_fullname = bp_get_loggedin_user_fullname();
        // else we do a lookup for the user domain and display name of the leader
    } else {
        $leader_domain = bp_core_get_user_domain($r['leader_id']);
        $leader_fullname = bp_core_get_user_displayname($r['leader_id']);
    }
    // setup some variables
    if ($is_following) {
        $id = 'following';
        $action = 'stop';
        $class = 'unfollow';
        $link_text = sprintf(_x('Unfollow', 'Button', 'bp-follow'), apply_filters('bp_follow_leader_name', bp_get_user_firstname($leader_fullname), $r['leader_id']));
        if (empty($r['link_text'])) {
            $r['link_text'] = $link_text;
        }
    } else {
        $id = 'not-following';
        $action = 'start';
        $class = 'follow';
        $link_text = sprintf(_x('Follow', 'Button', 'bp-follow'), apply_filters('bp_follow_leader_name', bp_get_user_firstname($leader_fullname), $r['leader_id']));
        if (empty($r['link_text'])) {
            $r['link_text'] = $link_text;
        }
    }
    $wrapper_class = 'follow-button ' . $id;
    if (!empty($r['wrapper_class'])) {
        $wrapper_class .= ' ' . esc_attr($r['wrapper_class']);
    }
    $link_class = $class;
    if (!empty($r['link_class'])) {
        $link_class .= ' ' . esc_attr($r['link_class']);
    }
    // make sure we can view the button if a user is on their own page
    $block_self = empty($members_template->member) ? true : false;
    // if we're using AJAX and a user is on their own profile, we need to set
    // block_self to false so the button shows up
    if (bp_follow_is_doing_ajax() && bp_is_my_profile()) {
        $block_self = false;
    }
    // setup the button arguments
    $button = array('id' => $id, 'component' => 'follow', 'must_be_logged_in' => true, 'block_self' => $block_self, 'wrapper_class' => $wrapper_class, 'wrapper_id' => 'follow-button-' . (int) $r['leader_id'], 'link_href' => wp_nonce_url($leader_domain . $bp->follow->followers->slug . '/' . $action . '/', $action . '_following'), 'link_text' => esc_attr($r['link_text']), 'link_title' => esc_attr($r['link_title']), 'link_id' => $class . '-' . (int) $r['leader_id'], 'link_class' => $link_class, 'wrapper' => !empty($r['wrapper']) ? esc_attr($r['wrapper']) : false);
    // Filter and return the HTML button
    return bp_get_button(apply_filters('bp_follow_get_add_follow_button', $button, $r['leader_id'], $r['follower_id']));
}
Example #15
0
            <div id="whats-new-avatar">
                <a href="<?php 
echo bp_loggedin_user_domain();
?>
">
                    <?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
                </a>
            </div>
        
            <h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'firmasite'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'firmasite'), bp_get_user_firstname());
}
?>
</h5>
            
            <div class="clearfix"></div>

			<?php 
if (bp_is_active('groups') && !bp_is_my_profile() && !bp_is_group()) {
    ?>

				<div id="whats-new-post-in-box">

					<div class="help-block"><?php 
    _e('Post in', 'firmasite');
    ?>
Example #16
0
/**
 * Enqueues BuddyPress JS and related AJAX functions
 *
 * @since 1.3
 */
function bp_compat_enqueue_scripts()
{
    // Add words that we need to use in JS to the end of the page so they can be translated and still used.
    $params = array('my_favs' => __('My Favorites', 'dp'), 'accepted' => __('Accepted', 'dp'), 'rejected' => __('Rejected', 'dp'), 'show_all_comments' => __('Show all comments for this thread', 'dp'), 'show_all' => __('Show all', 'dp'), 'comments' => __('comments', 'dp'), 'close' => __('Close', 'dp'));
    // BP 1.5+
    if (version_compare(BP_VERSION, '1.3', '>')) {
        // Bump this when changes are made to bust cache
        $version = '20110818';
        $params['view'] = __('View', 'dp');
    } else {
        $version = '20110729';
        if (bp_displayed_user_id()) {
            $params['mention_explain'] = sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'dp'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname()));
        }
    }
    // Enqueue the global JS - Ajax will not work without it
    wp_enqueue_script('bp-theme-js', trailingslashit(get_template_directory_uri()) . 'bp/global.js', array('jquery'), $version);
    // Localize the JS strings
    wp_localize_script('bp-theme-js', 'BP_Theme', $params);
}
Example #17
0
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=60&height=60');
?>
		</a>
	</div>

	<h5>
		<?php 
if (bp_get_groupblog_id()) {
    ?>
			<?php 
    printf(__("What's new in %s, %s?", 'buddypress'), bp_get_group_name(), bp_get_user_firstname());
    ?>
		<?php 
}
?>
	</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" id="whats-new" value="" /><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
Example #18
0
?>

	<div id="mpp-whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<p class="activity-greeting">
		<?php 
printf(__("Want to say Something, %s?", 'mediapress'), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
?>
</p>

	<div id="mpp-whats-new-content">
		
		<div id="mpp-whats-new-textarea">
			<textarea name="mpp-whats-new" id="mpp-whats-new" cols="50" rows="3"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_textarea($_GET['r']);
    ?>
 <?php 
}
?>
Example #19
0
                ?>
					
					<?php 
            } elseif (!bp_is_my_profile() && bp_is_user_activity()) {
                ?>
								
						<?php 
                printf(__("Write something to %s?", 'buddypress'), bp_get_displayed_user_fullname());
                ?>
											
					<?php 
            } else {
                ?>
						
						<?php 
                printf(__("Add a photo, %s", 'buddypress'), bp_get_user_firstname());
                ?>
						
					<?php 
            }
            ?>
		
				</h5>
	
				<div id="whats-new-icons">
					<?php 
            if (BUDDY_BOSS_PICS_ENABLED) {
                ?>
						<div id="whats-new-pic"></div><!-- #whats-new-pic -->
					<?php 
            }
define('BP_DISABLE_ADMIN_BAR', true);
define('BP_DTHEME_DISABLE_CUSTOM_HEADER', true);
add_filter('bp_core_fetch_avatar_no_grav', '__return_true');
remove_action('wp_print_styles', 'bp_tpack_enqueue_styles');
remove_filter('wp_nav_menu', 'remove_ul');
// Stop the theme from killing WordPress if BuddyPress is not enabled.
if (!class_exists('BP_Core_User')) {
    return false;
}
// Load the AJAX functions for the theme
require_once WP_PLUGIN_DIR . '/buddypress/bp-themes/bp-default/_inc/ajax.php';
// Load the javascript for the theme
wp_enqueue_script('dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array('jquery'));
// Add words that we need to use in JS to the end of the page so they can be translated and still used.
$params = array('my_favs' => __('My Favorites', 'buddypress'), 'accepted' => __('Accepted', 'buddypress'), 'rejected' => __('Rejected', 'buddypress'), 'show_all_comments' => __('Show all comments for this thread', 'buddypress'), 'show_all' => __('Show all', 'buddypress'), 'comments' => __('comments', 'buddypress'), 'close' => __('Close', 'buddypress'), 'mention_explain' => sprintf(__("%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress'), '@' . bp_get_displayed_user_username(), bp_get_user_firstname(bp_get_displayed_user_fullname()), bp_get_user_firstname(bp_get_displayed_user_fullname())));
wp_localize_script('dtheme-ajax-js', 'BP_DTheme', $params);
/**
 * Add the JS needed for blog comment replies
 *
 * @package BuddyPress Theme
 * @since 1.2
 */
function bp_dtheme_add_blog_comments_js()
{
    if (is_singular()) {
        wp_enqueue_script('comment-reply');
    }
}
add_action('template_redirect', 'bp_dtheme_add_blog_comments_js');
/**
Example #21
0
 /**
  * Creates component navigation (Member > Docs)
  *
  * @since 1.2
  * @todo Make the 'Docs' label customizable by the admin
  */
 function setup_nav($main_nav = array(), $sub_nav = array())
 {
     $main_nav = array('name' => bp_docs_get_user_tab_name(), 'slug' => bp_docs_get_docs_slug(), 'position' => 80, 'screen_function' => array(&$this, 'template_loader'), 'default_subnav_slug' => BP_DOCS_STARTED_SLUG);
     $parent_url = trailingslashit(bp_displayed_user_domain() . bp_docs_get_docs_slug());
     $mydocs_label = bp_is_my_profile() ? __('My Docs ', 'bp-docs') : sprintf(__('%s&#8217;s Docs'), bp_get_user_firstname(bp_get_displayed_user_fullname()));
     $sub_nav[] = array('name' => bp_is_my_profile() ? __('Started By Me', 'bp-docs') : sprintf(__('Started By %s', 'bp-docs'), bp_get_user_firstname()), 'slug' => BP_DOCS_STARTED_SLUG, 'parent_url' => $parent_url, 'parent_slug' => bp_docs_get_docs_slug(), 'screen_function' => array(&$this, 'template_loader'), 'position' => 10);
     $sub_nav[] = array('name' => bp_is_my_profile() ? __('Edited By Me', 'bp-docs') : sprintf(__('Edited By %s', 'bp-docs'), bp_get_user_firstname()), 'slug' => BP_DOCS_EDITED_SLUG, 'parent_url' => $parent_url, 'parent_slug' => bp_docs_get_docs_slug(), 'screen_function' => array(&$this, 'template_loader'), 'position' => 20);
     parent::setup_nav($main_nav, $sub_nav);
 }
Example #22
0
<form action="<?php 
bp_activity_post_form_action();
?>
" method="post" id="whats-new-form" name="whats-new-form" role="complementary">

	<?php 
do_action('bp_before_activity_post_form');
?>

	

	<h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'bp-magic'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'bp-magic'), bp_get_user_firstname());
}
?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
}
?>
Example #23
0
?>

<form action="<?php 
bp_activity_post_form_action();
?>
" method="post" id="whats-new-form" name="whats-new-form" role="complementary">

	<?php 
do_action('bp_before_activity_post_form');
?>

	<h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'thatcamp'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'thatcamp'), bp_get_user_firstname());
}
?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
}
?>
Example #24
0
	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'product'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'product'), bp_get_user_firstname());
}
?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
}
?>
/**
 * Output the calculated first name of the displayed or logged-in user.
 */
function bp_user_firstname()
{
    echo bp_get_user_firstname();
}
Example #26
0
?>

<form action="<?php 
bp_activity_post_form_action();
?>
" method="post" id="whats-new-form" name="whats-new-form" role="complementary">

	<?php 
do_action('bp_before_activity_post_form');
?>

	<?php 
if (bp_is_group()) {
    $greetings = sprintf(__("What's new in %s, %s?", 'T20'), bp_get_group_name(), bp_get_user_firstname());
} else {
    $greetings = sprintf(__("What's new, %s?", 'T20'), bp_get_user_firstname());
}
?>

	<div  id="whats-new-content">
		<div  id="whats-new-textarea">
			<textarea name="whats-new" placeholder="<?php 
echo $greetings;
?>
" id="whats-new" cols="50" rows="2"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
Example #27
0
?>

			<div id="whats-new-avatar">
				<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
					<?php 
bp_loggedin_user_avatar('type=full&width=' . bp_core_avatar_full_width() . '&height=' . bp_core_avatar_full_height());
?>
				</a>
			</div>

			<p class="activity-greeting">
				<?php 
printf(__("Welcome back, %s", 'buddypress'), bp_get_user_firstname(bp_get_loggedin_user_fullname()));
?>
			</p>
			

			<?php 
wp_nonce_field('post_update', '_wpnonce_post_update');
?>
			<?php 
/**
 * Fires after the activity post form.
 *
 * @since 1.2.0
 */
do_action('bp_after_activity_post_form');
?>
Example #28
0
	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'logicalboneshug'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'logicalboneshug'), bp_get_user_firstname());
}
?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
}
?>
Example #29
0
	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'buddypress'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'buddypress'), bp_get_user_firstname());
}
?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
}
?>
Example #30
0
	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'wplms_modern'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'wplms_modern'), bp_get_user_firstname());
}
?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" class="bp-suggestions" id="whats-new" cols="50" rows="10"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
}
?>