Ticket #2987: 2987.diff
| File 2987.diff, 14.3 KB (added by , 16 years ago) |
|---|
-
trunk/bp-friends.php
107 107 } 108 108 109 109 function friends_screen_notification_settings() { 110 global $bp; 111 110 global $bp; 111 $send_requests = get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_request', true ); 112 if( !$send_requests ) 113 $send_requests = 'yes'; 114 $accept_requests = get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_accepted', true ); 115 if( !$accept_requests ) 116 $accept_requests = 'yes'; 112 117 ?> 113 118 114 119 <table class="notification-settings zebra" id="friends-notification-settings"> 115 120 <thead> 116 121 <tr> … … 125 130 <tr id="friends-notification-settings-request"> 126 131 <td></td> 127 132 <td><?php _e( 'A member sends you a friendship request', 'buddypress' ) ?></td> 128 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_request', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_request', true ) ) { ?>checked="checked" <?php }?>/></td>129 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" value="no" <?php if ( get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_request', true ) == 'no' ) { ?>checked="checked" <?php }?>/></td>133 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" value="yes" <?php checked( $send_requests, 'yes', true ); ?>/></td> 134 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" value="no" <?php checked( $send_requests, 'no', true ); ?>/></td> 130 135 </tr> 131 136 <tr id="friends-notification-settings-accepted"> 132 137 <td></td> 133 138 <td><?php _e( 'A member accepts your friendship request', 'buddypress' ) ?></td> 134 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_accepted', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_accepted', true ) ) { ?>checked="checked" <?php }?>/></td>135 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_accepted', true ) ) { ?>checked="checked" <?php }?>/></td>139 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="yes" <?php checked( $accept_requests, 'yes', true ); ?>/></td> 140 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="no" <?php checked( $accept_requests, 'no', true ); ?>/></td> 136 141 </tr> 137 142 138 143 <?php do_action( 'friends_screen_notification_settings' ); ?> -
trunk/bp-activity.php
202 202 add_action( 'wp', 'bp_activity_screen_single_activity_permalink', 3 ); 203 203 204 204 function bp_activity_screen_notification_settings() { 205 global $bp; 206 205 global $bp; 206 $mention = get_user_meta( $bp->displayed_user->id, 'notification_activity_new_mention', true ); 207 if( !$mention ) 208 $mention = 'yes'; 209 $reply = get_user_meta( $bp->displayed_user->id, 'notification_activity_new_reply', true ); 210 if( !$reply ) 211 $reply = 'yes'; 207 212 ?> 208 213 209 214 <table class="notification-settings zebra" id="activity-notification-settings"> 210 215 <thead> 211 216 <tr> … … 220 225 <tr id="activity-notification-settings-mentions"> 221 226 <td></td> 222 227 <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) ?></td> 223 <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_activity_new_mention', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_activity_new_mention', true ) ) { ?>checked="checked" <?php }?>/></td>224 <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_activity_new_mention', true ) ) { ?>checked="checked" <?php }?>/></td>228 <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ); ?>/></td> 229 <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ); ?>/></td> 225 230 </tr> 226 231 <tr id="activity-notification-settings-replies"> 227 232 <td></td> 228 233 <td><?php _e( "A member replies to an update or comment you've posted", 'buddypress' ) ?></td> 229 <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" value="yes" <?php if ( !get_user_meta( $bp->loggedin_user->id, 'notification_activity_new_reply', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_activity_new_reply', true ) ) { ?>checked="checked" <?php }?>/></td>230 <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_activity_new_reply', true ) ) { ?>checked="checked" <?php }?>/></td>234 <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" value="yes" <?php checked( $reply, 'yes', true ); ?>/></td> 235 <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" value="no" <?php checked( $reply, 'no', true ); ?>/></td> 231 236 </tr> 232 237 233 238 <?php do_action( 'bp_activity_screen_notification_settings' ) ?> -
trunk/bp-messages.php
167 167 } 168 168 169 169 function messages_screen_notification_settings() { 170 global $bp; 171 170 global $bp; 171 $new_messages = get_user_meta( $bp->displayed_user->id, 'notification_messages_new_message', true ); 172 if( !$new_messages ) 173 $new_messages = 'yes'; 174 $new_notices = get_user_meta( $bp->displayed_user->id, 'notification_messages_new_notice', true ); 175 if( !$new_notices ) 176 $new_notices = 'yes'; 172 177 ?> 173 178 174 179 <table class="notification-settings zebra" id="messages-notification-settings"> 175 180 <thead> 176 181 <tr> … … 185 190 <tr id="messages-notification-settings-new-message"> 186 191 <td></td> 187 192 <td><?php _e( 'A member sends you a new message', 'buddypress' ) ?></td> 188 <td class="yes"><input type="radio" name="notifications[notification_messages_new_message]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_messages_new_message', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_messages_new_message', true ) ) { ?>checked="checked" <?php }?>/></td>189 <td class="no"><input type="radio" name="notifications[notification_messages_new_message]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_messages_new_message', true ) ) { ?>checked="checked" <?php }?>/></td>193 <td class="yes"><input type="radio" name="notifications[notification_messages_new_message]" value="yes" <?php checked( $new_messages, 'yes', true ); ?>/></td> 194 <td class="no"><input type="radio" name="notifications[notification_messages_new_message]" value="no" <?php checked( $new_messages, 'no', true ); ?>/></td> 190 195 </tr> 191 196 <tr id="messages-notification-settings-new-site-notice"> 192 197 <td></td> 193 198 <td><?php _e( 'A new site notice is posted', 'buddypress' ) ?></td> 194 <td class="yes"><input type="radio" name="notifications[notification_messages_new_notice]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_messages_new_notice', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_messages_new_notice', true ) ) { ?>checked="checked" <?php }?>/></td>195 <td class="no"><input type="radio" name="notifications[notification_messages_new_notice]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_messages_new_notice', true ) ) { ?>checked="checked" <?php }?>/></td>199 <td class="yes"><input type="radio" name="notifications[notification_messages_new_notice]" value="yes" <?php checked( $new_notices, 'yes', true ); ?>/></td> 200 <td class="no"><input type="radio" name="notifications[notification_messages_new_notice]" value="no" <?php checked( $new_notices, 'no', true ); ?>/></td> 196 201 </tr> 197 202 198 203 <?php do_action( 'messages_screen_notification_settings' ) ?> -
trunk/bp-groups.php
947 947 add_action( 'wp', 'groups_screen_group_admin_delete_group', 4 ); 948 948 949 949 function groups_screen_notification_settings() { 950 global $bp; 951 950 global $bp; 951 $group_invite = get_user_meta( $bp->displayed_user->id, 'notification_groups_invite', true ); 952 if( !$group_invite ) 953 $group_invite = 'yes'; 954 $group_update = get_user_meta( $bp->displayed_user->id, 'notification_groups_group_updated', true ); 955 if( !$group_update ) 956 $group_update = 'yes'; 957 $group_promo = get_user_meta( $bp->displayed_user->id, 'notification_groups_admin_promotion', true ); 958 if( !$group_promo ) 959 $group_promo = 'yes'; 960 $group_request = get_user_meta( $bp->displayed_user->id, 'notification_groups_membership_request', true ); 961 if( !$group_request ) 962 $group_request = 'yes'; 952 963 ?> 953 964 954 965 <table class="notification-settings zebra" id="groups-notification-settings"> 955 966 <thead> 956 967 <tr> … … 965 976 <tr id="groups-notification-settings-invitation"> 966 977 <td></td> 967 978 <td><?php _e( 'A member invites you to join a group', 'buddypress' ) ?></td> 968 <td class="yes"><input type="radio" name="notifications[notification_groups_invite]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_groups_invite', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_groups_invite', true ) ) { ?>checked="checked" <?php }?>/></td>969 <td class="no"><input type="radio" name="notifications[notification_groups_invite]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_groups_invite', true ) ) { ?>checked="checked" <?php }?>/></td>979 <td class="yes"><input type="radio" name="notifications[notification_groups_invite]" value="yes" <?php checked( $group_invite, 'yes', true ); ?>/></td> 980 <td class="no"><input type="radio" name="notifications[notification_groups_invite]" value="no" <?php checked( $group_invite, 'no', true ); ?>/></td> 970 981 </tr> 971 982 <tr id="groups-notification-settings-info-updated"> 972 983 <td></td> 973 984 <td><?php _e( 'Group information is updated', 'buddypress' ) ?></td> 974 <td class="yes"><input type="radio" name="notifications[notification_groups_group_updated]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_groups_group_updated', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_groups_group_updated', true ) ) { ?>checked="checked" <?php }?>/></td>975 <td class="no"><input type="radio" name="notifications[notification_groups_group_updated]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_groups_group_updated', true ) ) { ?>checked="checked" <?php }?>/></td>985 <td class="yes"><input type="radio" name="notifications[notification_groups_group_updated]" value="yes" <?php checked( $group_update, 'yes', true ); ?>/></td> 986 <td class="no"><input type="radio" name="notifications[notification_groups_group_updated]" value="no" <?php checked( $group_update, 'no', true ); ?>/></td> 976 987 </tr> 977 988 <tr id="groups-notification-settings-promoted"> 978 989 <td></td> 979 990 <td><?php _e( 'You are promoted to a group administrator or moderator', 'buddypress' ) ?></td> 980 <td class="yes"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_groups_admin_promotion', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_groups_admin_promotion', true ) ) { ?>checked="checked" <?php }?>/></td>981 <td class="no"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_groups_admin_promotion', true ) ) { ?>checked="checked" <?php }?>/></td>991 <td class="yes"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="yes" <?php checked( $group_promo, 'yes', true ); ?>/></td> 992 <td class="no"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="no" <?php checked( $group_promo, 'no', true ); ?>/></td> 982 993 </tr> 983 994 <tr id="groups-notification-settings-request"> 984 995 <td></td> 985 996 <td><?php _e( 'A member requests to join a private group for which you are an admin', 'buddypress' ) ?></td> 986 <td class="yes"><input type="radio" name="notifications[notification_groups_membership_request]" value="yes" <?php if ( !get_user_meta( $bp->displayed_user->id, 'notification_groups_membership_request', true ) || 'yes' == get_user_meta( $bp->displayed_user->id, 'notification_groups_membership_request', true ) ) { ?>checked="checked" <?php }?>/></td>987 <td class="no"><input type="radio" name="notifications[notification_groups_membership_request]" value="no" <?php if ( 'no' == get_user_meta( $bp->displayed_user->id, 'notification_groups_membership_request', true ) ) { ?>checked="checked" <?php }?>/></td>997 <td class="yes"><input type="radio" name="notifications[notification_groups_membership_request]" value="yes" <?php checked( $group_request, 'yes', true ); ?>/></td> 998 <td class="no"><input type="radio" name="notifications[notification_groups_membership_request]" value="no" <?php checked( $group_request, 'no', true ); ?>/></td> 988 999 </tr> 989 1000 990 1001 <?php do_action( 'groups_screen_notification_settings' ); ?>
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)