Пример #1
0
                            <?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>

                    <div class="item-quote">
                        <?php if ( bp_get_member_latest_update() ) : ?>
                            <span class="update"> <?php bp_member_latest_update(); ?></span>
                        <?php endif; ?>
                    </div>

                    <div class="action">

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

                    </div>

                </div>
            </li>

        <?php endwhile; ?>
/**
 * Output the latest update of the current member in the loop.
 *
 * @param array|string $args Array of arguments for latest update.
 */
function bp_member_latest_update($args = '')
{
    echo bp_get_member_latest_update($args);
}
Пример #3
0
        ?>
</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();
            ?>
</span>

					<?php 
        }
        ?>

				</div>

				<div class="item-meta"><span class="activity"><?php 
        bp_member_last_active();
    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 
    }
Пример #5
0
        bp_member_permalink();
        ?>
"><h3><?php 
        bp_member_name();
        ?>
</h3></a>
					<div class="activity"><small><?php 
        bp_member_last_active();
        ?>
</small></div>
					<?php 
        if (bp_get_member_latest_update()) {
            ?>
						<p class="update">
						<?php 
            $latestud = html_entity_decode(bp_get_member_latest_update());
            //$latestud = str_replace('"', '', $latestupd);
            $latestud = substr($latestud, 3);
            $latestud = str_replace('\\n', '<br />', $latestud);
            $latestud = str_replace('"<', '<br /><', $latestud);
            $latestud = str_replace('<a ', '<br /><a class="btn1" ', $latestud);
            //$latestud = str_replace('', '', $latestud);
            echo $latestud;
            ?>
						</p>
					<?php 
        }
        ?>
				</div>

				<?php 
Пример #6
0
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');
        ?>
 
    <?php 
        bp_member_hidden_fields();
        ?>
 
<?php 
    } else {
        ?>
 
    <div id="message" class="info">
        <p><?php 
        _e("Sorry, no members were found.", 'buddypress');
        ?>
</p>
    </div>
 
<?php 
    }
}
Пример #7
0
    /**
     * BP Members Grid
     */
    function bp_members_grid($atts)
    {
        $output = '';
        $default_columns = 3;
        // 4 columns
        $allowed_columns = array(2, 3, 4, 6);
        extract(shortcode_atts(array('type' => '', 'max_item' => 10, 'columns' => $default_columns), $atts));
        $columns = floor(12 / $columns);
        // catch invalid columns
        if (!in_array($columns, $allowed_columns)) {
            $columns = $default_columns;
        }
        // available columns are  2, 3, 4, and 6
        $columns_classes = ' col-md-' . $columns . ' col-sm-' . $columns . ' col-xs-6';
        $params = array('type' => $type, 'per_page' => $max_item);
        if (function_exists('bp_has_members')) {
            if (bp_has_members($params)) {
                ob_start();
                ?>
				<ul class="ul-bp-members-grid">
					<?php 
                while (bp_members()) {
                    bp_the_member();
                    $name = bp_get_member_name();
                    $permalink = bp_get_member_permalink();
                    $last_active = bp_get_member_last_active();
                    $status_update = "";
                    $membersStatusUpdate = bp_get_member_latest_update();
                    if (!empty($membersStatusUpdate)) {
                        $status_update = $membersStatusUpdate;
                    }
                    $content = '<p>' . $status_update . '</p><p>' . $last_active . '</p>';
                    ?>
						<li class="bp-members-grid-item <?php 
                    echo $columns_classes;
                    ?>
">
							<div class="gears-bp-members-grid">
								<a href="<?php 
                    echo esc_url($permalink);
                    ?>
" title="<?php 
                    echo esc_attr($name);
                    ?>
">
									<span class="members-name"><?php 
                    echo esc_attr($name);
                    ?>
</span>
								</a>
								<a href="<?php 
                    echo esc_url($permalink);
                    ?>
" title="<?php 
                    echo esc_attr($name);
                    ?>
">
									<?php 
                    echo bp_get_member_avatar(array('type' => 'full', 'class' => 'avatar'));
                    ?>
								</a>
								
							</div>
						</li>
						<?php 
                }
                ?>
				</ul>
				<?php 
            }
            $output = ob_get_clean();
            return $output;
        } else {
            return $this->bp_not_installed;
        }
    }
Пример #8
0
        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>';
            echo '</div><!--end member-inner-list-->
				</li>';
        }
        echo '</ul>';
        echo '</div>';
        echo '</div>';
        $output = ob_get_clean();
    }
} else {