############################################################## 
## MOD Title: The humanizer
## MOD Author: Underhill < webmaster@underhill.de > (N/A) http://www.underhill.de/
## MOD Description: Changes the register form to prevent spam bots by a simple way
## MOD Version: 1.0.4
## Traduccion: Mitch <sicywea@gmail.com>
## 
## Installation Level: easy
## Installation Time: 5 minutes
## Files To Edit:
##		includes/usercp_register.php
##		templates/subSilver/profile_add_body.tpl
##		language/lang_english/lang_main.php
##		language/lang_spanish/lang_main.php
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 
## This modification was built for use with the phpBB template "subSilver"
##
## Tip: Change the name of the attribute to confuse spam bots
## Tips-Download: http://www.underhill.de/downloads/phpbb2mods/thehumanizertips.txt
##
## Screenshot: http://www.underhill.de/downloads/phpbb2mods/thehumanizer.png
## Download: http://www.underhill.de/downloads/phpbb2mods/thehumanizer.txt
############################################################## 
## MOD History: 
##
##   2006-06-11 - Version 1.0.4
##		- Successfully tested with phpBB 2.0.21
##
##   2006-04-29 - Version 1.0.3 
##		- MOD Syntax changes for the phpBB MOD Database
##
##   2006-04-19 - Version 1.0.2 
##		- Fixed bug with mode=editprofile (Markus Wandel and fanrpg)
##		- Fixed some little problems with spelling and usability
##
##   2006-04-18 - Version 1.0.1 
##		- MOD Syntax changes for the phpBB.de MOD Database
## 
##   2006-04-17 - Version 1.0.0
##		- Final-Version
##		- Successfully tested with EasyMOD beta (0.3.0)
## 
##   2006-04-14 - Version 0.0.1
##		- BETA-Version
##		- Built and successfully tested with phpBB 2.0.20
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ OPEN ]------------------------------------------------------------------
#

includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------------------------------
#
# Nota: La linea es en realidad mas larga que la que aqu se muestra, el codigo
# que se agrega a continuacin, va en una nueva linea.
#

	validate_optional_fields(

#
#-----[ AFTER, ADD ]------------------------------------------------------------
#

	// The humanizer MOD
	$ruhuman = ( isset($HTTP_POST_VARS['ruhuman']) ) ? ( ($HTTP_POST_VARS['ruhuman']) ? TRUE : 0 ) : 0;

#
#-----[ FIND ]------------------------------------------------------------------
#

	if ($board_config['enable_confirm'] && $mode == 'register')

#
#-----[ BEFORE, ADD ]-----------------------------------------------------------
#

	// The humanizer MOD
	if (!$ruhuman && $mode == 'register')
	{
		$error = TRUE;
		$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Are_u_human_wrong'];
	}

#
#-----[ FIND ]------------------------------------------------------------------
#

	if ( ($mode == 'register') || ($board_config['allow_namechange']) )

#
#-----[ BEFORE, ADD ]-----------------------------------------------------------
#

	// The humanizer MOD
	if ( $mode == 'register' )
	{
		$template->assign_block_vars('switch_register', array());
	}

#
#-----[ FIND ]------------------------------------------------------------------
#

		'SIGNATURE' => str_replace('<br />', "\n", $signature),

#
#-----[ AFTER, ADD ]------------------------------------------------------------
#

		// The humanizer MOD
		'ARE_U_HUMAN_YES' => ( $ruhuman ) ? 'checked="checked"' : '',
		'ARE_U_HUMAN_NO' => ( !$ruhuman ) ? 'checked="checked"' : '',

#
#-----[ FIND ]------------------------------------------------------------------
#

		'L_EMAIL_ADDRESS' => $lang['Email_address'],

#
#-----[ AFTER, ADD ]------------------------------------------------------------
#

		// The humanizer MOD
		'L_ARE_U_HUMAN' => $lang['Are_u_human'],
		'L_ARE_U_HUMAN_EXPLAIN' => $lang['Are_u_human_explain'],

#
#-----[ OPEN ]------------------------------------------------------------------
#

templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]------------------------------------------------------------------
#

	<!-- END switch_confirm -->

#
#-----[ AFTER, ADD ]------------------------------------------------------------
#

	<!-- The humanizer MOD -->
	<!-- BEGIN switch_register -->
	<tr> 
	  <td class="row1"><span class="gen">{L_ARE_U_HUMAN} *</span><br /><span class="gensmall">{L_ARE_U_HUMAN_EXPLAIN}</span></td>
	  <td class="row2"> 
		<input type="radio" name="ruhuman" value="1" {ARE_U_HUMAN_YES} />
		<span class="gen">{L_YES}</span>&nbsp;&nbsp; 
		<input type="radio" name="ruhuman" value="0" {ARE_U_HUMAN_NO} />
		<span class="gen">{L_NO}</span></td>
	</tr>
	<!-- END switch_register -->

#
#-----[ OPEN ]------------------------------------------------------------------
#

language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------------------------------
#

?>

#
#-----[ BEFORE, ADD ]-----------------------------------------------------------
#

// The humanizer MOD
$lang['Are_u_human'] = 'Are you human?';
$lang['Are_u_human_explain'] = 'Sorry but this stupid question shall keep away the bots from this forum...';
$lang['Are_u_human_wrong'] = 'Sorry, but the &quot;humanizer&quot; question must be answered.';

#
#-----[ OPEN ]------------------------------------------------------------------
#

language/lang_spanish/lang_main.php

#
#-----[ FIND ]------------------------------------------------------------------
#

?>

#
#-----[ BEFORE, ADD ]-----------------------------------------------------------
#

// The humanizer MOD
$lang['Are_u_human'] = 'Eres un Humano?';
$lang['Are_u_human_explain'] = 'Lo sentimos, pero esta estpida pregunta mantendr alejados a los robots de este foro...';
$lang['Are_u_human_wrong'] = 'Lo sentimos, pero la pregunta de si eres un &quot;humano&quot; debe ser respondida.';
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------------------------
#
# EoM
