Changeset 3633
- Timestamp:
- 12/31/2010 06:05:34 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r3620 r3633 203 203 204 204 function bp_activity_screen_notification_settings() { 205 global $bp; 206 207 ?> 208 205 global $bp; 206 207 $mention = get_user_meta( $bp->displayed_user->id, 'notification_activity_new_mention', true ); 208 if ( !$mention ) 209 $mention = 'yes'; 210 211 $reply = get_user_meta( $bp->displayed_user->id, 'notification_activity_new_reply', true ); 212 if ( !$reply ) 213 $reply = 'yes'; 214 ?> 209 215 <table class="notification-settings zebra" id="activity-notification-settings"> 210 216 <thead> … … 221 227 <td></td> 222 228 <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>229 <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ) ?>/></td> 230 <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ) ?>/></td> 225 231 </tr> 226 232 <tr id="activity-notification-settings-replies"> 227 233 <td></td> 228 234 <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>235 <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" value="yes" <?php checked( $reply, 'yes', true ) ?>/></td> 236 <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" value="no" <?php checked( $reply, 'no', true ) ?>/></td> 231 237 </tr> 232 238 -
trunk/bp-friends.php
r3620 r3633 108 108 109 109 function friends_screen_notification_settings() { 110 global $bp; 111 112 ?> 113 110 global $bp; 111 112 $send_requests = get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_request', true ); 113 if ( !$send_requests ) 114 $send_requests = 'yes'; 115 116 $accept_requests = get_user_meta( $bp->displayed_user->id, 'notification_friends_friendship_accepted', true ); 117 if ( !$accept_requests ) 118 $accept_requests = 'yes'; 119 ?> 114 120 <table class="notification-settings zebra" id="friends-notification-settings"> 115 121 <thead> … … 126 132 <td></td> 127 133 <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>134 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" value="yes" <?php checked( $send_requests, 'yes', true ) ?>/></td> 135 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" value="no" <?php checked( $send_requests, 'no', true ) ?>/></td> 130 136 </tr> 131 137 <tr id="friends-notification-settings-accepted"> 132 138 <td></td> 133 139 <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>140 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="yes" <?php checked( $accept_requests, 'yes', true ) ?>/></td> 141 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="no" <?php checked( $accept_requests, 'no', true ) ?>/></td> 136 142 </tr> 137 143 -
trunk/bp-groups.php
r3627 r3633 948 948 949 949 function groups_screen_notification_settings() { 950 global $bp; 951 952 ?> 953 950 global $bp; 951 952 $group_invite = get_user_meta( $bp->displayed_user->id, 'notification_groups_invite', true ); 953 if ( !$group_invite ) 954 $group_invite = 'yes'; 955 956 $group_update = get_user_meta( $bp->displayed_user->id, 'notification_groups_group_updated', true ); 957 if ( !$group_update ) 958 $group_update = 'yes'; 959 960 $group_promo = get_user_meta( $bp->displayed_user->id, 'notification_groups_admin_promotion', true ); 961 if ( !$group_promo ) 962 $group_promo = 'yes'; 963 964 $group_request = get_user_meta( $bp->displayed_user->id, 'notification_groups_membership_request', true ); 965 if ( !$group_request ) 966 $group_request = 'yes'; 967 ?> 954 968 <table class="notification-settings zebra" id="groups-notification-settings"> 955 969 <thead> … … 966 980 <td></td> 967 981 <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>982 <td class="yes"><input type="radio" name="notifications[notification_groups_invite]" value="yes" <?php checked( $group_invite, 'yes', true ) ?>/></td> 983 <td class="no"><input type="radio" name="notifications[notification_groups_invite]" value="no" <?php checked( $group_invite, 'no', true ) ?>/></td> 970 984 </tr> 971 985 <tr id="groups-notification-settings-info-updated"> 972 986 <td></td> 973 987 <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>988 <td class="yes"><input type="radio" name="notifications[notification_groups_group_updated]" value="yes" <?php checked( $group_update, 'yes', true ) ?>/></td> 989 <td class="no"><input type="radio" name="notifications[notification_groups_group_updated]" value="no" <?php checked( $group_update, 'no', true ) ?>/></td> 976 990 </tr> 977 991 <tr id="groups-notification-settings-promoted"> 978 992 <td></td> 979 993 <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>994 <td class="yes"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="yes" <?php checked( $group_promo, 'yes', true ) ?>/></td> 995 <td class="no"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="no" <?php checked( $group_promo, 'no', true ) ?>/></td> 982 996 </tr> 983 997 <tr id="groups-notification-settings-request"> 984 998 <td></td> 985 999 <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>1000 <td class="yes"><input type="radio" name="notifications[notification_groups_membership_request]" value="yes" <?php checked( $group_request, 'yes', true ) ?>/></td> 1001 <td class="no"><input type="radio" name="notifications[notification_groups_membership_request]" value="no" <?php checked( $group_request, 'no', true ) ?>/></td> 988 1002 </tr> 989 1003 -
trunk/bp-messages.php
r3620 r3633 168 168 169 169 function messages_screen_notification_settings() { 170 global $bp; 171 172 ?> 173 170 global $bp; 171 172 $new_messages = get_user_meta( $bp->displayed_user->id, 'notification_messages_new_message', true ); 173 if ( !$new_messages ) 174 $new_messages = 'yes'; 175 176 $new_notices = get_user_meta( $bp->displayed_user->id, 'notification_messages_new_notice', true ); 177 if ( !$new_notices ) 178 $new_notices = 'yes'; 179 ?> 174 180 <table class="notification-settings zebra" id="messages-notification-settings"> 175 181 <thead> … … 186 192 <td></td> 187 193 <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>194 <td class="yes"><input type="radio" name="notifications[notification_messages_new_message]" value="yes" <?php checked( $new_messages, 'yes', true ) ?>/></td> 195 <td class="no"><input type="radio" name="notifications[notification_messages_new_message]" value="no" <?php checked( $new_messages, 'no', true ) ?>/></td> 190 196 </tr> 191 197 <tr id="messages-notification-settings-new-site-notice"> 192 198 <td></td> 193 199 <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>200 <td class="yes"><input type="radio" name="notifications[notification_messages_new_notice]" value="yes" <?php checked( $new_notices, 'yes', true ) ?>/></td> 201 <td class="no"><input type="radio" name="notifications[notification_messages_new_notice]" value="no" <?php checked( $new_notices, 'no', true ) ?>/></td> 196 202 </tr> 197 203
Note: See TracChangeset
for help on using the changeset viewer.