本文整理汇总了PHP中bp_group_the_member函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_group_the_member函数的具体用法?PHP bp_group_the_member怎么用?PHP bp_group_the_member使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_group_the_member函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_members_pagination_links
bp_members_pagination_links();
?>
</div>
</div>
<?php
do_action('bp_before_group_members_list');
?>
<ul id="member-list" class="item-list" role="main">
<?php
while (bp_group_members()) {
bp_group_the_member();
?>
<li>
<a href="<?php
bp_group_member_domain();
?>
">
<?php
bp_group_member_avatar_thumb();
?>
</a>
<h5><?php
示例2: invite_anyone_invite_query
/**
* Fetch a list of site members eligible to be invited to a group.
*
* The list is essentially a list of everyone on the site, minus the logged in user and members
* of the current group.
*
* @package Invite Anyone
* @since 1.0
*
* @param int $group_id The group_id you want to exclude
* @param str $search_terms If you want to search on username/display name
* @return array $users An array of located users
*/
function invite_anyone_invite_query($group_id = false, $search_terms = false, $fields = 'all')
{
// Get a list of group members to be excluded from the main query
$group_members = array();
$args = array('group_id' => $group_id, 'exclude_admins_mods' => false);
if ($search_terms) {
$args['search'] = $search_terms;
}
if (bp_group_has_members($args)) {
while (bp_group_members()) {
bp_group_the_member();
$group_members[] = bp_get_group_member_id();
}
}
// Don't include the logged-in user, either
$group_members[] = bp_loggedin_user_id();
$fields = 'ID' == $fields ? 'ID' : 'all';
// Now do a user query
// Pass a null blog id so that the capabilities check is skipped. For BP blog_id doesn't
// matter anyway
$user_query = new Invite_Anyone_User_Query(array('blog_id' => NULL, 'exclude' => $group_members, 'search' => $search_terms, 'fields' => $fields));
return $user_query->results;
}
示例3: user_list_html
function user_list_html($html, $selected)
{
if (bp_group_has_members(array('exclude_admins_mods' => false, 'per_page' => false, 'max' => false))) {
global $members_template;
usort($members_template->members, array(&$this, 'sort_by_display_name_cb'));
$html = '<select name="cp-task-assign" id="cp-task-assign">';
while (bp_group_members()) {
bp_group_the_member();
$html .= '<option value="' . bp_get_group_member_id() . '" ' . selected(bp_get_group_member_id(), $selected, false) . '>' . bp_get_group_member_name() . '</option>';
}
$html .= '</select>';
}
return $html;
}
示例4: bp_groupblog_member_join
/**
* bp_groupblog_member_join( $group_id )
*
* Runs whenever member permissions are changed and saved - by Boone
*/
function bp_groupblog_member_join($group_id)
{
$params = array('exclude_admins_mods' => 0, 'per_page' => 10000, 'group_id' => $group_id);
if (bp_group_has_members($params)) {
$blog_id = groups_get_groupmeta($group_id, 'groupblog_blog_id');
$group = groups_get_group(array('group_id' => $group_id));
while (bp_group_members()) {
bp_group_the_member();
$user_id = bp_get_group_member_id();
if ($group->creator_id != $user_id) {
bp_groupblog_upgrade_user($user_id, $group_id, $blog_id);
}
}
}
}
示例5: groups_ajax_member_admin_list
function groups_ajax_member_admin_list()
{
global $bp;
?>
<?php
if (bp_group_has_members('group_id=' . $_REQUEST['group_id'] . '&per_page=' . $_REQUEST['num'])) {
?>
<?php
if (bp_group_member_needs_pagination()) {
?>
<div id="member-count" class="pag-count">
<?php
bp_group_member_pagination_count();
?>
</div>
<div id="member-admin-pagination" class="pagination-links">
<?php
bp_group_member_admin_pagination();
?>
</div>
<?php
}
?>
<ul id="members-list" class="item-list single-line">
<?php
while (bp_group_members()) {
bp_group_the_member();
?>
<?php
if (bp_group_member_is_banned()) {
?>
<li class="banned-user">
<?php
bp_group_member_avatar_mini();
?>
<h5><?php
bp_group_member_link();
?>
<?php
_e('(banned)', 'buddypress');
?>
<span class="small"> — <a href="<?php
bp_group_member_unban_link();
?>
" title="<?php
_e('Kick and ban this member', 'buddypress');
?>
"><?php
_e('Remove Ban', 'buddypress');
?>
</a> </h5>
<?php
} else {
?>
<li>
<?php
bp_group_member_avatar_mini();
?>
<h5><?php
bp_group_member_link();
?>
<span class="small"> — <a href="<?php
bp_group_member_ban_link();
?>
" title="<?php
_e('Kick and ban this member', 'buddypress');
?>
"><?php
_e('Kick & Ban', 'buddypress');
?>
</a> | <a href="<?php
bp_group_member_promote_link();
?>
" title="<?php
_e('Promote this member', 'buddypress');
?>
"><?php
_e('Promote to Moderator', 'buddypress');
?>
</a></span></h5>
<?php
}
?>
</li>
<?php
}
?>
</ul>
<?php
} else {
?>
<div id="message" class="info">
<p><?php
//.........这里部分代码省略.........
示例6: bp_group_management_admin_edit
//.........这里部分代码省略.........
?>
<h3><?php
_e('Manage current and banned group members', 'bp-group-management');
?>
</h3>
<?php
if (bp_group_member_needs_pagination()) {
?>
<div class="pagination no-ajax">
<div id="member-count" class="pag-count">
<?php
bp_group_member_pagination_count();
?>
</div>
<div id="member-admin-pagination" class="pagination-links">
<?php
bp_group_member_admin_pagination();
?>
</div>
</div>
<?php
}
?>
<ul id="members-list" class="item-list single-line">
<?php
while (bp_group_members()) {
bp_group_the_member();
?>
<?php
if (bp_get_group_member_is_banned()) {
?>
<li class="banned-user">
<?php
bp_group_member_avatar_mini();
?>
<?php
$unkicklink = "admin.php?page=bp-group-management&action=edit&id=" . $id . "&member_id=" . bp_get_group_member_id() . "&member_action=unkick";
$unkicklink = function_exists('wp_nonce_url') ? wp_nonce_url($unkicklink, 'bp-group-management-action_unkick') : $unkicklink;
?>
<?php
bp_group_member_link();
?>
<?php
_e('(banned)', 'bp-group-management');
?>
<span class="small"> - <a href="<?php
echo $unkicklink;
?>
" class="confirm" title="<?php
_e('Remove Ban', 'bp-group-management');
?>
"><?php
_e('Remove Ban', 'bp-group-management');
?>
</a>
<?php
示例7: bp_gtm_filter_users
function bp_gtm_filter_users($resps = null)
{
global $bp;
if (bp_group_has_members(array('per_page' => 1000, 'exclude_admins_mods' => 0))) {
$check = array();
if (!empty($resps) && !empty($bp->action_variables[1]) && $bp->action_variables[1] == 'edit') {
$check = $resps;
}
?>
<div class="wrap-roles">
<?php
do_action('bp_before_group_members_list');
?>
<ul id="member-list" class="item-list" role="main">
<?php
while (bp_group_members()) {
bp_group_the_member();
?>
<?php
$member = bp_get_member_user_login();
?>
<li <?php
echo in_array($member, $check) ? 'class="red"' : '';
?>
><input type="checkbox" name="user_ids[<?php
esc_attr(bp_member_user_login());
?>
]" class="check-user" value="<?php
esc_attr(bp_member_user_login());
?>
" <?php
echo in_array($member, $check) ? 'checked="checked"' : '';
?>
/>
<?php
bp_group_member_avatar_thumb();
?>
<h5><?php
echo $member;
?>
</h5>
<?php
if (bp_is_active('friends')) {
?>
<div class="action">
<?php
do_action('bp_directory_members_actions_loop', bp_get_member_user_login());
?>
</div>
<?php
}
?>
</li>
<?php
}
?>
</ul>
<?php
do_action('bp_after_group_members_list');
?>
</div>
<?php
} else {
?>
<div id="message" class="info">
<p><?php
_e("Sorry, no members were found.", 'buddypress');
?>
</p>
</div>
<?php
}
}