Changeset 854 for trunk/bp-groups.php
- Timestamp:
- 01/16/2009 09:00:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups.php
r849 r854 866 866 if ( !$group ) 867 867 return false; 868 869 $user_link = bp_core_get_userlink($user_id); 870 $group_link = bp_group_permalink( $group, false ); 868 871 869 872 return array( 870 873 'primary_link' => bp_group_permalink( $group, false ), 871 'content' => sprintf( __('%s joined the group %s', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>'874 'content' => apply_filters( 'bp_groups_joined_group_activity', sprintf( __('%s joined the group %s', 'buddypress'), $user_link, '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>', $user_link, $group_link, $group->name ) 872 875 ); 873 876 break; … … 878 881 return false; 879 882 883 $user_link = bp_core_get_userlink($user_id); 884 $group_link = bp_group_permalink( $group, false ); 885 880 886 return array( 881 887 'primary_link' => bp_group_permalink( $group, false ), 882 'content' => sprintf( __('%s created the group %s', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>') . ' <span class="time-since">%s</span>'888 'content' => apply_filters( 'bp_groups_created_group_activity', sprintf( __('%s created the group %s', 'buddypress'), $user_link, '<a href="' . $group_link . '">' . $group->name . '</a>') . ' <span class="time-since">%s</span>', $user_link, $group_link, $group->name ) 883 889 ); 884 890 break; … … 889 895 if ( !$group || !$wire_post || !$wire_post->content ) 890 896 return false; 897 898 $user_link = bp_core_get_userlink($user_id); 899 $group_link = bp_group_permalink( $group, false ); 900 $post_excerpt = bp_create_excerpt($wire_post->content); 891 901 892 $content = sprintf ( __('%s wrote on the wire of the group %s', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>'; 893 $content .= '<blockquote>' . bp_create_excerpt($wire_post->content) . '</blockquote>'; 902 $content = sprintf ( __('%s wrote on the wire of the group %s', 'buddypress'), $user_link, '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>'; 903 $content .= '<blockquote>' . $post_excerpt . '</blockquote>'; 904 905 $content = apply_filters( 'bp_groups_new_wire_post_activity', $content, $user_link, $group_link, $group->name, $post_excerpt ); 894 906 895 907 return array( … … 907 919 return false; 908 920 909 $content = sprintf ( __('%s posted on the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>'; 910 $content .= '<blockquote>' . apply_filters( 'bp_the_topic_post_content', stripslashes( $forum_post['post_text'] ) ) . '</blockquote>'; 921 $user_link = bp_core_get_userlink($user_id); 922 $group_link = bp_group_permalink( $group, false ); 923 924 $post_content = apply_filters( 'bp_the_topic_post_content', stripslashes( $forum_post['post_text'] ) ); 925 926 $content = sprintf ( __('%s posted on the forum topic %s in the group %s:', 'buddypress'), $user_link, '<a href="' . $group_link . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>'; 927 $content .= '<blockquote>' . $post_content . '</blockquote>'; 928 929 $content = apply_filters( 'bp_groups_new_forum_post_activity', $content, $user_link, $group_link, $forum_topic['topic_id'], $forum_topic['topic_title'], $group_link, $group->name, $post_content ); 911 930 912 931 return array( … … 923 942 924 943 if ( !$group || !$forum_post || !$forum_topic ) 925 return false; 926 927 $content = sprintf ( __('%s created the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>'; 928 $content .= '<blockquote>' . apply_filters( 'bp_the_topic_post_content', stripslashes( $forum_post['post_text'] ) ) . '</blockquote>'; 944 return false; 945 946 $user_link = bp_core_get_userlink($user_id); 947 $group_link = bp_group_permalink( $group, false ); 948 949 $post_content = apply_filters( 'bp_the_topic_post_content', stripslashes( $forum_post['post_text'] ) ); 950 951 $content = sprintf ( __('%s created the forum topic %s in the group %s:', 'buddypress'), $uesr_link, '<a href="' . $group_link . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>'; 952 $content .= '<blockquote>' . $post_content . '</blockquote>'; 953 954 $content = apply_filters( 'bp_groups_new_forum_topic_activity', $content, $user_link, $group_link, $forum_topic['topic_id'], $forum_topic['topic_title'], $group_link, $group->name, $post_content ); 929 955 930 956 return array( … … 949 975 $group = new BP_Groups_Group( $group_id, false, false ); 950 976 977 $group_link = bp_group_permalink( $group, false ); 978 951 979 if ( (int)$total_items > 1 ) { 952 return '<a href="' . bp_group_permalink( $group, false ) . '/admin/membership-requests/" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . sprintf( __('%d new membership requests for the group "%s"'), (int)$total_items, $group->name ) . '</a>';980 return apply_filters( 'bp_groups_multiple_new_membership_requests_notification', '<a href="' . $group_link . '/admin/membership-requests/" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . sprintf( __('%d new membership requests for the group "%s"'), (int)$total_items, $group->name ) . '</a>', $group_link, $total_items, $group->name ); 953 981 } else { 954 982 $user_fullname = bp_core_global_user_fullname( $requesting_user_id ); 955 return '<a href="' . bp_group_permalink( $group, false ) . '/admin/membership-requests/" title="' . $user_fullname .' requests group membership">' . sprintf( __('%s requests membership for the group "%s"'), $user_fullname, $group->name ) . '</a>';983 return apply_filters( 'bp_groups_single_new_membership_request_notification', '<a href="' . $group_link . '/admin/membership-requests/" title="' . $user_fullname .' requests group membership">' . sprintf( __('%s requests membership for the group "%s"'), $user_fullname, $group->name ) . '</a>', $group_link, $user_fullname, $group->name ); 956 984 } 957 985 break; … … 961 989 962 990 $group = new BP_Groups_Group( $group_id, false, false ); 991 $group_link = bp_group_permalink( $group, false ) . '/?new'; 963 992 964 993 if ( (int)$total_items > 1 ) { 965 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('%d accepted group membership requests'), (int)$total_items, $group->name ) . '</a>';994 return apply_filters( 'bp_groups_multiple_membership_request_accepted_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('%d accepted group membership requests'), (int)$total_items, $group->name ) . '</a>', $total_items, $group_name ); 966 995 } else { 967 return '<a href="' . bp_group_permalink( $group, false ) . '/?new">' . sprintf( __('Membership for group "%s" accepted'), $group->name ) . '</a>';996 return apply_filters( 'bp_groups_single_membership_request_accepted_notification', '<a href="' . $group_link . '">' . sprintf( __('Membership for group "%s" accepted'), $group->name ) . '</a>', $group_link, $group->name ); 968 997 } 969 998 break; … … 973 1002 974 1003 $group = new BP_Groups_Group( $group_id, false, false ); 1004 $group_link = bp_group_permalink( $group, false ) . '/?new'; 975 1005 976 1006 if ( (int)$total_items > 1 ) { 977 return '<a href="' . site_url() . '/' . MEMBERS_SLUG . '/' . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('%d rejected group membership requests'), (int)$total_items, $group->name ) . '</a>';1007 return apply_filters( 'bp_groups_multiple_membership_request_rejected_notification', '<a href="' . site_url() . '/' . MEMBERS_SLUG . '/' . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('%d rejected group membership requests'), (int)$total_items, $group->name ) . '</a>', $total_items, $group->name ); 978 1008 } else { 979 return '<a href="' . bp_group_permalink( $group, false ) . '/?new">' . sprintf( __('Membership for group "%s" rejected'), $group->name ) . '</a>';1009 return apply_filters( 'bp_groups_single_membership_request_rejected_notification', '<a href="' . $group_link . '">' . sprintf( __('Membership for group "%s" rejected'), $group->name ) . '</a>', $group_link, $group->name ); 980 1010 } 981 1011 … … 986 1016 987 1017 $group = new BP_Groups_Group( $group_id, false, false ); 988 1018 $group_link = bp_group_permalink( $group, false ) . '/?new'; 1019 989 1020 if ( (int)$total_items > 1 ) { 990 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('You were promoted to an admin in %d groups'), (int)$total_items ) . '</a>';1021 return apply_filters( 'bp_groups_multiple_member_promoted_to_admin_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('You were promoted to an admin in %d groups'), (int)$total_items ) . '</a>', $total_items ); 991 1022 } else { 992 return '<a href="' . bp_group_permalink( $group, false ) . '/?new">' . sprintf( __('You were promoted to an admin in the group %s'), $group->name ) . '</a>';1023 return apply_filters( 'bp_groups_single_member_promoted_to_admin_notification', '<a href="' . $group_link . '">' . sprintf( __('You were promoted to an admin in the group %s'), $group->name ) . '</a>', $group_link, $group->name ); 993 1024 } 994 1025 break; … … 998 1029 999 1030 $group = new BP_Groups_Group( $group_id, false, false ); 1000 1031 $group_link = bp_group_permalink( $group, false ) . '/?new'; 1032 1001 1033 if ( (int)$total_items > 1 ) { 1002 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('You were promoted to a mod in %d groups'), (int)$total_items ) . '</a>';1034 return apply_filters( 'bp_groups_multiple_member_promoted_to_mod_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('You were promoted to a mod in %d groups'), (int)$total_items ) . '</a>', $total_items ); 1003 1035 } else { 1004 return '<a href="' . bp_group_permalink( $group, false ) . '/?new">' . sprintf( __('You were promoted to a mod in the group %s'), $group->name ) . '</a>';1036 return apply_filters( 'bp_groups_single_member_promoted_to_mod_notification', '<a href="' . $group_link . '">' . sprintf( __('You were promoted to a mod in the group %s'), $group->name ) . '</a>', $group_link, $group->name ); 1005 1037 } 1006 1038 break; … … 1013 1045 1014 1046 if ( (int)$total_items > 1 ) { 1015 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites" title="' . __( 'Group Invites', 'buddypress' ) . '">' . sprintf( __('You have %d new group invitations'), (int)$total_items ) . '</a>';1047 return apply_filters( 'bp_groups_multiple_group_invite_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites" title="' . __( 'Group Invites', 'buddypress' ) . '">' . sprintf( __('You have %d new group invitations'), (int)$total_items ) . '</a>', $total_items ); 1016 1048 } else { 1017 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites" title="' . __( 'Group Invites', 'buddypress' ) . '">' . sprintf( __('You have an invitation to the group: %s'), $group->name ) . '</a>';1049 return apply_filters( 'bp_groups_single_group_invite_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites" title="' . __( 'Group Invites', 'buddypress' ) . '">' . sprintf( __('You have an invitation to the group: %s'), $group->name ) . '</a>', $group->name ); 1018 1050 } 1019 1051 break;
Note: See TracChangeset
for help on using the changeset viewer.