<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Wallpaper Script Forum Topic: Adding Captcha to Register-Anti Spam</title>
<link>http://wallpaperscript.com/forum/</link>
<description>Wallpaper Script FORUM</description>
<language>en</language>
<pubDate>Thu, 23 May 2013 05:35:30 +0000</pubDate>

<item>
<title>maihannijat on "Adding Captcha to Register-Anti Spam"</title>
<link>http://wallpaperscript.com/forum/topic/adding-captcha-to-register-anti-spam#post-5115</link>
<pubDate>Sat, 29 Jan 2011 06:41:36 +0000</pubDate>
<dc:creator>maihannijat</dc:creator>
<guid isPermaLink="false">5115@http://wallpaperscript.com/forum/</guid>
<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;We are all tired of spam, everyday users submitting spam photos. it really sucks deleting each of them and takes lots of time.&#60;/p&#62;
&#60;p&#62;Finally I have decided to add WallpaperScript built in Captcha for my site, this works great. &#60;/p&#62;
&#60;p&#62;Have a look to my Afghanistan Photos website for demo: &#60;a href=&#34;http://www.afgpictures.com&#34; rel=&#34;nofollow&#34;&#62;http://www.afgpictures.com&#60;/a&#62; &#60;/p&#62;
&#60;p&#62;Here are step by step guide how to install Built in capctcha for your website:&#60;/p&#62;
&#60;p&#62;1. Open register.inc.php which is located in root directory.&#60;/p&#62;
&#60;p&#62;Find:&#60;/p&#62;
&#60;p&#62;if ($_REQUEST[&#34;email&#34;]==&#34;&#34;)&#60;br /&#62;
	{&#60;br /&#62;
		$siteError-&#38;gt;add($LANG-&#38;gt;l('Email required'), &#34;error&#34;);&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;And add this code below above code.&#60;/p&#62;
&#60;p&#62;if (ENABLE_CAPTCHA==1)&#60;br /&#62;
		{&#60;br /&#62;
			if( (Tools::isSubmit('register')) and isset($_SESSION['security_code']) ) {&#60;br /&#62;
			   if( $_SESSION['security_code'] == $_POST['security_code'] &#38;#38;&#38;#38; !empty($_SESSION['security_code'] ) ) {&#60;/p&#62;
&#60;p&#62;					unset($_SESSION['security_code']);&#60;br /&#62;
			   } else {&#60;br /&#62;
					$siteError-&#38;gt;add($LANG-&#38;gt;l('Sorry, you have provided an invalid security code'));&#60;br /&#62;
			   }&#60;br /&#62;
			}&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;2. Open /templates/default/register.tpl&#60;/p&#62;
&#60;p&#62;Find:&#60;/p&#62;
&#60;li&#62;&#38;lt;label for=&#34;confirm_password&#34;&#38;gt;{l s='Confirm Password:'}&#38;lt;/label&#38;gt;&#38;lt;?=$WS-&#38;gt;show_input(array(&#34;type&#34;=&#38;gt;&#34;password&#34;, &#34;name&#34;=&#38;gt;&#34;confirm_password&#34;, &#34;class&#34; =&#38;gt; &#34;input-text&#34;))?&#38;gt;&#60;/li&#62;
&#60;p&#62;Add this after above code.&#60;/p&#62;
&#60;p&#62;{if $smarty.const.ENABLE_CAPTCHA==1}&#60;/p&#62;
&#60;li&#62;&#38;lt;label for=&#34;security_code&#34;&#38;gt;{l s='Security Code:'}&#38;lt;/label&#38;gt;{input type='captcha' name='security_code' id='security_code' class='input-text'}&#60;/li&#62;
&#60;p&#62;{/if}&#60;/p&#62;
&#60;p&#62;This is all but make sure your Captcha module is installed from your admin area.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
