Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/24/2008 04:00:42 PM (18 years ago)
Author:
apeatling
Message:
  • Fixed avatar upload validation bug when image upload field left blank
  • Fixed incorrect "your" wording on site wide activity widget
  • Fixed profile wire posting bug
  • Updated site wide members directory
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r391 r436  
    8585}
    8686
    87 function bp_activity_get_list( $user_id, $title, $limit = false ) {
    88         global $bp_activity_user_id, $bp_activity_limit, $bp_activity_title;
     87function bp_activity_get_list( $user_id, $title, $no_activity, $limit = false ) {
     88        global $bp_activity_user_id, $bp_activity_limit, $bp_activity_title, $bp_activity_no_activity;
    8989       
    9090        $bp_activity_user_id = $user_id;
    9191        $bp_activity_limit = $limit;
    9292        $bp_activity_title = $title;
     93        $bp_activity_no_activity = $no_activity;
    9394       
    9495        load_template( TEMPLATEPATH . '/activity/activity-list.php' );
     
    122123}
    123124
     125function bp_activities_no_activity() {
     126        global $bp_activity_no_activity;
     127        echo $bp_activity_no_activity;
     128}
     129
    124130function bp_activity_content() {
    125131        global $activities_template;
     
    133139}
    134140
    135 function bp_activity_content_filter( $content, $date_recorded, $full_name, $insert_time = true, $is_home = true ) {
     141function bp_activity_content_filter( $content, $date_recorded, $full_name, $insert_time = true, $filter_words = true, $filter_you = true ) {
    136142        if ( !$content )
    137143                return false;
     
    146152        if ( $insert_time )
    147153                $content[0] = bp_activity_insert_time_since( $content[0], $date_recorded );
     154
     155        /* Switch 'their/your' depending on whether the user is logged in or not and viewing their profile */
     156        if ( $filter_words ) {
     157                $content[0] = str_replace( __('their', 'buddypress'), __('your', 'buddypress'), $content[0] );
     158        }
    148159       
    149         /* Switch 'their/your' and 'Name/You' depending on whether the user is logged in or not and viewing their profile */
    150         if ( $is_home ) {
    151                 $content[0] = str_replace( __('their', 'buddypress'), __('your', 'buddypress'), $content[0] );
    152                 $content[0] = str_replace( $full_name, __('You', 'buddypress'), $content[0] );         
     160        /* Remove the 'You' and replace if with the persons name */
     161        if ( $filter_you ) {
     162                $content[0] = str_replace( $full_name, __('You', 'buddypress'), $content[0] );                         
    153163        }
    154164       
     
    169179
    170180
     181
    171182?>
Note: See TracChangeset for help on using the changeset viewer.