本文整理汇总了PHP中bp_activity_pagination_links函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_activity_pagination_links函数的具体用法?PHP bp_activity_pagination_links怎么用?PHP bp_activity_pagination_links使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_activity_pagination_links函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_activity_pagination_count
<?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">
<?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">
<?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
}
?>
//.........这里部分代码省略.........
示例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> <span class="ajax-loader"></span>
示例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();
//.........这里部分代码省略.........