Changeset 1021 for trunk/bp-wire/bp-wire-templatetags.php
- Timestamp:
- 02/06/2009 03:07:48 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-wire/bp-wire-templatetags.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-wire/bp-wire-templatetags.php
r900 r1021 21 21 global $bp; 22 22 23 if ( $bp ['current_component'] == $bp['wire']['slug']) {24 $this->table_name = $bp ['profile']['table_name_wire'];23 if ( $bp->current_component == $bp->wire->slug ) { 24 $this->table_name = $bp->profile->table_name_wire; 25 25 26 26 // Seeing as we're viewing a users wire, lets remove any new wire 27 27 // post notifications 28 if ( $bp ['current_action']== 'all-posts' )29 bp_core_delete_notifications_for_user_by_type( $bp ['loggedin_userid'], 'xprofile', 'new_wire_post' );28 if ( $bp->current_action == 'all-posts' ) 29 bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, 'xprofile', 'new_wire_post' ); 30 30 31 31 } else { 32 $this->table_name = $bp [$bp['current_component']]['table_name_wire'];32 $this->table_name = $bp->{$bp->current_component}->table_name_wire; 33 33 } 34 34 … … 42 42 $this->wire_post_count = count($this->wire_posts); 43 43 44 if ( (int)get_site_option('non-friend-wire-posting') && ( $bp ['current_component'] == $bp['profile']['slug'] || $bp['current_component'] == $bp['wire']['slug']) )44 if ( (int)get_site_option('non-friend-wire-posting') && ( $bp->current_component == $bp->profile->slug || $bp->current_component == $bp->wire->slug ) ) 45 45 $this->can_post = 1; 46 46 else … … 48 48 49 49 $this->pag_links = paginate_links( array( 50 'base' => add_query_arg( 'wpage', '%#%', $bp ['current_domain']),50 'base' => add_query_arg( 'wpage', '%#%', $bp->displayed_user->domain ), 51 51 'format' => '', 52 52 'total' => ceil($this->total_wire_post_count / $this->pag_num), … … 217 217 global $bp; 218 218 219 echo apply_filters( 'bp_wire_ajax_loader_src', $bp ['wire']['image_base']. '/ajax-loader.gif' );219 echo apply_filters( 'bp_wire_ajax_loader_src', $bp->wire->image_base . '/ajax-loader.gif' ); 220 220 } 221 221 … … 257 257 global $bp; 258 258 259 if ( $bp['current_item'] == '')260 $uri = $bp ['current_action'];261 else 262 $uri = $bp ['current_item'];263 264 if ( $bp ['current_component'] == 'wire' || $bp['current_component']== 'profile' ) {265 echo apply_filters( 'bp_wire_get_action', $bp ['current_domain'] . $bp['wire']['slug']. '/post/' );259 if ( empty( $bp->current_item ) ) 260 $uri = $bp->current_action; 261 else 262 $uri = $bp->current_item; 263 264 if ( $bp->current_component == 'wire' || $bp->current_component == 'profile' ) { 265 echo apply_filters( 'bp_wire_get_action', $bp->displayed_user->domain . $bp->wire->slug . '/post/' ); 266 266 } else { 267 echo apply_filters( 'bp_wire_get_action', site_url() . '/' . $bp[$bp ['current_component']]['slug'] . '/' . $uri . '/wire/post/' );267 echo apply_filters( 'bp_wire_get_action', site_url() . '/' . $bp[$bp->current_component]['slug'] . '/' . $uri . '/wire/post/' ); 268 268 } 269 269 } … … 272 272 global $bp; 273 273 274 echo apply_filters( 'bp_wire_poster_avatar', bp_core_get_avatar( $bp ['loggedin_userid'], 1 ) );274 echo apply_filters( 'bp_wire_poster_avatar', bp_core_get_avatar( $bp->loggedin_user->id, 1 ) ); 275 275 } 276 276 … … 279 279 280 280 if ( $echo ) 281 echo apply_filters( 'bp_wire_poster_name', '<a href="' . $bp ['loggedin_domain'] . $bp['profile']['slug']. '">' . __('You', 'buddypress') . '</a>' );282 else 283 return apply_filters( 'bp_wire_poster_name', '<a href="' . $bp ['loggedin_domain'] . $bp['profile']['slug']. '">' . __('You', 'buddypress') . '</a>' );281 echo apply_filters( 'bp_wire_poster_name', '<a href="' . $bp->loggedin_user->domain . $bp->profile->slug . '">' . __('You', 'buddypress') . '</a>' ); 282 else 283 return apply_filters( 'bp_wire_poster_name', '<a href="' . $bp->loggedin_user->domain . $bp->profile->slug . '">' . __('You', 'buddypress') . '</a>' ); 284 284 } 285 285 … … 297 297 global $wire_posts_template, $bp; 298 298 299 if ( $bp['current_item'] == '')300 $uri = $bp ['current_action'];301 else 302 $uri = $bp ['current_item'];303 304 if ( ( $wire_posts_template->wire_post->user_id == $bp ['loggedin_userid'] ) || $bp['is_item_admin']) {305 if ( $bp ['current_component'] == 'wire' || $bp['current_component']== 'profile' ) {306 echo apply_filters( 'bp_wire_delete_link', '<a href="' . $bp ['current_domain'] . $bp['wire']['slug']. '/delete/' . $wire_posts_template->wire_post->id . '">[' . __('Delete', 'buddypress') . ']</a>' );299 if ( empty( $bp->current_item ) ) 300 $uri = $bp->current_action; 301 else 302 $uri = $bp->current_item; 303 304 if ( ( $wire_posts_template->wire_post->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin ) { 305 if ( $bp->current_component == 'wire' || $bp->current_component == 'profile' ) { 306 echo apply_filters( 'bp_wire_delete_link', '<a href="' . $bp->displayed_user->domain . $bp->wire->slug . '/delete/' . $wire_posts_template->wire_post->id . '">[' . __('Delete', 'buddypress') . ']</a>' ); 307 307 } else { 308 echo apply_filters( 'bp_wire_delete_link', '<a href="' . site_url() . '/' . $bp[$bp ['current_component']]['slug'] . '/' . $uri . '/wire/delete/' . $wire_posts_template->wire_post->id . '">[' . __('Delete', 'buddypress') . ']</a>' );308 echo apply_filters( 'bp_wire_delete_link', '<a href="' . site_url() . '/' . $bp[$bp->current_component]['slug'] . '/' . $uri . '/wire/delete/' . $wire_posts_template->wire_post->id . '">[' . __('Delete', 'buddypress') . ']</a>' ); 309 309 } 310 310 } … … 314 314 global $bp; 315 315 316 if ( $bp['current_item'] == '')317 $uri = $bp ['current_action'];318 else 319 $uri = $bp ['current_item'];320 321 if ( $bp ['current_component'] == 'wire' || $bp['current_component']== 'profile') {322 echo apply_filters( 'bp_wire_see_all_link', $bp ['current_domain'] . $bp['wire']['slug']);316 if ( empty( $bp->current_item ) ) 317 $uri = $bp->current_action; 318 else 319 $uri = $bp->current_item; 320 321 if ( $bp->current_component == 'wire' || $bp->current_component == 'profile') { 322 echo apply_filters( 'bp_wire_see_all_link', $bp->displayed_user->domain . $bp->wire->slug ); 323 323 } else { 324 echo apply_filters( 'bp_wire_see_all_link', $bp ['root_domain'] . '/' . $bp['groups']['slug']. '/' . $uri . '/wire' );324 echo apply_filters( 'bp_wire_see_all_link', $bp->root_domain . '/' . $bp->groups->slug . '/' . $uri . '/wire' ); 325 325 } 326 326 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)