<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 } ?> <?php if (is_user_logged_in()) { ?> <?php if (!bp_get_activity_is_favorite()) { ?> <a href="<?php bp_activity_favorite_link(); ?>
/** * Output the RSS feed. */ protected function output() { $this->http_headers(); echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?' . '>'; ?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" <?php /** * Fires at the end of the opening RSS tag for feed output so plugins can add extra attributes. * * @since 1.8.0 */ do_action('bp_activity_feed_rss_attributes'); ?> > <channel> <title><?php echo $this->title; ?> </title> <link><?php echo $this->link; ?> </link> <atom:link href="<?php self_link(); ?> " rel="self" type="application/rss+xml" /> <description><?php echo $this->description; ?> </description> <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?> </lastBuildDate> <generator>https://buddypress.org/?v=<?php bp_version(); ?> </generator> <language><?php bloginfo_rss('language'); ?> </language> <ttl><?php echo $this->ttl; ?> </ttl> <sy:updatePeriod><?php echo $this->update_period; ?> </sy:updatePeriod> <sy:updateFrequency><?php echo $this->update_frequency; ?> </sy:updateFrequency> <?php /** * Fires at the end of channel elements list in RSS feed so plugins can add extra channel elements. * * @since 1.8.0 */ do_action('bp_activity_feed_channel_elements'); ?> <?php if (bp_has_activities($this->activity_args)) { ?> <?php while (bp_activities()) { bp_the_activity(); ?> <item> <guid isPermaLink="false"><?php bp_activity_feed_item_guid(); ?> </guid> <title><?php echo stripslashes(bp_get_activity_feed_item_title()); ?> </title> <link><?php bp_activity_thread_permalink(); ?> </link> <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?> </pubDate> <?php if (bp_get_activity_feed_item_description()) { ?> <content:encoded><![CDATA[<?php $this->feed_content(); ?> ]]></content:encoded> <?php } ?> <?php if (bp_activity_can_comment()) { ?> <slash:comments><?php bp_activity_comment_count(); ?> </slash:comments> <?php } ?> <?php /** * Fires at the end of the individual RSS Item list in RSS feed so plugins can add extra item elements. * * @since 1.8.0 */ do_action('bp_activity_feed_item_elements'); ?> </item> <?php } ?> <?php } ?> </channel> </rss><?php }
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'); ?> </a> <?php } ?> <?php } ?> <?php do_action('bp_activity_entry_meta'); ?> </div> <div class="clear" ></div> </div> <?php if ('activity_comment' == bp_get_activity_type()) { ?> <div class="swa-activity-inreplyto"> <strong><?php _e('In reply to', 'swa'); ?> </strong> - <?php bp_activity_parent_content(); ?> · <a href="<?php bp_activity_thread_permalink(); ?> " class="view" title="<?php _e('View Thread / Permalink', 'swa'); ?> "><?php _e('View', 'swa'); ?> </a> </div> <?php } ?> <?php if (bp_activity_can_comment()) { ?> <div class="swa-activity-comments"> <?php bp_activity_comments(); ?> <?php if (is_user_logged_in()) { ?> <form action="<?php bp_activity_comment_form_action(); ?> " method="post" id="swa-ac-form-<?php bp_activity_id(); ?> " class="swa-ac-form"<?php bp_activity_comment_form_nojs_display(); ?> > <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar('width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT); ?> </div> <div class="ac-reply-content"> <div class="ac-textarea"> <textarea id="swa-ac-input-<?php bp_activity_id(); ?> " class="ac-input" name="ac_input_<?php bp_activity_id(); ?> "></textarea> </div> <input type="submit" name="swa_ac_form_submit" value="<?php _e('Post', 'buddypress'); ?> →" /> <?php _e('or press esc to cancel.', 'buddypress'); ?> <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?> " /> </div> <?php wp_nonce_field('new_activity_comment', '_wpnonce_new_activity_comment'); ?> </form> <?php } ?> </div> <?php } ?> </li> <?php do_action('bp_after_swa_activity_entry'); ?> <?php }
/** * Output the RSS feed. */ protected function output() { // set up some additional headers if not on a directory page // this is done b/c BP uses pseudo-pages if (!bp_is_directory()) { global $wp_query; $wp_query->is_404 = false; status_header(200); } header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?' . '>'; ?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" <?php do_action('bp_activity_feed_rss_attributes'); ?> > <channel> <title><?php echo $this->title; ?> </title> <link><?php echo $this->link; ?> </link> <atom:link href="<?php self_link(); ?> " rel="self" type="application/rss+xml" /> <description><?php echo $this->description; ?> </description> <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?> </lastBuildDate> <generator>http://buddypress.org/?v=<?php bp_version(); ?> </generator> <language><?php bloginfo_rss('language'); ?> </language> <ttl><?php echo $this->ttl; ?> </ttl> <sy:updatePeriod><?php echo $this->update_period; ?> </sy:updatePeriod> <sy:updateFrequency><?php echo $this->update_frequency; ?> </sy:updateFrequency> <?php do_action('bp_activity_feed_channel_elements'); ?> <?php if (bp_has_activities($this->activity_args)) { ?> <?php while (bp_activities()) { bp_the_activity(); ?> <item> <guid isPermaLink="false"><?php bp_activity_feed_item_guid(); ?> </guid> <title><?php echo stripslashes(bp_get_activity_feed_item_title()); ?> </title> <link><?php bp_activity_thread_permalink(); ?> </link> <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_get_activity_feed_item_date(), false); ?> </pubDate> <?php if (bp_get_activity_feed_item_description()) { ?> <content:encoded><![CDATA[<?php $this->feed_content(); ?> ]]></content:encoded> <?php } ?> <?php if (bp_activity_can_comment()) { ?> <slash:comments><?php bp_activity_comment_count(); ?> </slash:comments> <?php } ?> <?php do_action('bp_activity_feed_item_elements'); ?> </item> <?php } ?> <?php } ?> </channel> </rss><?php }
<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() ) : ?> <?php if ( !bp_get_activity_is_favorite() ) : ?> <a href="<?php bp_activity_favorite_link() ?>" class="fav" title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a> <?php else : ?> <a href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a> <?php endif; ?> <?php endif;?> <?php do_action( 'bp_activity_entry_meta' ) ?> </div> </div> <?php if ( 'activity_comment' == bp_get_activity_type() ) : ?>