function bp_get_group_avatar_mini($group = false) { return bp_get_group_avatar('type=thumb&width=30&height=30'); }
function bp_get_group_avatar_micro() { return bp_get_group_avatar('type=thumb&width=15&height=15'); }
/** * Return the miniature group avatar thumbnail while in the groups loop. * * @since 1.0.0 * * @param object|bool $group Optional. Group object. * Default: current group in loop. * @return string */ function bp_get_group_avatar_mini($group = false) { return bp_get_group_avatar(array('type' => 'thumb', 'width' => 30, 'height' => 30, 'id' => !empty($group->id) ? $group->id : false)); }
if (bp_has_groups($params)) { ?> <div class="clearfix"> <ul class="bp-groups-list"> <?php while (bp_groups()) { ?> <?php bp_the_group(); ?> <li class="clearfix bp-groups-list-item"> <?php $avatar_config = array('type' => 'full', 'class' => 'avatar col-xs-3 col-sm-3 col-lg-3 col-md-3'); ?> <?php echo bp_get_group_avatar($avatar_config); ?> <div class="col-xs-9 col-md-9 col-sm-9 col-xs-9"> <h5> <a href="<?php echo esc_attr(bp_get_group_permalink()); ?> " title="<?php echo esc_attr(bp_get_group_name()); ?> "> <?php echo esc_attr(bp_get_group_name()); ?> </a> </h5>
function rw_bp_docs_set_the_doc_relatetd_group() { $d_doc_id = $folder_id = $group_id = 0; $group = new stdClass(); $url = '#'; $description = ''; if (bp_docs_is_existing_doc()) { $d_doc_id = get_queried_object_id(); $folder_id = bp_docs_get_doc_folder($d_doc_id); if ($folder_id) { $group_id = bp_docs_get_folder_group($folder_id); if ($group_id) { $group = groups_get_group(array('group_id' => $group_id)); buddypress()->groups->current_group = $group; if (!bp_disable_group_avatar_uploads()) { $url = bp_get_groups_root_slug() . '/' . $group->slug; } $avatar = bp_get_group_avatar('type=thumb&width=250&height=250'); $description = $group->description; $name = $group->name; } } else { $post = get_post($d_doc_id); $user = get_userdata($post->post_author); $name = $user->display_name; $avatar = bp_core_fetch_avatar(array('type' => 'thumb', 'width' => 250, 'height' => 250, 'item_id' => $user->ID)); $description = ''; $url = bp_get_members_root_slug() . '/' . $user->nice_name; } } ?> <div id="bp_docs_sitebar_info"> <h2><a href="/<?php echo $url; ?> "><?php echo $name; ?> </a></h2> <div class="group-avatar"> <a href="/<?php echo $url; ?> "><?php echo $avatar; ?> </a> </div> <div class="group-info"> <p><?php echo $description; ?> </p> </div> </div> <hr> <?php }
/** * BP Groups Grid */ function bp_groups_grid($atts) { $default_columns = 3; //four columns $allowed_columns = array(2, 3, 4, 6); extract(shortcode_atts(array('type' => 'active', 'max_item' => 10, 'columns' => $default_columns), $atts)); $columns = floor(12 / $columns); // ensure that columns is scalable if (!in_array($columns, $allowed_columns)) { // default to default columns settings, just in case $columns = $default_columns; } $columns_classes = 'col-md-' . $columns . ' col-sm-' . $columns . ' col-xs-6'; $params = array('type' => $type, 'per_page' => $max_item); $output = ''; if (function_exists('bp_has_groups')) { if (bp_has_groups($params)) { ob_start(); ?> <ul class="clearfix gears-bp-groups-grid"> <?php while (bp_groups()) { ?> <?php bp_the_group(); ?> <li class="bp-groups-grid-item <?php echo $columns_classes; ?> "> <?php $name = bp_get_group_name(); ?> <?php $permalink = bp_get_group_permalink(); ?> <?php $last_active = bp_get_group_last_active(); ?> <?php $members_count = bp_get_group_member_count(); ?> <?php $modal_content = esc_attr($members_count . ' · ' . __('Active ', 'gears') . $last_active . ''); ?> <a title="<?php echo esc_attr($name); ?> " href="<?php echo esc_url($permalink); ?> "> <span class="groups-name"> <?php echo esc_attr($name); ?> <span class="groups-count"> <?php echo intval($members_count); ?> <?php if ($members_count == 1) { ?> <?php _e('Member', 'gears'); ?> <?php } else { ?> <?php _e('Members', 'gears'); ?> <?php } ?> </span> </span> </a> <a title="<?php echo esc_attr($name); ?> " href="<?php echo esc_url($permalink); ?> "> <?php echo bp_get_group_avatar(array('type' => 'full')); ?> </a> </li> <?php } ?> </ul> <?php $output = ob_get_clean(); return $output; } else { return '<div class="alert alert-info">' . __('There are no groups to display. Please try again soon.', 'gears') . '</div>'; } } else { return $this->bp_not_installed; } }
function bp_get_the_site_group_avatar() { global $site_groups_template; return apply_filters('bp_the_site_group_avatar', bp_get_group_avatar($site_groups_template->group)); }
if ($autoplay != '') { $data_attr .= ' data-autoplay="' . $autoplay . '"'; } if (function_exists('bp_is_active') && bp_is_active('groups')) { if (bp_has_groups($params)) { $output = '<div class="wpb_wrapper">'; $output .= '<div class="kleo-carousel-container bp-groups-carousel ' . $class . '">'; $output .= '<div class="kleo-carousel-items kleo-groups-carousel" data-min-items="' . $min_items . '" data-max-items="' . $max_items . '"' . $data_attr . '>'; $output .= '<ul class="kleo-carousel">'; while (bp_groups()) { $output .= '<li><article>'; $output .= '<div class="loop-image">'; bp_the_group(); $output .= '<div class="item-avatar ' . $rounded . '">'; $output .= '<a href="' . bp_get_group_permalink() . '" title="' . esc_attr(bp_get_group_name()) . '">'; $output .= bp_get_group_avatar(array('type' => $image_size, 'width' => $item_width, 'height' => $item_width)); $output .= kleo_get_img_overlay(); $output .= '</a>'; $output .= '</div>'; $output .= '</div>'; $output .= '</article></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>'; } else { $output .= '<div class="alert alert-info">' . __('There are no groups to display. Please try again soon.', 'k-elements') . '</div>'; } } else {
$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') && bp_is_active('groups')) { // begin bp groups loop if (bp_has_groups($params)) { $output .= '<div class="wpb_wrapper">'; $output .= '<div class="kleo-gallery' . $anim1 . '">'; $output .= '<div class="kleo-thumbs-images ' . $class . '">'; while (bp_groups()) { bp_the_group(); $output .= '<a href="' . bp_get_group_permalink() . '" title="' . esc_attr(bp_get_group_name()) . '">'; $output .= bp_get_group_avatar(array('type' => 'full', 'width' => '250', 'height' => '250')); $output .= kleo_get_img_overlay(); $output .= '</a>'; } $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; } else { $output = __("No groups were found at the moment. Please come back later.", "k-elements"); } } else { $output = __("This shortcode must have Buddypress installed to work.", "k-elements"); }
/** * Formats the output user block */ function format_data($context) { // Setup the basic info block $block = '<a class="member-name" href="' . $this->domain . '" title="View ' . $this->fullname . ' Group Page">' . $this->fullname . '</a>'; $block .= '<p class="group-server">' . $this->servname . '</p>'; $block .= $allegiance = '<p class="user-allegiance ' . $this->alliance . '">' . $this->faction . '</p>'; $block .= $this->tooltip(); $block .= '<p class="group-member-count">' . $this->members . '</p>'; // Do some things differently depending on context switch ($context) { case 'directory': $avatar = bp_get_group_avatar($args = array('type' => 'thumb', 'height' => $this->size, 'width' => $this->size)); $avatar = '<a class="member-avatar" href="' . $this->domain . '" title="View ' . $this->fullname . ' Group Page">' . $avatar . '</a>'; $avatar = '<div class="directory-member-avatar">' . $avatar . '</div>'; break; case 'profile': $avatar = bp_get_group_avatar($args = array('type' => 'full', 'height' => $this->size, 'width' => $this->size)); $avatar = '<a class="member-avatar" href="' . $this->domain . '" title="View ' . $this->fullname . ' Group Page">' . $avatar . '</a>'; break; case 'widget': $avatar = bp_get_group_avatar($args = array('type' => 'thumb', 'height' => $this->size, 'width' => $this->size)); $avatar = '<a class="member-avatar" href="' . $this->domain . '" title="View ' . $this->fullname . ' Group Page">' . $avatar . '</a>'; $block = '<div id="featured-guild-meta" class="user-meta">' . $block . '</div>'; break; } // Prepend the avatar $this->avatar = $avatar; // Add the html to the object $this->block = $this->avatar . '<div class="user-meta">' . $block . '</div>'; }