Advertisement
BakerMan

Events Community / Goodbye Evil Spammer Text

Sep 13th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. <?php
  2.  
  3. // Find this line in event-form.php
  4. $this->formSpamControl();
  5.  
  6.  
  7. // Change it to the following
  8. if ( ! is_user_logged_in() ) {
  9.     // add honeypot for anon submissions
  10.     $class = " ";
  11.     if ( ( ( isset( $_POST[ 'naes' ] ) && $_POST[ 'naes' ] != 1 ) ) || ( $_POST && !isset( $_POST[ 'naes' ] ) ) )
  12.         $class = ' error';
  13.  
  14.     echo '<p><input type="checkbox" name="naes" value="1"> <label class="naes' . $class . '">';
  15.     echo 'Click to verify manual submission </label></p>';
  16.     echo '<input type="text" style="display: none;" name="aes" value="">';
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement