Changeset 601 for trunk/bp-activity/bp-activity-templatetags.php
- Timestamp:
- 12/02/2008 09:04:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-templatetags.php
r547 r601 25 25 if ( !$user_id ) 26 26 $user_id = $bp['current_userid']; 27 28 if ( $bp['current_component'] != $bp['activity']['slug'] || ( $bp['current_component'] == $bp['activity']['slug'] && $bp['current_action'] == 'just-me' ) ) {27 28 if ( $bp['current_component'] != $bp['activity']['slug'] || ( $bp['current_component'] == $bp['activity']['slug'] && $bp['current_action'] == 'just-me' || $bp['current_action'] == 'feed' ) ) { 29 29 $this->activities = BP_Activity_Activity::get_activity_for_user( $user_id, $limit ); 30 30 } else { … … 104 104 $filter_content = true; 105 105 106 if ( !$bp_activity_user_id ) 107 $bp_activity_user_id = $bp['current_userid']; 108 109 if ( !$bp_activity_limit ) 110 $bp_activity_limit = 35; 111 106 112 $activities_template = new BP_Activity_Template( $bp_activity_user_id, $bp_activity_limit, $filter_content ); 107 113 return $activities_template->has_activities(); … … 185 191 } 186 192 193 function bp_sitewide_activity_feed_link() { 194 global $bp; 195 196 echo site_url() . '/' . $bp['activity']['slug'] . '/feed'; 197 } 198 199 function bp_activities_member_rss_link() { 200 global $bp; 201 202 if ( ( $bp['current_component'] == $bp['profile']['slug'] ) || $bp['current_action'] == 'just-me' ) 203 echo $bp['current_domain'] . $bp['activity']['slug'] . '/feed'; 204 else 205 echo $bp['current_domain'] . $bp['activity']['slug'] . '/my-friends/feed'; 206 } 207 208 /* Template tags for RSS feed output */ 209 210 function bp_activity_feed_item_title() { 211 global $activities_template; 212 213 $title = explode( '<span', $activities_template->activity['content'] ); 214 echo trim( strip_tags( $title[0] ) ); 215 } 216 217 function bp_activity_feed_item_link() { 218 global $activities_template; 219 220 echo $activities_template->activity['primary_link']; 221 } 222 223 function bp_activity_feed_item_date() { 224 global $activities_template; 225 226 echo $activities_template->activity['date_recorded']; 227 } 228 229 function bp_activity_feed_item_description() { 230 global $activities_template; 231 232 echo sprintf( $activities_template->activity['content'], '' ); 233 } 234 187 235 188 236
Note: See TracChangeset
for help on using the changeset viewer.