当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_get_member_avatar函数代码示例

本文整理汇总了PHP中bp_get_member_avatar函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_member_avatar函数的具体用法?PHP bp_get_member_avatar怎么用?PHP bp_get_member_avatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bp_get_member_avatar函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: widget

 /** @see WP_Widget::widget -- do not rename this */
 function widget($args, $instance)
 {
     extract($args);
     //Our variables from the widget settings.
     $title = apply_filters('widget_title', $instance['title']);
     $num = $instance['number'];
     $activity = $instance['activity'];
     $messages = $instance['messages'];
     $friends = $instance['friends'];
     if (!is_numeric($num)) {
         $num = 5;
     }
     $user_id = bp_loggedin_user_id();
     $width = $instance['width'];
     echo '<div class="' . $width . '"><div class="dash-widget">' . $before_widget;
     echo '<div id="vibe-tabs-student-activity" class="tabs tabbable">
           <ul class="nav nav-tabs clearfix">';
     if (isset($messages) && $messages && function_exists('messages_get_unread_count')) {
         echo '<li><a href="#tab-messages" data-toggle="tab"><i class="icon-bubble-talk-1"></i>' . messages_get_unread_count($user_id) . '</a></li>';
     }
     if (isset($friends) && $friends) {
         $searchArgs = array('type' => 'online', 'page' => 1, 'per_page' => $num, 'user_id' => $user_id);
         if (bp_has_members($searchArgs)) {
             while (bp_members()) {
                 bp_the_member();
                 $user_friends[] = array('avatar' => bp_get_member_avatar(), 'name' => bp_get_member_name(), 'last_active' => bp_get_member_last_active());
             }
         }
         if (!is_array($user_friends)) {
             $user_friends = array();
         }
         echo '<li><a href="#tab-friends" data-toggle="tab"><i class="icon-myspace-alt"></i>' . count($user_friends) . '</a></li>';
     }
     if (isset($activity) && $activity) {
         echo '<li><a href="#tab-activity" data-toggle="tab"><i class="icon-atom"></i>&nbsp;</a></li>';
     }
     echo '</ul><div class="tab-content">';
     // Display the widget title
     global $wpdb, $bp;
     if (isset($messages) && $messages) {
         echo '<div id="tab-messages" class="tab-pane">
   <h4>' . __('Unread Messages', 'wplms-dashboard') . '</h4>';
         $message_args = array('user_id' => $user_id, 'box' => 'inbox', 'type' => 'unread', 'max' => $num);
         if (bp_has_message_threads($message_args)) {
             echo '<ul class="dash-unread-messages">';
             while (bp_message_threads()) {
                 bp_message_thread();
                 echo '<li>' . bp_get_message_thread_avatar() . '<a href="' . bp_get_message_thread_view_link() . '">' . bp_get_message_thread_subject() . '<span>' . bp_get_message_thread_from() . '</span></a></li>';
             }
             echo '</ul>';
         } else {
             echo '<div class="message error">' . __('No messages found', 'wplms-dashboard') . '</div>';
         }
         echo '</div>';
     }
     if (isset($friends) && $friends) {
         echo '<div id="tab-friends" class="tab-pane">
   <h4>' . __('Friends Online', 'wplms-dashboard') . '</h4>';
         if (count($user_friends)) {
             echo '<ul class="dash-user-friends">';
             foreach ($user_friends as $user_friend) {
                 echo '<li>' . $user_friend['avatar'] . ' ' . $user_friend['name'] . '<span>' . $user_friend['last_active'] . '</span></li>';
             }
             echo '</ul>';
         } else {
             echo '<div class="message error">' . __('No friends online', 'wplms-dashboard') . '</div>';
         }
         echo '</div>';
     }
     if (isset($activity) && $activity) {
         $activities = apply_filters('wplms_dashboard_activity', $wpdb->get_results($wpdb->prepare("\n\t\t\tSELECT *\n\t\t    FROM {$bp->activity->table_name} AS activity\n\t\t    WHERE \tactivity.user_id IN (%d)\n\t\t    AND     (activity.action != '' OR activity.action IS NOT NULL)\n\t\t    ORDER BY activity.date_recorded DESC\n\t\t    LIMIT 0,{$num}\n\t\t", $user_id)));
         echo '<div id="tab-activity" class="tab-pane student_activity">
       <h4>' . __('Recent Activity', 'wplms-dashboard') . '</h4>';
         if (isset($activities) && is_array($activities)) {
             echo '<ul class="dash-activities">';
             foreach ($activities as $activity) {
                 if (isset($activity->action) && $activity->action != '') {
                     $time = tofriendlytime(time() - strtotime($activity->date_recorded));
                     echo '<li class="' . $activity->component . ' ' . $activity->type . '">
   						<div class="dash-activity">
   							<span class="dash-activity-time">' . $time . ' ' . __('AGO', 'wplms-dashboard') . '</span>
   								<strong>' . $activity->action . '</strong>
   						</div>
   					  </li>';
                 }
             }
             echo '</ul>';
         } else {
             echo '<div class="message error">' . __('No activity found', 'wplms-dashboard') . '</div>';
         }
         echo '</div>';
     }
     echo '</div></div>' . $after_widget . '</div></div>';
 }
开发者ID:nikitansk,项目名称:devschool,代码行数:95,代码来源:activity_widget.php

示例2: buatp_set_default_avatar_size

function buatp_set_default_avatar_size($avatar = '', $custom = '')
{
    return apply_filters('buatp_set_default_avatar_size', bp_get_member_avatar('type=full&id=' . (int) bp_get_member_user_id() . $custom));
}
开发者ID:jfeliweb,项目名称:BuddyPress-User-Account-Type,代码行数:4,代码来源:bp-user-type-hooks.php

示例3: array

$params = array('type' => $type, 'per_page' => $number);
if ($perline != '') {
    $class .= ' ' . $perline . '-thumbs';
}
if ($animation != '') {
    $anim1 = ' animate-when-almost-visible';
    $class .= ' kleo-thumbs-animated th-' . $animation;
}
if ($rounded == 'rounded') {
    $class .= ' rounded';
}
if (function_exists('bp_is_active')) {
    // begin bp members loop
    if (bp_has_members($params)) {
        $output .= '<div class="wpb_wrapper">';
        $output .= '<div class="kleo-gallery' . $anim1 . '">';
        $output .= '<div class="kleo-thumbs-images ' . $class . '">';
        while (bp_members()) {
            bp_the_member();
            $output .= '<a href="' . bp_get_member_permalink() . '" title="' . bp_get_member_name() . '">';
            $output .= bp_get_member_avatar(array('type' => 'full', 'width' => '250', 'height' => '250'));
            $output .= kleo_get_img_overlay();
            $output .= '</a>';
        }
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
    }
} else {
    $output = __("This shortcode must have Buddypress installed to work.", "k-elements");
}
开发者ID:quyip8818,项目名称:wps,代码行数:31,代码来源:kleo_bp_members_grid.php

示例4: info_window_content

 /**
  * create the content of the info window
  * @since 2.5
  * @param unknown_type $member
  * @return string
  */
 public function info_window_content($member)
 {
     if (!empty($member->formatted_address)) {
         $address = $member->formatted_address;
     } elseif (!empty($member->address)) {
         $address = $member->address;
     } else {
         $address = $this->form['labels']['search_results']['not_avaliable'];
     }
     $output = array();
     $output['start'] = '<div class="gmw-fl-infow-window-wrapper wppl-fl-info-window">';
     $output['thumb'] = '<div class="thumb wppl-info-window-thumb">' . bp_get_member_avatar($args = 'type=full') . '</div>';
     $output['content_start'] = '<div class="content wppl-info-window-info"><table>';
     $output['name'] = '<tr><td><span class="wppl-info-window-permalink"><a href="' . bp_get_member_permalink() . '">' . $member->display_name . '</a></span></td></tr>';
     $output['address'] = '<tr><td><span>' . $this->form['labels']['info_window']['address'] . '</span>' . $address . '</td></tr>';
     if (isset($member->distance)) {
         $output['distance'] = '<tr><td><span>' . $this->form['labels']['info_window']['distance'] . '</span>' . $member->distance . ' ' . $this->form['units_array']['name'] . '</td></tr>';
     }
     $output['content_end'] = '</table></div>';
     $output['end'] = '</div>';
     $output = apply_filters('gmw_fl_info_window_content', $output, $member, $this->form);
     $output = apply_filters("gmw_fl_info_window_content_{$this->form['ID']}", $output, $member, $this->form);
     return implode(' ', $output);
 }
开发者ID:poweronio,项目名称:mbsite,代码行数:30,代码来源:gmw-fl-search-query-class.php

示例5: bp_member_avatar

/**
 * Output a member's avatar.
 *
 * @see bp_get_member_avatar() for description of arguments.
 *
 * @param array|string $args See {@link bp_get_member_avatar()}.
 */
function bp_member_avatar($args = '')
{
    /**
     * Filters a members avatar.
     *
     * @since 1.2.0
     *
     * @param string $value Formatted HTML <img> element, or raw avatar URL based on $html arg.
     */
    echo apply_filters('bp_member_avatar', bp_get_member_avatar($args));
}
开发者ID:mawilliamson,项目名称:wordpress,代码行数:18,代码来源:bp-members-template.php

示例6: bp_member_avatar

function bp_member_avatar($args = '')
{
    echo apply_filters('bp_member_avatar', bp_get_member_avatar($args));
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:4,代码来源:bp-members-template.php

示例7: while

    // begin bp members loop
    if (bp_has_members($params)) {
        $output .= '<div class="clearfix">';
        $output .= '<ul data-max-slides="' . $max_slides . '" data-min-slides="' . $min_slides . '" 
		data-item-width="' . $item_width . '" class="gears-carousel-standard bp-members-carousel">';
        while (bp_members()) {
            bp_the_member();
            $output .= '<li class="carousel-item">';
            $name = bp_get_member_name();
            $permalink = bp_get_member_permalink();
            $last_active = bp_get_member_last_active();
            $output .= '<a class="members-name" href="' . esc_url($permalink) . '" title="' . esc_attr($name) . '">';
            $output .= esc_attr($name);
            $output .= '</a>';
            $output .= '<a href="' . esc_url($permalink) . '" title="' . esc_attr($name) . '">';
            $output .= bp_get_member_avatar(array('type' => 'full'));
            $output .= '</a>';
            if (class_exists('BP_Follow')) {
                if (method_exists('BP_Follow', 'get_counts')) {
                    $follow_count = BP_Follow::get_counts(bp_get_member_user_id());
                    $follow_label = $follow_count['followers'] == 1 ? 'Follower' : 'Followers';
                    $output .= '<p><strong>' . $follow_count['followers'] . ' ' . $follow_label . '</strong></p>';
                }
            }
            $output .= '</li>';
        }
        $output .= '</ul>';
        $output .= '</div>';
        echo $output;
    }
} else {
开发者ID:poweronio,项目名称:mbsite,代码行数:31,代码来源:bp-members-carousel.php

示例8: bp_member_avatar

/**
 * Output a member's avatar.
 *
 * @since 1.2.0
 *
 * @see bp_get_member_avatar() for description of arguments.
 *
 * @param array|string $args See {@link bp_get_member_avatar()}.
 */
function bp_member_avatar($args = '')
{
    /**
     * Filters a members avatar.
     *
     * @since 1.2.0
     * @since 2.6.0 Added the `$args` parameter.
     *
     * @param string       $value Formatted HTML <img> element, or raw avatar URL based on $html arg.
     * @param array|string $args  See {@link bp_get_member_avatar()}.
     */
    echo apply_filters('bp_member_avatar', bp_get_member_avatar($args), $args);
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:22,代码来源:bp-members-template.php

示例9: bp_members_list

 /**
  * BP Members List
  */
 function bp_members_list($atts)
 {
     $output = '';
     extract(shortcode_atts(array('type' => 'active', 'max_item' => 10), $atts));
     // available columns are 1, 2, 3, and 4
     $params = array('type' => $type, 'per_page' => $max_item);
     if (function_exists('bp_has_members')) {
         // begin bp members loop
         if (bp_has_members($params)) {
             $output .= '<div class="clearfix">';
             $output .= '<ul class="gears-bp-members-list clear">';
             while (bp_members()) {
                 $output .= '<li class="clearfix bp-members-list-item ">';
                 bp_the_member();
                 $output .= bp_get_member_avatar(array('type' => 'full', 'class' => 'col-md-3 col-xs-3 col-sm-3 trans avatar'));
                 $output .= '<div class="col-md-9 col-sm-9 col-xs-9">';
                 $output .= '<h5><a href="' . bp_get_member_permalink() . '" title="' . bp_get_member_name() . '">' . bp_get_member_name() . '</a></h5>';
                 $output .= '<div class="item-meta"><span class="small activity">' . bp_get_member_last_active() . '</span></div>';
                 do_action('bp_directory_members_item');
                 $output .= '</div>';
                 $output .= '</li>';
             }
             $output .= '</ul>';
             $output .= '</div>';
             return $output;
         }
     } else {
         return $this->bp_not_installed;
     }
 }
开发者ID:poweronio,项目名称:mbsite,代码行数:33,代码来源:library.php

示例10: extract

 */
$output = '';
extract(shortcode_atts(array('type' => 'newest', 'number' => 12, 'class' => '', 'rounded' => "rounded", 'online' => 'show'), $atts));
$params = array('type' => $type, 'per_page' => $number);
if ($rounded == 'rounded') {
    $rounded = 'rounded';
}
if (function_exists('bp_is_active')) {
    if (bp_has_members($params)) {
        ob_start();
        echo '<div class="wpb_wrapper">';
        echo '<div id="members-dir-list" class="members dir-list">';
        echo '<ul id="members-list" class="item-list row kleo-isotope masonry ' . $class . '">';
        while (bp_members()) {
            bp_the_member();
            echo '<li class="kleo-masonry-item">' . '<div class="member-inner-list animated animate-when-almost-visible bottom-to-top">' . '<div class="item-avatar ' . $rounded . '">' . '<a href="' . bp_get_member_permalink() . '">' . bp_get_member_avatar() . kleo_get_img_overlay() . '</a>';
            if ($online == 'show') {
                echo kleo_get_online_status(bp_get_member_user_id());
            }
            echo '</div>' . '<div class="item">
							<div class="item-title">' . '<a href="' . bp_get_member_permalink() . '">' . bp_get_member_name() . '</a>
							</div>
					<div class="item-meta"><span class="activity">' . bp_get_member_last_active() . '</span></div>';
            if (bp_get_member_latest_update()) {
                echo '<span class="update"> ' . bp_get_member_latest_update() . '</span>';
            }
            do_action('bp_directory_members_item');
            echo '</div>';
            echo '<div class="action">';
            do_action('bp_directory_members_actions');
            echo '</div>';
开发者ID:quyip8818,项目名称:wps,代码行数:31,代码来源:kleo_bp_members_masonry.php

示例11: while

if ($autoplay != '') {
    $data_attr .= ' data-autoplay="' . $autoplay . '"';
}
if (function_exists('bp_is_active')) {
    if (bp_has_members($params)) {
        $output = '<div class="wpb_wrapper">';
        $output .= '<div class="kleo-carousel-container bp-groups-carousel ' . $class . '">';
        $output .= '<div class="kleo-carousel-items kleo-members-carousel" data-min-items="' . $min_items . '" data-max-items="' . $max_items . '" data-items-width="' . $item_width . '"' . $data_attr . '>';
        $output .= '<ul class="kleo-carousel">';
        while (bp_members()) {
            bp_the_member();
            $output .= '<li>';
            $output .= '<div class="loop-image">';
            $output .= '<div class="item-avatar ' . $rounded . '">';
            $output .= '<a href="' . bp_get_member_permalink() . '" title="' . bp_get_member_name() . '">';
            $output .= bp_get_member_avatar(array('type' => $image_size, 'width' => $item_width, 'height' => $item_width));
            $output .= kleo_get_img_overlay();
            $output .= '</a>';
            if ($online == 'show') {
                $output .= kleo_get_online_status(bp_get_member_user_id());
            }
            $output .= '</div>';
            //end item-avatar
            $output .= '</div>';
            $output .= '</li>';
        }
        $output .= '</ul>';
        $output .= '</div>';
        $output .= '<div class="carousel-arrow">' . '<a class="carousel-prev" href="#"><i class="icon-angle-left"></i></a>' . '<a class="carousel-next" href="#"><i class="icon-angle-right"></i></a></div>';
        $output .= '</div>';
        $output .= '</div>';
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:31,代码来源:kleo_bp_members_carousel.php


注:本文中的bp_get_member_avatar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。