Changeset 1553953
- Timestamp:
- 12/13/2016 07:43:00 PM (9 years ago)
- Location:
- anti-splog/trunk
- Files:
-
- 7 edited
-
anti-splog.php (modified) (4 diffs)
-
includes/admin_templates/moderate.php (modified) (1 diff)
-
includes/admin_templates/patterns.php (modified) (1 diff)
-
includes/admin_templates/settings.php (modified) (3 diffs)
-
includes/admin_templates/stats.php (modified) (1 diff)
-
includes/blog-suspended-template.php (modified) (12 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
anti-splog/trunk/anti-splog.php
r1368748 r1553953 6 6 Author: WPMU DEV 7 7 Author URI: http://premium.wpmudev.org/ 8 Version: 2. 1.88 Version: 2.2 9 9 Network: true 10 10 WDP ID: 120 … … 859 859 global $ust_admin_url, $wp_version; 860 860 861 $page = add_menu_page( __( 'Anti-Splog', 'ust' ), __( 'Anti-Splog', 'ust' ), 'manage_sites', 'ust', 'ust_admin_moderate', plugins_url( '/anti-splog/includes/icon-small.png' ));861 $page = add_menu_page( __( 'Anti-Splog', 'ust' ), __( 'Anti-Splog', 'ust' ), 'manage_sites', 'ust', 'ust_admin_moderate', 'dashicons-shield' ); 862 862 $page = add_submenu_page( 'ust', __( 'Site Moderation', 'ust' ), __( 'Moderation', 'ust' ), 'manage_sites', 'ust', 'ust_admin_moderate' ); 863 863 … … 1092 1092 } 1093 1093 1094 } else if ( $ust_settings['signup_protect'] == 'asirra' ) {1095 1096 require_once( 'includes/asirra.php' );1097 $asirra = new AsirraValidator( $_POST['Asirra_Ticket'] );1098 if ( ! $asirra->passed ) {1099 $content['errors']->add( 'asirra', __( "Please try to correctly identify the cats again.", 'ust' ) );1100 }1101 1102 1094 } else if ( $ust_settings['signup_protect'] == 'questions' ) { 1103 1095 … … 1149 1141 if ( ! $resp ) { 1150 1142 $bp->signup->errors['recaptcha'] = __( "The reCAPTCHA wasn't entered correctly. Please try again.", 'ust' ); 1151 }1152 1153 } else if ( $ust_settings['signup_protect'] == 'asirra' ) {1154 1155 require_once( 'includes/asirra.php' );1156 $asirra = new AsirraValidator( $_POST['Asirra_Ticket'] );1157 if ( ! $asirra->passed ) {1158 $bp->signup->errors['asirra'] = __( "Please try to correctly identify the cats again.", 'ust' );1159 1143 } 1160 1144 -
anti-splog/trunk/includes/admin_templates/moderate.php
r1204296 r1553953 98 98 99 99 <div class="wrap"> 100 <div class="icon32"><img src="<?php echo plugins_url( '/anti-splog/includes/icon-large.png' ); ?>"/></div>101 100 <h2><?php _e( 'Anti-Splog', 'ust' ) ?></h2> 102 101 <h3 class="nav-tab-wrapper"> -
anti-splog/trunk/includes/admin_templates/patterns.php
r1019799 r1553953 80 80 ?> 81 81 <div class="wrap"> 82 <div class="icon32"><img src="<?php echo plugins_url( '/anti-splog/includes/icon-large.png' ); ?>"/></div>83 82 <h2><?php _e( 'Anti-Splog Pattern Matching', 'ust' ) ?></h2> 84 83 -
anti-splog/trunk/includes/admin_templates/settings.php
r1368748 r1553953 99 99 ?> 100 100 <div class="wrap"> 101 <div class="icon32"><img src="<?php echo plugins_url( '/anti-splog/includes/icon-large.png' ); ?>"/></div>102 101 <h2><?php _e( 'Anti-Splog Settings', 'ust' ) ?></h2> 103 102 … … 286 285 <td> 287 286 <select name="ust[signup_protect]" id="ust_signup_protect"> 288 <option value="none" <?php if ( $ust_settings['signup_protect'] == 'none' ) { 289 echo 'selected="selected"'; 290 } ?>><?php _e( 'None', 'ust' ) ?></option> 291 <option value="questions" <?php if ( $ust_settings['signup_protect'] == 'questions' ) { 292 echo 'selected="selected"'; 293 } ?>><?php _e( 'Admin Defined Questions', 'ust' ) ?></option> 294 <option value="asirra" <?php if ( $ust_settings['signup_protect'] == 'asirra' ) { 295 echo 'selected="selected"'; 296 } ?>><?php _e( 'ASIRRA - Pick the Cats', 'ust' ) ?></option> 297 <option value="recaptcha" <?php if ( $ust_settings['signup_protect'] == 'recaptcha' ) { 298 echo 'selected="selected"'; 299 } ?>><?php _e( 'reCAPTCHA - Advanced Captcha', 'ust' ) ?></option> 287 <option value="none" <?php selected( $ust_settings['signup_protect'], 'none' ); ?>><?php _e( 'None', 'ust' ) ?></option> 288 <option value="recaptcha" <?php selected( $ust_settings['signup_protect'], 'recaptcha' ); ?>><?php _e( 'reCAPTCHA - Advanced Captcha', 'ust' ) ?></option> 289 <option value="questions" <?php selected( $ust_settings['signup_protect'], 'questions' ); ?>><?php _e( 'Admin Defined Questions', 'ust' ) ?></option> 300 290 </select> 301 291 <br/><em><?php _e( 'These options are designed to prevent automated spam bot signups, so will have limited effect in stopping human sploggers. Be cautious using these options as it is important to find a balance between stopping bots and not annoying your users.', 'ust' ); ?></em> … … 306 296 <?php do_action( 'ust_settings' ); ?> 307 297 </table> 308 </div>309 </div>310 311 <div class="postbox">312 <h3 class='hndle'><span><?php _e( 'Assira', 'ust' ) ?></span></h3>313 314 <div class="inside">315 <p><?php _e( 'Asirra works by asking users to identify photographs of cats and dogs. This task is difficult for computers, but user studies have shown that people can accomplish it quickly and accurately. Many even think it\'s fun!. <a href="http://research.microsoft.com/en-us/um/redmond/projects/asirra/default.aspx" target="_blank">Read more and try a demo here.</a> You must have the cURL extension enabled in PHP to use this. There are no configuration options for Assira.', 'ust' ) ?></p>316 298 </div> 317 299 </div> -
anti-splog/trunk/includes/admin_templates/stats.php
r1019799 r1553953 266 266 </script> 267 267 <div class="wrap"> 268 <div class="icon32"><img src="<?php echo plugins_url( '/anti-splog/includes/icon-large.png' ); ?>"/></div>269 268 <h2><?php _e( 'Anti-Splog Statistics', 'ust' ) ?></h2> 270 269 -
anti-splog/trunk/includes/blog-suspended-template.php
r1261386 r1553953 5 5 //don't display spam form if archived 6 6 if ( $current_blog->archived == '1' ) { 7 wp_die( __( 'This blog has been archived.' ) ); 7 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) 8 return WP_CONTENT_DIR . '/blog-suspended.php'; 9 else 10 wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) ); 8 11 } 9 12 … … 19 22 //process form 20 23 $email_sent = $error1 = $error2 = $reason = false; 21 if ( isset( $_POST[' spam-submit'] ) && ! get_option( 'ust_email_sent' ) ) {24 if ( isset( $_POST['wp-submit'] ) && ! get_option( 'ust_email_sent' ) ) { 22 25 $reason = wp_filter_nohtml_kses( stripslashes( trim( $_POST['reason'] ) ) ); 23 26 … … 40 43 $user_email = get_option( 'admin_email' ); 41 44 $review_url = $ust_admin_url . "&tab=splogs&bid=$blog_id"; 42 $unspam_url = network_admin_url( "edit.php?action=confirm&action2=unspamblog&id=$blog_id&ref=" . urlencode( $ust_admin_url ) . "&msg=" . urlencode( sprintf( __( "You are about to unspam the blog %s" ), get_bloginfo( 'name' ) ) ) );43 45 $message_headers = "MIME-Version: 1.0\n" . "From: $user_email\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n"; 44 46 $subject = sprintf( __( 'Splog Review Request: %s', 'ust' ), get_bloginfo( 'url' ) ); 45 47 $message = sprintf( __( "Someone is disputing the spam status for the blog %s (%s).\nHere is their reason:\n_______________________\n\n%s\n\n_______________________\n", 'ust' ), get_bloginfo( 'name' ), get_bloginfo( 'url' ), $reason ); 46 48 $message .= sprintf( __( "Review: %s\n", 'ust' ), $review_url ); 47 $message .= sprintf( __( "Unspam: %s\n", 'ust' ), $unspam_url );48 49 wp_mail( $admin_email, $subject, $message, $message_headers ); 49 50 … … 56 57 $auto_spammed = get_option( 'ust_auto_spammed' ); 57 58 59 60 //fixes css urls to be from home site so they are not blocked 61 function override_css_url( $url ) { 62 return str_replace( site_url( '/' ), network_site_url( '/' ), $url ); 63 } 64 add_filter( 'style_loader_src', 'override_css_url' ); 65 58 66 /** 59 67 * Output the login page header. 60 68 * 61 * @param string $titleOptional. WordPress Log In Page title to display in <title> element. Default 'Log In'.62 * @param string $messageOptional. Message to display in header. Default empty.69 * @param string $title Optional. WordPress Log In Page title to display in <title> element. Default 'Log In'. 70 * @param string $message Optional. Message to display in header. Default empty. 63 71 * @param WP_Error $wp_error Optional. The error to pass. Default empty. 64 72 */ … … 86 94 <!--<![endif]--> 87 95 <head> 88 <meta http-equiv="Content-Type"89 content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>"/>90 <title><?php bloginfo( 'name' ); ?> › <?php echo $title; ?></title>96 <meta http-equiv="Content-Type" 97 content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>"/> 98 <title><?php bloginfo( 'name' ); ?> › <?php echo $title; ?></title> 91 99 <?php 92 100 … … 125 133 $classes[] = 'interim-login'; 126 134 ?> 127 <style type="text/css">html { 128 background-color: transparent; 129 }</style> 135 130 136 <?php 131 137 … … 141 147 * @since 3.5.0 142 148 * 143 * @param array $classes An array of body classes.144 * @param string $action The action that brought the visitor to the login page.149 * @param array $classes An array of body classes. 150 * @param string $action The action that brought the visitor to the login page. 145 151 */ 146 152 $classes = apply_filters( 'login_body_class', $classes, $action ); 147 153 148 154 ?> 155 <style type="text/css">#login { width: 350px; }</style> 149 156 </head> 150 157 <body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>"> 151 158 <div id="login"> 152 <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>"153 tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>159 <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" 160 tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1> 154 161 <?php 155 162 … … 215 222 * @param string $input_id Which input to auto-focus 216 223 */ 217 function login_footer( $input_id = '') {224 function login_footer( $input_id = '' ) { 218 225 ?> 219 226 … … 244 251 245 252 <style type="text/css" media="screen"> 246 #login form p {247 margin-bottom: 5px;248 }249 250 #reCAPTCHA {251 margin-left: -10px;252 }253 254 p.error {255 border: 1px solid red;256 padding: 5px;257 }253 #login form p { 254 margin-bottom: 5px; 255 } 256 257 #reCAPTCHA { 258 margin-left: -10px; 259 } 260 261 p.error { 262 border: 1px solid red; 263 padding: 5px; 264 } 258 265 </style> 259 266 … … 263 270 <?php if ( $email_sent ) { ?> 264 271 265 <p><?php _e( 'Your message has been sent. We will review it shortly.', 'ust' ); ?></p>272 <p><?php _e( 'Your message has been sent. We will review it shortly.', 'ust' ); ?></p> 266 273 267 274 <?php } else { ?> 268 275 <?php if ( $auto_spammed ) { ?> 269 <p><?php _e( 'Our automated filters have determined that this blog signup looks like it could be by a spammer. Because of this, to complete you registration please describe in one or two sentences what you intend to use this blog for in the form below and we will review your request. Thank you for your cooperation!', 'ust' ); ?></p>276 <p><?php _e( 'Our automated filters have determined that this blog signup looks like it could be by a spammer. Because of this, to complete you registration please describe in one or two sentences what you intend to use this blog for in the form below and we will review your request. Thank you for your cooperation!', 'ust' ); ?></p> 270 277 <?php } else { ?> 271 <p><?php _e( 'Sorry, but this blog has been marked as spam as defined in our Terms of Service.', 'ust' ); ?></p>278 <p><?php _e( 'Sorry, but this blog has been marked as spam as defined in our Terms of Service.', 'ust' ); ?></p> 272 279 <?php } ?> 273 280 274 281 <?php if ( ! get_option( 'ust_email_sent' ) ) { ?> 275 282 <?php if ( ! $auto_spammed ) { ?> 276 <p><?php _e( 'If you believe this decision was made in error you may contact us with your <strong>detailed</strong> reasons using the form below:', 'ust' ); ?></p>283 <p><?php _e( 'If you believe this decision was made in error you may contact us with your <strong>detailed</strong> reasons using the form below:', 'ust' ); ?></p> 277 284 <?php } 278 285 echo $error1; ?> 279 <p>280 <label><?php _e( 'Reason:', 'ust' ) ?><br/>281 <textarea name="reason" style="width: 100%" rows="5"282 tabindex="20"><?php echo esc_textarea( $reason ); ?></textarea></label>283 </p>286 <p> 287 <label><?php _e( 'Reason:', 'ust' ) ?><br/> 288 <textarea name="reason" style="width: 100%" rows="5" 289 tabindex="20"><?php echo esc_textarea( $reason ); ?></textarea></label> 290 </p> 284 291 <?php 285 292 $recaptcha = get_site_option( 'ust_recaptcha' ); … … 287 294 if ( $recaptcha['privkey'] ) { 288 295 echo '<script src="https://www.google.com/recaptcha/api.js" async defer></script>'; 289 echo '<p><label>' . __( 'Human Verification:', 'ust' ) . '</label></p>';290 296 echo $error2; 291 297 echo '<div class="g-recaptcha" data-sitekey="' . esc_attr( $recaptcha['pubkey'] ) . '" data-theme="' . esc_attr( $recaptcha['theme'] ) . '"></div>'; … … 293 299 } 294 300 ?> 295 <br class="clear"/>296 <p class="submit"><input type="submit" name="wp-submit" id="wp-submit"297 class="button button-primary button-large"298 value="<?php _e( 'Submit', 'ust' ); ?>"/></p>301 <br class="clear"/> 302 <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" 303 class="button button-primary button-large" 304 value="<?php _e( 'Submit', 'ust' ); ?>"/></p> 299 305 <?php } else { ?> 300 <p><?php _e( 'The admin has already been contacted to review.', 'ust' ); ?></p>301 <?php306 <p><?php _e( 'The admin has already been contacted to review.', 'ust' ); ?></p> 307 <?php 302 308 } 303 309 } ?> -
anti-splog/trunk/readme.txt
r1547754 r1553953 66 66 * Changing the signup page location 67 67 * Random user defined questions 68 * ASSIRA - picking the cat pictures69 68 * reCAPTCHA 70 69 * Moderation Queues … … 82 81 3. Changing the signup page location every 24 hours 83 82 4. Random user defined questions 84 5. ASSIRA - picking the cat pictures83 5. ASSIRA - no longer available 85 84 6. reCAPTCHA protection 86 85 7. Recent splogs queue, notice all the instant actions! … … 94 93 95 94 == Changelog == 95 96 = 2.2 = 97 * Remove Assira signup protection option that has been discontinued by Microsoft 98 * Fix spammed site form not sending reviews 99 * Fix missing styles on spammed site form in subdir installs 100 * Remove invalid unspam link from review emails 96 101 97 102 = 2.1.8 =
Note: See TracChangeset
for help on using the changeset viewer.