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


PHP bp_activity_action函数代码示例

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


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

示例1: widget

	function widget($args, $instance) {
		global $bp;

		extract( $args );

		echo $before_widget;
		echo $before_title . $widget_name . $after_title;

		if ( empty( $instance['max_posts'] ) || !$instance['max_posts'] )
			$instance['max_posts'] = 10; ?>

		<?php if ( bp_has_activities( 'action=new_blog_post&max=' . $instance['max_posts'] . '&per_page=' . $instance['max_posts'] ) ) : ?>

			<ul id="blog-post-list" class="activity-list item-list">

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

					<li>
						<div class="activity-content" style="margin: 0">

							<div class="activity-header">
								<?php bp_activity_action() ?>
							</div>

							<?php if ( bp_get_activity_content_body() ) : ?>
								<div class="activity-inner">
									<?php bp_activity_content_body() ?>
								</div>
							<?php endif; ?>

						</div>
					</li>

				<?php endwhile; ?>

			</ul>

		<?php else : ?>
			<div id="message" class="info">
				<p><?php _e( 'Sorry, there were no blog posts found. Why not write one?', 'buddypress' ) ?></p>
			</div>
		<?php endif; ?>

		<?php echo $after_widget; ?>
	<?php
	}
开发者ID:n-sane,项目名称:zaroka,代码行数:46,代码来源:bp-blogs-widgets.php

示例2: x_buddypress_activity_list_item_header

    function x_buddypress_activity_list_item_header()
    {
        ?>

    <div class="x-list-item-header">
      <div class="x-list-item-avatar-wrap activity-avatar">
        <a href="<?php 
        bp_activity_user_link();
        ?>
">
          <?php 
        bp_activity_avatar();
        ?>
        </a>
      </div>
      <div class="x-list-item-header-info">
        <?php 
        bp_activity_action();
        ?>
      </div>
    </div>

  <?php 
    }
开发者ID:ju4nr3v0l,项目名称:juandavidmarulanda.com,代码行数:24,代码来源:buddypress.php

示例3: bp_activity_user_link

        <div class="activity-avatar">
            <a href="<?php 
bp_activity_user_link();
?>
">
    
                <?php 
bp_activity_avatar();
?>
    
            </a>
        </div>
        <div class="activity-header">
    
            <?php 
bp_activity_action();
?>
    
        </div>
    
        <?php 
if ('activity_comment' == bp_get_activity_type()) {
    ?>
    
            <div class="activity-inreplyto">
                <strong><?php 
    _e('In reply to: ', 'firmasite');
    ?>
</strong><?php 
    bp_activity_parent_content();
    ?>
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:31,代码来源:entry.php

示例4: widget

    /**
     * Display the networkwide posts widget.
     *
     * @see WP_Widget::widget() for description of parameters.
     *
     * @param array $args     Widget arguments.
     * @param array $instance Widget settings, as saved by the user.
     */
    public function widget($args, $instance)
    {
        $title = !empty($instance['title']) ? esc_html($instance['title']) : __('Recent Networkwide Posts', 'buddypress');
        if (!empty($instance['link_title'])) {
            $title = '<a href="' . bp_get_blogs_directory_permalink() . '">' . esc_html($title) . '</a>';
        }
        /**
         * Filters the Blogs Recent Posts widget title.
         *
         * @since BuddyPress (2.2.0)
         * @since BuddyPress (2.3.0) Added 'instance' and 'id_base' to arguments passed to filter.
         *
         * @param string $title    The widget title.
         * @param array  $instance The settings for the particular instance of the widget.
         * @param string $id_base  Root ID for all widgets of this type.
         */
        $title = apply_filters('widget_title', $title, $instance, $this->id_base);
        echo $args['before_widget'];
        echo $args['before_title'] . $title . $args['after_title'];
        if (empty($instance['max_posts']) || empty($instance['max_posts'])) {
            $instance['max_posts'] = 10;
        }
        // Override some of the contextually set parameters for bp_has_activities()
        $args = array('action' => 'new_blog_post', 'max' => $instance['max_posts'], 'per_page' => $instance['max_posts'], 'user_id' => 0, 'scope' => false, 'object' => false, 'primary_id' => false);
        ?>

		<?php 
        if (bp_has_activities($args)) {
            ?>

			<ul id="blog-post-list" class="activity-list item-list">

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

					<li>
						<div class="activity-content" style="margin: 0">
							<div class="activity-header"><?php 
                bp_activity_action();
                ?>
</div>

							<?php 
                if (bp_get_activity_content_body()) {
                    ?>

								<div class="activity-inner"><?php 
                    bp_activity_content_body();
                    ?>
</div>

							<?php 
                }
                ?>

						</div>
					</li>

				<?php 
            }
            ?>

			</ul>

		<?php 
        } else {
            ?>

			<div id="message" class="info">
				<p><?php 
            _e('Sorry, there were no posts found. Why not write one?', 'buddypress');
            ?>
</p>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $args['after_widget'];
        ?>
	<?php 
    }
开发者ID:AceMedia,项目名称:BuddyPress,代码行数:94,代码来源:bp-blogs-widgets.php

示例5: swa_activity_entry

function swa_activity_entry($show_avatar = false)
{
    ?>
 <?php 
    do_action('bp_before_activity_entry');
    ?>
    <li class="<?php 
    bp_activity_css_class();
    ?>
" id="activity-<?php 
    bp_activity_id();
    ?>
">
            <?php 
    if ($show_avatar == "yes") {
        ?>
                      <div class="swa-activity-avatar">
                            <a href="<?php 
        bp_activity_user_link();
        ?>
">
                                    <?php 
        bp_activity_avatar('type=thumb&width=50&height=50');
        ?>
                            </a>

                    </div>
           <?php 
    }
    ?>
          <div class="swa-activity-content">
		<div class="swa-activity-header">
			<?php 
    bp_activity_action();
    ?>
		</div>

		<?php 
    if (bp_activity_has_content()) {
        ?>
			<div class="swa-activity-inner">
				<?php 
        bp_activity_content_body();
        ?>
			</div>
		<?php 
    }
    ?>

	<?php 
    do_action('bp_activity_entry_content');
    ?>
	<div class="swa-activity-meta">
            <?php 
    if (is_user_logged_in() && bp_activity_can_comment()) {
        ?>
				<a href="<?php 
        bp_activity_comment_link();
        ?>
" class="acomment-reply" id="acomment-comment-<?php 
        bp_activity_id();
        ?>
"><?php 
        _e('Reply', 'buddypress');
        ?>
 (<span><?php 
        bp_activity_comment_count();
        ?>
</span>)</a>
			<?php 
    }
    ?>
            <?php 
    if (is_user_logged_in()) {
        ?>
		<?php 
        if (!bp_get_activity_is_favorite()) {
            ?>
                    <a href="<?php 
            bp_activity_favorite_link();
            ?>
" class="fav" title="<?php 
            _e('Mark as Favorite', 'swa');
            ?>
"><?php 
            _e('Favorite', 'swa');
            ?>
</a>
		<?php 
        } else {
            ?>
                    <a href="<?php 
            bp_activity_unfavorite_link();
            ?>
" class="unfav" title="<?php 
            _e('Remove Favorite', 'swa');
            ?>
"><?php 
            _e('Remove Favorite', 'swa');
            ?>
//.........这里部分代码省略.........
开发者ID:picassentviu,项目名称:AMMPro,代码行数:101,代码来源:bp-sitewide-activity.php

示例6: do_action

<?php /* This template is used by activity-loop.php and AJAX functions to show each activity */ ?>

<?php do_action( 'bp_before_activity_entry' ) ?>

<li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>">
	<div class="activity-avatar">
		<a href="<?php bp_activity_user_link() ?>">
			<?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?>
		</a>
	</div>

	<div class="activity-content">

		<div class="activity-header">
			<?php bp_activity_action() ?>
		</div>

		<?php if ( bp_activity_has_content() ) : ?>
			<div class="activity-inner">
				<?php bp_activity_content_body() ?>
			</div>
		<?php endif; ?>

		<?php do_action( 'bp_activity_entry_content' ) ?>

		<div class="activity-meta">
			<?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?>
				<a href="<?php bp_activity_comment_link() ?>" class="acomment-reply" id="acomment-comment-<?php bp_activity_id() ?>"><?php _e( 'Reply', 'buddypress' ) ?> (<span><?php bp_activity_comment_count() ?></span>)</a>
			<?php endif; ?>

			<?php if ( is_user_logged_in() ) : ?>
开发者ID:n-sane,项目名称:zaroka,代码行数:31,代码来源:entry.php

示例7: widget

    /**
     * Display the networkwide posts widget.
     *
     * @see WP_Widget::widget() for description of parameters.
     *
     * @param array $args Widget arguments.
     * @param array $instance Widget settings, as saved by the user.
     */
    function widget($args, $instance)
    {
        $title = !empty($instance['title']) ? esc_html($instance['title']) : __('Recent Networkwide Posts', 'buddypress');
        if (!empty($instance['link_title'])) {
            $title = '<a href="' . trailingslashit(bp_get_root_domain()) . trailingslashit(bp_get_blogs_root_slug()) . '">' . esc_html($title) . '</a>';
        }
        echo $args['before_widget'];
        echo $args['before_title'] . $title . $args['after_title'];
        if (empty($instance['max_posts']) || !$instance['max_posts']) {
            $instance['max_posts'] = 10;
        }
        ?>

		<?php 
        // Override some of the contextually set parameters for bp_has_activities()
        ?>
		<?php 
        if (bp_has_activities(array('action' => 'new_blog_post', 'max' => $instance['max_posts'], 'per_page' => $instance['max_posts'], 'user_id' => 0, 'scope' => false, 'object' => false, 'primary_id' => false))) {
            ?>

			<ul id="blog-post-list" class="activity-list item-list">

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

					<li>
						<div class="activity-content" style="margin: 0">

							<div class="activity-header">
								<?php 
                bp_activity_action();
                ?>
							</div>

							<?php 
                if (bp_get_activity_content_body()) {
                    ?>
								<div class="activity-inner">
									<?php 
                    bp_activity_content_body();
                    ?>
								</div>
							<?php 
                }
                ?>

						</div>
					</li>

				<?php 
            }
            ?>

			</ul>

		<?php 
        } else {
            ?>
			<div id="message" class="info">
				<p><?php 
            _e('Sorry, there were no posts found. Why not write one?', 'buddypress');
            ?>
</p>
			</div>
		<?php 
        }
        ?>

		<?php 
        echo $args['after_widget'];
        ?>
	<?php 
    }
开发者ID:danielcoats,项目名称:schoolpress,代码行数:83,代码来源:bp-blogs-widgets.php

示例8: bp_displayed_user_avatar

bp_displayed_user_avatar('type=thumb&width=45&height=45');
?>
				</a>
			</div>

			<?php 
if (bp_activity_embed_has_activity(bp_current_action())) {
    ?>

				<?php 
    while (bp_activities()) {
        bp_the_activity();
        ?>
					<p class="bp-embed-activity-action">
						<?php 
        bp_activity_action(array('no_timestamp' => true));
        ?>
					</p>
				<?php 
    }
    ?>

			<?php 
}
?>

			<p class="bp-embed-header-meta">
				<?php 
if (bp_is_active('activity') && bp_activity_do_mentions()) {
    ?>
					<span class="bp-embed-mentionname">@<?php 
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:31,代码来源:header-activity.php

示例9: widget

    function widget($args, $instance)
    {
        global $bp;
        extract($args);
        $link_title = !empty($instance['link_title']);
        echo $before_widget;
        echo $before_title;
        if ($link_title) {
            $dir_link = trailingslashit(bp_get_root_domain()) . trailingslashit(bp_get_blogs_root_slug());
            $title = '<a href="' . $dir_link . '">' . $instance['title'] . '</a>';
        } else {
            $title = $instance['title'];
        }
        echo $title;
        echo $after_title;
        if (empty($instance['max_posts']) || !$instance['max_posts']) {
            $instance['max_posts'] = 10;
        }
        // Load more items that we need, because many will be filtered out by privacy
        $real_max = $instance['max_posts'] * 10;
        $counter = 0;
        $query_string = empty($instance['include_groupblog']) ? 'action=new_blog_post' : 'action=new_blog_post,new_groupblog_post';
        $query_string .= '&max=' . $real_max . '&per_page=' . $real_max;
        if (bp_has_activities($query_string)) {
            ?>

			<ul id="blog-post-list" class="activity-list item-list">

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

					<?php 
                if ($counter >= $instance['max_posts']) {
                    break;
                }
                ?>

					<li>
						<div class="activity-content" style="margin: 0">
							<div class="activity-avatar">
								<?php 
                bp_activity_avatar();
                ?>
							</div>

							<div class="activity-header">
								<?php 
                bp_activity_action();
                ?>
							</div>

							<?php 
                if (bp_get_activity_content_body()) {
                    ?>

									<?php 
                    bp_activity_content_body();
                    ?>

							<?php 
                }
                ?>

						</div>
					</li>

					<?php 
                $counter++;
                ?>

				<?php 
            }
            ?>

			</ul>

		<p class="cac-more-link"><a href="<?php 
            bp_blogs_directory_permalink();
            ?>
">More Blogs</a></p>

		<?php 
        } else {
            ?>
			<div id="message" class="info">
				<p><?php 
            _e('Sorry, there were no blog posts found. Why not write one?', 'buddypress');
            ?>
</p>
			</div>
		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
//.........这里部分代码省略.........
开发者ID:shads196770,项目名称:cbox-theme,代码行数:101,代码来源:bp-widgets.php

示例10: widget

    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        echo $before_title . 'Posts' . $after_title;
        if (empty($instance['max_posts']) || !$instance['max_posts']) {
            $instance['max_posts'] = 10;
        }
        ?>

		<?php 
        // Override some of the contextually set parameters for bp_has_activities()
        ?>
		<?php 
        if (bp_has_activities(array('action' => 'new_blog_post', 'max' => $instance['max_posts'], 'per_page' => $instance['max_posts'], 'user_id' => 0, 'scope' => false, 'object' => false, 'primary_id' => false))) {
            ?>

			<ul id="blog-post-list" class="activity-list item-list">

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

					<li>
						<div class="activity-content" style="margin: 0">
							<div class="activity-header">
								<?php 
                bp_activity_action();
                ?>
							</div>
						</div>
					</li>

				<?php 
            }
            ?>

			</ul>

		<?php 
        } else {
            ?>
			<div id="message" class="info">
				<p><?php 
            _e('Sorry, there were no posts found. Why not write one?', 'buddypress');
            ?>
</p>
			</div>
		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:58,代码来源:posts-widget.php


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