Edit code: here. | Add this PasteBin to your website. | Report abuse.
Pasted as diff by XDOS on Wednesday, June 25th, 2008 5:12pm
- diff -r rei_captcha/lang/English.php rei_captchamod/lang/English.php
- 12a13
- > 'Captcha guest info' => 'Require a captcha for guest's post. This can be helpful to stop spam.',
- diff -r rei_captcha/manifest.xml rei_captchamod/manifest.xml
- 5c5
- < <version>1.2.1</version>
- ---
- > <version>1.2.2</version>
- 20a21,30
- > if (!defined('EXT_CUR_VERSION') || EXT_CUR_VERSION < '1.2.2')
- > {
- > $rei_query = array(
- > 'INSERT' => 'conf_name, conf_value',
- > 'INTO' => 'config',
- > 'VALUES' => ''o_guest_captcha', 1'
- > );
- >
- > $forum_db->query_build($rei_query_ or error(__FILE__, __LINE__);
- > }
- 38c48
- < 'WHERE' => 'conf_name IN ('o_regs_captcha', 'o_login_captcha', 'o_reset_captcha')'
- ---
- > 'WHERE' => 'conf_name IN ('o_regs_captcha', 'o_guest_captcha', 'o_login_captcha', 'o_reset_captcha')'
- 48c58
- < <hook id="rg_start,aop_start,li_start"><![CDATA[
- ---
- > <hook id="rg_start,aop_start,li_start,po_start"><![CDATA[
- 54a65,81
- > <hook id="po_form_submitted"><![CDATA[
- > session_start();
- >
- > if ($forum_config['o_guest_captcha'] == '1' && (empty($_SESSION['image_text']) || strcasecmp(trim($_POST['req_image']), $_SESSION['image_text']) !== 0))
- > $errors[] = $lang_captcha['Invalid Text'];
- > ]]></hook>
- > <hook id="po_guest_info_end"><![CDATA[
- > ?>
- > <div class="frm-text required">
- > <label for="fld<?php echo ++$forum_page['fld_count'] ?>">
- > <span><?php echo 'em'.$lang_common['Reqmark'].'</em>' ?> <?php echo $lang_captcha['Captcha'] ?></span>
- > <small><?php echo $lang_captcha['Captcha Info'] ?></small>
- > </label><br />
- > <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_image value="" size="15" maxlength="10" /> <img src="<?php echo $ext_info['url'].'/image.php?'.md5(time()) ?>" alt="" /></span>
- > </div>
- > <?php
- > ]]></hook>
- 138a166
- > <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>
- 150a179
- > if (!isset($form['guest_captcha']) || $form['guest_captcha'] != '1') $form['guest_captcha'] = '0';