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


PHP bp_activity_pagination_count函数代码示例

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


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

示例1: do_action

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

<?php 
if (bp_has_activities(bp_ajax_querystring('activity'))) {
    ?>

	<?php 
    /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */
    ?>
	<noscript>
		<div class="pagination">
			<div class="pag-count"><?php 
    bp_activity_pagination_count();
    ?>
</div>
			<div class="pagination-links"><?php 
    bp_activity_pagination_links();
    ?>
</div>
		</div>
	</noscript>

	<?php 
    if (empty($_POST['page'])) {
        ?>

		<ul id="activity-stream" class="activity-list item-list">
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:29,代码来源:activity-loop.php

示例2: bp_swa_list_activities

function bp_swa_list_activities($per_page = 10, $page = 1, $scope = '', $max = 200, $show_avatar = "yes", $show_filters = "yes", $included = false, $excluded = false, $is_personal = "no", $is_blog_admin_activity = "no", $show_post_form = "no")
{
    //check for the scope of activity
    //is it the activity of logged in user/blog admin
    //logged in user over rides blog admin
    global $bp;
    $primary_id = '';
    if (bp_is_group()) {
        $primary_id = null;
    }
    $user_id = "";
    //for limiting to users
    if ($is_personal == "yes") {
        $user_id = $bp->loggedin_user->id;
    } else {
        if ($is_blog_admin_activity == "yes") {
            $user_id = swa_get_blog_admin_id();
        } else {
            if (bp_is_user()) {
                $user_id = null;
            }
        }
    }
    $components_scope = swa_get_base_component_scope($included, $excluded);
    $components_base_scope = "";
    if (!empty($components_scope)) {
        $components_base_scope = join(",", $components_scope);
    }
    ?>
      <div class='swa-wrap block1'>
          <?php 
    if (is_user_logged_in() && $show_post_form == "yes") {
        swa_show_post_form();
    }
    ?>
          <?php 
    if ($show_filters == "yes") {
        ?>
			<ul id="activity-filter-links">
				<?php 
        swa_activity_filter_links("scope=" . $scope . "&include=" . $included . "&exclude=" . $excluded);
        ?>
			</ul>
          <div class="clear"></div>
                    <?php 
    }
    ?>
        <?php 
    if (bp_has_activities('type=sitewide&max=' . $max . '&page=' . $page . '&per_page=' . $per_page . '&object=' . $scope . "&user_id=" . $user_id . "&primary_id=" . $primary_id)) {
        ?>

            <div class="swa-pagination ">
                    <div class="pag-count" id="activity-count">
                            <?php 
        bp_activity_pagination_count();
        ?>
                    </div>

                    <div class="pagination-links" id="activity-pag">
                            &nbsp; <?php 
        bp_activity_pagination_links();
        ?>
                    </div>
                <div class="clear" ></div>
            </div>


            <div class="clear" ></div>
                <ul  class="site-wide-stream swa-activity-list">
                    <?php 
        while (bp_activities()) {
            bp_the_activity();
            ?>
                        <?php 
            swa_activity_entry($show_avatar);
            ?>
                    <?php 
        }
        ?>
               </ul>

	<?php 
    } else {
        ?>

        <div class="widget-error">
            <?php 
        if ($is_personal == "yes") {
            $error = sprintf(__("You have no recent %s activity.", "swa"), $scope);
        } else {
            $error = __('There has been no recent site activity.', 'swa');
        }
        ?>
                <?php 
        echo $error;
        ?>
        </div>
	<?php 
    }
    ?>
//.........这里部分代码省略.........
开发者ID:picassentviu,项目名称:AMMPro,代码行数:101,代码来源:bp-sitewide-activity.php

示例3: bp_dtheme_activity_loop

<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_activity_loop() */ ?>

<?php do_action( 'bp_before_activity_loop' ) ?>

<?php global $bp;
if ( bp_is_active("activity")&&bp_has_activities( "action=gallery_new_comment&show_hidden=1&secondary_id=".$bp->gallery->current_gallery->id ) ) : ?>


	<?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?>
	<noscript>
		<div class="pagination">
			<div class="pag-count"><?php bp_activity_pagination_count() ?></div>
			<div class="pagination-links"><?php bp_activity_pagination_links() ?></div>
		</div>
	</noscript>
<?php if ( is_user_logged_in() ) : ?>
				<?php locate_template( array( 'gallery/single/media/post-form.php'), true ) ?>
			<?php endif; ?>
	<?php if ( empty( $_POST['page'] ) ) : ?>
		<ul id="activity-stream" class="activity-list item-list">
	<?php endif; ?>

	<?php while ( bp_activities() ) : bp_the_activity(); ?>

		<?php include( locate_template( array( 'activity/entry.php' ), false ) ) ?>

	<?php endwhile; ?>

	<?php if ( bp_get_activity_count() == bp_get_activity_per_page() ) : ?>
		<li class="load-more">
			<a href="#more"><?php _e( 'Load More', 'buddypress' ) ?></a> &nbsp; <span class="ajax-loader"></span>
开发者ID:r-chopra17,项目名称:p2bp,代码行数:31,代码来源:activity.php

示例4: generate_activity_stream

    public function generate_activity_stream($atts, $content = null)
    {
        //allow to use all those args awesome!
        $atts = shortcode_atts(array('title' => 'Latest Activity', 'pagination' => 'true', 'display_comments' => 'threaded', 'include' => false, 'exclude' => false, 'in' => false, 'sort' => 'DESC', 'page' => 1, 'per_page' => 5, 'max' => false, 'scope' => false, 'user_id' => false, 'object' => false, 'action' => false, 'primary_id' => false, 'secondary_id' => false, 'search_terms' => false, 'use_compat' => bp_use_theme_compat_with_current_theme(), 'allow_posting' => false), $atts);
        extract($atts);
        //hide on user activity, activity directory and group activity
        if (is_user_logged_in() && (function_exists('bp_is_activity_component') && bp_is_activity_component() || function_exists('bp_is_group_home') && bp_is_group_home())) {
            return '';
        }
        ob_start();
        ?>
	
    <?php 
        if ($use_compat) {
            ?>
        <div id="buddypress">
    <?php 
        }
        ?>
		
	<?php 
        if ($title) {
            ?>
            <h3 class="activity-shortcode-title"><?php 
            echo $title;
            ?>
</h3>
        <?php 
        }
        ?>
    
		
        <?php 
        do_action('bp_before_activity_loop');
        ?>
			
		<?php 
        if ($allow_posting && is_user_logged_in()) {
            ?>

			<?php 
            bp_locate_template(array('activity/post-form.php'), true);
            ?>

		<?php 
        }
        ?>
			
        <?php 
        if (bp_has_activities($atts)) {
            ?>
            <div class="activity <?php 
            if (!$display_comments) {
                ?>
 hide-activity-comments<?php 
            }
            ?>
 shortcode-activity-stream">

                 <?php 
            if (empty($_POST['page'])) {
                ?>

                    <ul id="activity-stream" class="activity-list item-list">

                 <?php 
            }
            ?>

                 <?php 
            while (bp_activities()) {
                bp_the_activity();
                ?>

                    <?php 
                bp_get_template_part('activity/entry');
                ?>

                 <?php 
            }
            ?>

                 <?php 
            if (empty($_POST['page'])) {
                ?>
                    </ul>
                 <?php 
            }
            ?>
                
                <?php 
            if ($pagination) {
                ?>
                    <div class="pagination">
                        <div class="pag-count"><?php 
                bp_activity_pagination_count();
                ?>
</div>
                        <div class="pagination-links"><?php 
                bp_activity_pagination_links();
//.........这里部分代码省略.........
开发者ID:poweronio,项目名称:mbsite,代码行数:101,代码来源:bp-activity-as-shortcode.php


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