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


PHP bp_member_last_active函数代码示例

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


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

示例1: bp_member_link

                <h3>
                    <?php 
        // iexpert_skype_status( xprofile_get_field_data( 'skype', bp_get_member_user_id() ) );
        ?>

                    <a href="<?php 
        bp_member_link();
        ?>
"><?php 
        bp_member_name();
        ?>
</a>
                </h3>

                <div><strong><?php 
        bp_member_last_active();
        ?>
</strong></div>
                @<?php 
        bp_member_user_nicename();
        ?>
            </div>

            <div class="update"><strong><?php 
        _e("Last update", 'bp-hovercards');
        ?>
</strong><br><?php 
        bp_member_latest_update('length=68');
        ?>
</div>
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:30,代码来源:hovercard.php

示例2: while

        <?php while ( bp_members() ) : bp_the_member(); ?>

            <li class="yit_animate fadeInUp col-md-4 col-sm-6 masonry_item">
                <div class="item-container">
                    <div class="item-header clearfix">
                        <div class="item-avatar">
                            <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar( array( 'height' => 60, 'width' => 60 ) ); ?></a>
                        </div>

                        <div class="item">
                            <div class="item-username">
                                <a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>

                            </div>

                            <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>

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

                            <?php
                            /***
                             * If you want to show specific profile fields here you can,
                             * but it'll add an extra query for each member in the loop
                             * (only one regardless of the number of fields you show):
                             *
                             * bp_member_profile_data( 'field=the field name' );
                             */
                            ?>
                        </div>
                    </div>
开发者ID:jabue,项目名称:wordpress,代码行数:30,代码来源:members-loop.php

示例3: bp_core_ajax_widget_friends

/**
 * Process AJAX pagination or filtering for the Friends widget.
 *
 * @since 1.9.0
 */
function bp_core_ajax_widget_friends()
{
    check_ajax_referer('bp_core_widget_friends');
    switch ($_POST['filter']) {
        case 'newest-friends':
            $type = 'newest';
            break;
        case 'recently-active-friends':
            $type = 'active';
            break;
        case 'popular-friends':
            $type = 'popular';
            break;
    }
    $members_args = array('user_id' => bp_displayed_user_id(), 'type' => $type, 'max' => absint($_POST['max-friends']), 'populate_extras' => 1);
    if (bp_has_members($members_args)) {
        ?>
		<?php 
        echo '0[[SPLIT]]';
        // Return valid result. TODO: remove this.
        ?>
		<?php 
        while (bp_members()) {
            bp_the_member();
            ?>
			<li class="vcard">
				<div class="item-avatar">
					<a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            bp_member_avatar();
            ?>
</a>
				</div>

				<div class="item">
					<div class="item-title fn"><a href="<?php 
            bp_member_permalink();
            ?>
" title="<?php 
            bp_member_name();
            ?>
"><?php 
            bp_member_name();
            ?>
</a></div>
					<?php 
            if ('active' == $type) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_last_active();
                ?>
</span></div>
					<?php 
            } elseif ('newest' == $type) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_registered();
                ?>
</span></div>
					<?php 
            } elseif (bp_is_active('friends')) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_total_friend_count();
                ?>
</span></div>
					<?php 
            }
            ?>
				</div>
			</li>
		<?php 
        }
        ?>

	<?php 
    } else {
        ?>
		<?php 
        echo "-1[[SPLIT]]<li>";
        ?>
		<?php 
        _e('There were no members found, please try another filter.', 'buddypress');
        ?>
		<?php 
        echo "</li>";
        ?>
	<?php 
    }
}
开发者ID:dcavins,项目名称:buddypress-svn,代码行数:97,代码来源:bp-friends-widgets.php

示例4: widget


//.........这里部分代码省略.........
                ?>

					| <a href="<?php 
                bp_members_directory_permalink();
                ?>
" id="popular-members" <?php 
                if ($instance['member_default'] == 'popular') {
                    ?>
class="selected"<?php 
                }
                ?>
><?php 
                _e('Popular', 'buddypress');
                ?>
</a>

				<?php 
            }
            ?>
			</div>

			<ul id="members-list" class="item-list">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title fn"><a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_name();
                ?>
</a></div>
							<div class="item-meta">
								<span class="activity">
								<?php 
                if ('newest' == $instance['member_default']) {
                    bp_member_registered();
                }
                if ('active' == $instance['member_default']) {
                    bp_member_last_active();
                }
                if ('popular' == $instance['member_default']) {
                    bp_member_total_friend_count();
                }
                ?>
								</span>
							</div>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            wp_nonce_field('bp_core_widget_members', '_wpnonce-members');
            ?>
			<input type="hidden" name="members_widget_max" id="members_widget_max" value="<?php 
            echo esc_attr($instance['max_members']);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('No one has signed up yet!', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
开发者ID:eresyyl,项目名称:mk,代码行数:101,代码来源:bp-core-widgets.php

示例5: widget


//.........这里部分代码省略.........
            }
            ?>
><?php 
            _e('Active', 'buddypress');
            ?>
</a>
				| <a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="popular-friends" <?php 
            if ($instance['friend_default'] == 'popular') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Popular', 'buddypress');
            ?>
</a>
			</div>

			<ul id="friends-list" class="item-list">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title fn"><a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_name();
                ?>
</a></div>
							<div class="item-meta">
								<span class="activity">
								<?php 
                if ('newest' == $instance['friend_default']) {
                    bp_member_registered();
                }
                if ('active' == $instance['friend_default']) {
                    bp_member_last_active();
                }
                if ('popular' == $instance['friend_default']) {
                    bp_member_total_friend_count();
                }
                ?>
								</span>
							</div>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            wp_nonce_field('bp_core_widget_friends', '_wpnonce-friends');
            ?>
			<input type="hidden" name="friends_widget_max" id="friends_widget_max" value="<?php 
            echo absint($instance['max_friends']);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('Sorry, no members were found.', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
开发者ID:danielcoats,项目名称:schoolpress,代码行数:101,代码来源:bp-friends-widgets.php

示例6: widget


//.........这里部分代码省略.........

				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>

					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title fn"><a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_name();
                ?>
</a></div>
							<div class="item-meta">
								<?php 
                if ('newest' == $settings['member_default']) {
                    ?>
									<span class="activity" data-livestamp="<?php 
                    bp_core_iso8601_date(bp_get_member_registered(array('relative' => false)));
                    ?>
"><?php 
                    bp_member_registered();
                    ?>
</span>
								<?php 
                } elseif ('active' == $settings['member_default']) {
                    ?>
									<span class="activity" data-livestamp="<?php 
                    bp_core_iso8601_date(bp_get_member_last_active(array('relative' => false)));
                    ?>
"><?php 
                    bp_member_last_active();
                    ?>
</span>
								<?php 
                } else {
                    ?>
									<span class="activity"><?php 
                    bp_member_total_friend_count();
                    ?>
</span>
								<?php 
                }
                ?>
							</div>
						</div>
					</li>

				<?php 
            }
            ?>

			</ul>

			<?php 
            wp_nonce_field('bp_core_widget_members', '_wpnonce-members', false);
            ?>

			<input type="hidden" name="members_widget_max" id="members_widget_max" value="<?php 
            echo esc_attr($settings['max_members']);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            esc_html_e('No one has signed up yet!', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $args['after_widget'];
        // Restore the global.
        $members_template = $old_members_template;
    }
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:101,代码来源:class-bp-core-members-widget.php

示例7: x_buddypress_members_list_item_header

    function x_buddypress_members_list_item_header()
    {
        ?>

    <div class="x-list-item-header">
      <div class="x-list-item-avatar-wrap item-avatar">
        <a href="<?php 
        bp_member_permalink();
        ?>
"><?php 
        bp_member_avatar();
        ?>
</a>
      </div>
      <div class="x-list-item-header-info">
        <p>
          <a href="<?php 
        bp_member_permalink();
        ?>
"><?php 
        bp_member_name();
        ?>
</a>
          <?php 
        if (bp_get_member_latest_update()) {
            ?>
            <span class="update"> <?php 
            bp_member_latest_update(array('length' => 150, 'view_link' => false));
            ?>
</span>
          <?php 
        }
        ?>
          <span class="activity"><?php 
        bp_member_last_active();
        ?>
</span>
        </p>
      </div>
    </div>

  <?php 
    }
开发者ID:ju4nr3v0l,项目名称:juandavidmarulanda.com,代码行数:43,代码来源:buddypress.php

示例8: bp_core_ajax_widget_members

/**
 * AJAX request handler for Members widgets.
 *
 * @since 1.0.0
 *
 * @see BP_Core_Members_Widget
 */
function bp_core_ajax_widget_members()
{
    check_ajax_referer('bp_core_widget_members');
    // Setup some variables to check.
    $filter = !empty($_POST['filter']) ? $_POST['filter'] : 'recently-active-members';
    $max_members = !empty($_POST['max-members']) ? absint($_POST['max-members']) : 5;
    // Determine the type of members query to perform.
    switch ($filter) {
        // Newest activated.
        case 'newest-members':
            $type = 'newest';
            break;
            // Popular by friends.
        // Popular by friends.
        case 'popular-members':
            if (bp_is_active('friends')) {
                $type = 'popular';
            } else {
                $type = 'active';
            }
            break;
            // Default.
        // Default.
        case 'recently-active-members':
        default:
            $type = 'active';
            break;
    }
    // Setup args for querying members.
    $members_args = array('user_id' => 0, 'type' => $type, 'per_page' => $max_members, 'max' => $max_members, 'populate_extras' => true, 'search_terms' => false);
    // Query for members.
    if (bp_has_members($members_args)) {
        ?>
		<?php 
        echo '0[[SPLIT]]';
        // Return valid result. TODO: remove this.
        ?>
		<?php 
        while (bp_members()) {
            bp_the_member();
            ?>
			<li class="vcard">
				<div class="item-avatar">
					<a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            bp_member_avatar();
            ?>
</a>
				</div>

				<div class="item">
					<div class="item-title fn"><a href="<?php 
            bp_member_permalink();
            ?>
" title="<?php 
            bp_member_name();
            ?>
"><?php 
            bp_member_name();
            ?>
</a></div>
					<?php 
            if ('active' === $type) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_last_active();
                ?>
</span></div>
					<?php 
            } elseif ('newest' === $type) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_registered();
                ?>
</span></div>
					<?php 
            } elseif (bp_is_active('friends')) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_total_friend_count();
                ?>
</span></div>
					<?php 
            }
            ?>
				</div>
			</li>

		<?php 
        }
        ?>
//.........这里部分代码省略.........
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:101,代码来源:bp-members-widgets.php

示例9: buat_get_user_template

function buat_get_user_template($type)
{
    $filtered_users = buat_gather_user_ids($type);
    if (bp_has_members("include={$filtered_users}&type=alphabetical")) {
        ?>
 
    <div class="pagination">
 
        <div class="pag-count" id="member-dir-count">
            <?php 
        bp_members_pagination_count();
        ?>
        </div>
 
        <div class="pagination-links" id="member-dir-pag">
            <?php 
        bp_members_pagination_links();
        ?>
        </div>
 
    </div>
 
    <?php 
        do_action('bp_before_directory_members_list');
        ?>
 
    <ul id="members-list" class="item-list" style="list-style-type:none; margin: 0; width: auto">
    <?php 
        while (bp_members()) {
            bp_the_member();
            ?>
 
        <li>
            <div class="item-avatar">
                <a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            bp_member_avatar();
            ?>
</a>
            </div>
 
            <div class="item">
                <div class="item-title">
                    <a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            bp_member_name();
            ?>
</a>
                    <?php 
            if (bp_get_member_latest_update()) {
                ?>
                        <span class="update"> - <?php 
                bp_member_latest_update('length=10');
                ?>
</span>
                    <?php 
            }
            ?>
                </div>
                <div class="item-meta"><span class="activity"><?php 
            bp_member_last_active();
            ?>
</span></div>
 
                <?php 
            do_action('bp_directory_members_item');
            ?>
 
                <?php 
            /***
             * If you want to show specific profile fields here you can,
             * but it'll add an extra query for each member in the loop
             * (only one regadless of the number of fields you show):
             *
             * bp_member_profile_data( 'field=the field name' );
             */
            ?>
            </div>
 
            <div class="action">
                <?php 
            do_action('bp_directory_members_actions');
            ?>
            </div>
 
            <div class="clear"></div>
        </li>
 
    <?php 
        }
        ?>
    </ul>
 
    <?php 
        do_action('bp_after_directory_members_list');
        ?>
//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:buat_functions.php

示例10: widget


//.........这里部分代码省略.........
            ?>
</a>
			</div>

			<ul id="friends-list" class="item-list">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title fn"><a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_name();
                ?>
</a></div>
							<div class="item-meta">
								<?php 
                if ('newest' == $instance['friend_default']) {
                    ?>
									<span class="activity" data-livestamp="<?php 
                    bp_core_iso8601_date(bp_get_member_registered(array('relative' => false)));
                    ?>
"><?php 
                    bp_member_registered();
                    ?>
</span>
								<?php 
                } elseif ('active' == $instance['friend_default']) {
                    ?>
									<span class="activity" data-livestamp="<?php 
                    bp_core_iso8601_date(bp_get_member_last_active(array('relative' => false)));
                    ?>
"><?php 
                    bp_member_last_active();
                    ?>
</span>
								<?php 
                } else {
                    ?>
									<span class="activity"><?php 
                    bp_member_total_friend_count();
                    ?>
</span>
								<?php 
                }
                ?>
							</div>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            wp_nonce_field('bp_core_widget_friends', '_wpnonce-friends');
            ?>
			<input type="hidden" name="friends_widget_max" id="friends_widget_max" value="<?php 
            echo absint($instance['max_friends']);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('Sorry, no members were found.', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        // Restore the global.
        $members_template = $old_members_template;
    }
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:101,代码来源:class-bp-core-friends-widget.php

示例11: widget


//.........这里部分代码省略.........
                ?>

					| <a href="<?php 
                echo site_url(bp_get_members_root_slug());
                ?>
" id="popular-members" <?php 
                if ($instance['member_default'] == 'popular') {
                    ?>
class="selected"<?php 
                }
                ?>
><?php 
                _e('Popular', 'buddypress');
                ?>
</a>

				<?php 
            }
            ?>
			</div>

			<ul id="members-list" class="item-list">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title fn"><a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_name();
                ?>
</a></div>
							<div class="item-meta">
								<span class="activity">
								<?php 
                if ('newest' == $instance['member_default']) {
                    bp_member_registered();
                }
                if ('active' == $instance['member_default']) {
                    bp_member_last_active();
                }
                if ('popular' == $instance['member_default']) {
                    bp_member_total_friend_count();
                }
                ?>
								</span>
							</div>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            nxt_nonce_field('bp_core_widget_members', '_nxtnonce-members');
            ?>
			<input type="hidden" name="members_widget_max" id="members_widget_max" value="<?php 
            echo esc_attr($instance['max_members']);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('No one has signed up yet!', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:101,代码来源:bp-core-widgets.php

示例12: bp_core_ajax_widget_members

/** Widget AJAX ******************/

function bp_core_ajax_widget_members() {
	global $bp;

	check_ajax_referer( 'bp_core_widget_members' );

	switch ( $_POST['filter'] ) {
		case 'newest-members':
			$type = 'newest';
			break;

		case 'recently-active-members':
			$type = 'active';
			break;

		case 'popular-members':
			if ( bp_is_active( 'friends' ) )
				$type = 'popular';
			else
				$type = 'active';

			break;
	}

	if ( bp_has_members( 'user_id=0&type=' . $type . '&per_page=' . $_POST['max-members'] . '&max=' . $_POST['max-members'] . '&populate_extras=0' ) ) : ?>
		<?php echo '0[[SPLIT]]'; // return valid result. TODO: remove this. ?>
		<div class="avatar-block">
			<?php while ( bp_members() ) : bp_the_member(); ?>
				<li class="vcard">
					<div class="item-avatar">
						<a href="<?php bp_member_permalink() ?>"><?php bp_member_avatar() ?></a>
					</div>

					<div class="item">
						<div class="item-title fn"><a href="<?php bp_member_permalink() ?>" title="<?php bp_member_name() ?>"><?php bp_member_name() ?></a></div>
						<?php if ( 'active' == $type || 'newest' == $type ) : ?>
							<div class="item-meta"><span class="activity"><?php bp_member_last_active() ?></span></div>
						<?php elseif ( bp_is_active( 'friends' ) ) : ?>
							<div class="item-meta"><span class="activity"><?php bp_member_total_friend_count() ?></span></div>
						<?php endif; ?>
					</div>
				</li>

			<?php endwhile; ?>
		</div>

	<?php else: ?>
		<?php echo "-1[[SPLIT]]<li>"; ?>
		<?php _e( 'There were no members found, please try another filter.', 'buddypress' ) ?>
		<?php echo "</li>"; ?>
	<?php endif;
}
开发者ID:n-sane,项目名称:zaroka,代码行数:53,代码来源:bp-core-widgets.php


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