Profile
Pastes: 44965
Members: 629

Oh, look!

Edit code: here. | Add this to your website. | Report abuse.

Short URL: N/A

Pasted as Diff File Format by XDOS on Wednesday, June 25th, 2008 5:12pm ( 4 years ago )

  1. diff -r rei_captcha/lang/English.php rei_captchamod/lang/English.php
  2. 12a13
  3. > 'Captcha guest info'      =>  'Require a captcha for guest's post. This can be helpful to stop spam.',
  4. diff -r rei_captcha/manifest.xml rei_captchamod/manifest.xml
  5. 5c5
  6. <       <version>1.2.1</version>
  7. ---
  8. >       <version>1.2.2</version>
  9. 20a21,30
  10. >               if (!defined('EXT_CUR_VERSION') || EXT_CUR_VERSION < '1.2.2')
  11. >               {
  12. >                 $rei_query = array(
  13. >                   'INSERT'  =>  'conf_name, conf_value',
  14. >                   'INTO'    =>  'config',
  15. >                   'VALUES'  =>  ''o_guest_captcha', 1'
  16. >                 );
  17. >                
  18. >                 $forum_db->query_build($rei_query_ or error(__FILE__, __LINE__);
  19. >               }
  20. 38c48
  21. <                       'WHERE'         =>      'conf_name IN ('o_regs_captcha', 'o_login_captcha', 'o_reset_captcha')'
  22. ---
  23. >                       'WHERE'         =>      'conf_name IN ('o_regs_captcha', 'o_guest_captcha', 'o_login_captcha', 'o_reset_captcha')'
  24. 48c58
  25. <               <hook id="rg_start,aop_start,li_start"><![CDATA[
  26. ---
  27. >               <hook id="rg_start,aop_start,li_start,po_start"><![CDATA[
  28. 54a65,81
  29. >               <hook id="po_form_submitted"><![CDATA[
  30. >                 session_start();
  31. >                
  32. >                 if ($forum_config['o_guest_captcha'] == '1' && (empty($_SESSION['image_text']) || strcasecmp(trim($_POST['req_image']), $_SESSION['image_text']) !== 0))
  33. >                               $errors[] = $lang_captcha['Invalid Text'];
  34. >               ]]></hook>
  35. >               <hook id="po_guest_info_end"><![CDATA[
  36. >                 ?>
  37. >                 <div class="frm-text required">
  38. >                   <label for="fld<?php echo ++$forum_page['fld_count'] ?>">
  39. >                     <span><?php echo 'em'.$lang_common['Reqmark'].'</em>' ?> <?php echo $lang_captcha['Captcha'] ?></span>
  40. >                     <small><?php echo $lang_captcha['Captcha Info'] ?></small>
  41. >                   </label><br />
  42. >                   <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_image value="" size="15" maxlength="10" />&nbsp;&nbsp;&nbsp;<img src="<?php echo $ext_info['url'].'/image.php?'.md5(time()) ?>" alt="" /></span>
  43. >                 </div>
  44. >                 <?php
  45. >               ]]></hook>
  46. 138a166
  47. >                                               <div class="radbox checkbox"><label for="fld<?php echo ++$forum_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[guest_captcha]" value="1"<?php if ($forum_config['o_regs_captcha'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_captcha['Captcha guest info'] ?></label></div>
  48. 150a179
  49. >                       if (!isset($form['guest_captcha']) || $form['guest_captcha'] != '1') $form['guest_captcha'] = '0';

Your Name:
Code Language:
Security Image:
Text seen in Image: