mod 510
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

mod 510
Heb deze ingebouwd, maar zie geen enkel verschil.
Is deze niet geschikt voor phpBB-2.0.10 ?????
##############################################################
## MOD Title: Yet Another Anti Robotic Register Flood
## MOD Author: Iluvatar
##
## MOD Information: Most of the code comes from Smartor's Anti Robotic Register Flood
## I've just modded the mod. I wanted a more comercial type look, aswell
## as avoiding using images (Some users found the difficult to understand
## don't ask me why).
##
## MOD Description: This will add a Random-graphical-text Vadiation field in
## Registration form to protect your phpBB from being flooded
## of robotic-member-registration (like many free webhost signup form...)
## MOD Version: 0.0.3
##
## MOD Credits: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
##
## Installation Level: easy
## Installation Time: 10 Minutes
## Files To Edit: 4
## includes/constants.php
## includes/usercp_register.php
## admin/admin_board.php
## templates/subSilver/admin/board_config_body.tpl
##
## Included Files: 1
## yaarrf_pic.php
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]---------------------------------------------
#
CREATE TABLE phpbb_anti_robotic_reg (
session_id char(32) DEFAULT '' NOT NULL,
reg_key char(5) NOT NULL,
timestamp int(11) unsigned NOT NULL,
PRIMARY KEY (session_id));
#
#-----[ COPY ]--------------------------------------------
#
copy yaarrf_pic.php to yaarrf_pic.php
#
#-----[ OPEN ]--------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]--------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-------------------------------------
#
// Anti Robotic Register
define('ANTI_ROBOT_TABLE', $table_prefix.'anti_robotic_reg');
#
#-----[ OPEN ]--------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]--------------------------------------------
#
$strip_var_list = array('username' => 'username',
#
#-----[ AFTER, ADD ]--------------------------------------
#
'confirm_code' => 'confirm_code',
#
#-----[ FIND ]--------------------------------------------
#
else if ( $mode == 'register' )
{
if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
}
#
#-----[ AFTER, ADD ]--------------------------------------
#
if ( $board_config['enable_confirm'] ) {
if ( empty($confirm_code) ) {
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
} else {
$sql = "SELECT * FROM " . ANTI_ROBOT_TABLE . " WHERE session_id = '" . $userdata['session_id'] . "'";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain registration information', '', __LINE__, __FILE__, $sql);
}
$anti_robot_row = $db->sql_fetchrow($result);
if ( $confirm_code != $anti_robot_row['reg_key'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
} else {
$sql = "DELETE FROM " . ANTI_ROBOT_TABLE . " WHERE session_id = '" . $userdata['session_id'] . "'";
if( $db->sql_query($sql) == FALSE )
{
message_die(GENERAL_ERROR, 'Could not delete validation key', '', __LINE__, __FILE__, $sql);
}
}
}
}
#
#-----[ FIND ]--------------------------------------------
#
'CUR_PASSWORD' => $cur_password,
'NEW_PASSWORD' => $new_password,
'PASSWORD_CONFIRM' => $password_confirm,
#
#-----[ AFTER, ADD ]--------------------------------------
#
'CONFIRM_IMG' => '<img src="yaarrf_pic.php" />',
#
#-----[ FIND ]--------------------------------------------
#
'L_CONFIRM_PASSWORD_EXPLAIN' => ( $mode == 'editprofile' ) ? $lang['Confirm_password_explain'] : '',
'L_PASSWORD_IF_CHANGED' => ( $mode == 'editprofile' ) ? $lang['password_if_changed'] : '',
'L_PASSWORD_CONFIRM_IF_CHANGED' => ( $mode == 'editprofile' ) ? $lang['password_confirm_if_changed'] : '',
#
#-----[ AFTER, ADD ]--------------------------------------
#
'L_CONFIRM_CODE_IMPAIRED' => ( $mode == 'register' ) ? $lang['Confirm_code_impaired'] : '',
'L_CONFIRM_CODE' => ( $mode == 'register' ) ? $lang['Confirm_code'] : '',
'L_CONFIRM_CODE_EXPLAIN' => ( $mode == 'register' ) ? $lang['Confirm_code_explain'] : '',
#
#-----[ FIND ]--------------------------------------------
#
}
}
$template->pparse('body');
#
#-----[ BEFORE, ADD ]--------------------------------------
#
} else {
if ( $board_config['enable_confirm'] ) {
$template->assign_block_vars('switch_confirm', array() );
}
#
#-----[ OPEN ]--------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]--------------------------------------------
#
$activation_none = ( $new['require_activation'] == USER_ACTIVATION_NONE ) ? "checked=\"checked\"" : "";
$activation_user = ( $new['require_activation'] == USER_ACTIVATION_SELF ) ? "checked=\"checked\"" : "";
$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : "";
#
#-----[ AFTER, ADD ]--------------------------------------
#
$confirm_yes = ( $new['enable_confirm'] ) ? "checked=\"checked\"" : "";
$confirm_no = ( !$new['enable_confirm'] ) ? "checked=\"checked\"" : "";
#
#-----[ FIND ]--------------------------------------------
#
"L_ACCT_ACTIVATION" => $lang['Acct_activation'],
"L_NONE" => $lang['Acc_None'],
"L_USER" => $lang['Acc_User'],
"L_ADMIN" => $lang['Acc_Admin'],
#
#-----[ AFTER, ADD ]--------------------------------------
#
"L_CONFIRM_CODE" => $lang['Confirm_code'],
#
#-----[ OPEN ]--------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]--------------------------------------------
#
<tr>
<td class="row1">{L_ACCT_ACTIVATION}</td>
<td class="row2"><input type="radio" name="require_activation" value="{ACTIVATION_NONE}" {ACTIVATION_NONE_CHECKED} />{L_NONE} <input type="radio" name="require_activation" value="{ACTIVATION_USER}" {ACTIVATION_USER_CHECKED} />{L_USER} <input type="radio" name="require_activation" value="{ACTIVATION_ADMIN}" {ACTIVATION_ADMIN_CHECKED} />{L_ADMIN}</td>
</tr>
#
#-----[ AFTER, ADD ]--------------------------------------
#
<tr>
<td class="row1">{L_CONFIRM_CODE}</td>
<td class="row2"><input type="radio" name="enable_confirm" value="1" {CONFIRM_ENABLE} />{L_YES} <input type="radio" name="enable_confirm" value="0" {CONFIRM_DISABLE} />{L_NO}</td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Is deze niet geschikt voor phpBB-2.0.10 ?????
##############################################################
## MOD Title: Yet Another Anti Robotic Register Flood
## MOD Author: Iluvatar
##
## MOD Information: Most of the code comes from Smartor's Anti Robotic Register Flood
## I've just modded the mod. I wanted a more comercial type look, aswell
## as avoiding using images (Some users found the difficult to understand
## don't ask me why).
##
## MOD Description: This will add a Random-graphical-text Vadiation field in
## Registration form to protect your phpBB from being flooded
## of robotic-member-registration (like many free webhost signup form...)
## MOD Version: 0.0.3
##
## MOD Credits: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
##
## Installation Level: easy
## Installation Time: 10 Minutes
## Files To Edit: 4
## includes/constants.php
## includes/usercp_register.php
## admin/admin_board.php
## templates/subSilver/admin/board_config_body.tpl
##
## Included Files: 1
## yaarrf_pic.php
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]---------------------------------------------
#
CREATE TABLE phpbb_anti_robotic_reg (
session_id char(32) DEFAULT '' NOT NULL,
reg_key char(5) NOT NULL,
timestamp int(11) unsigned NOT NULL,
PRIMARY KEY (session_id));
#
#-----[ COPY ]--------------------------------------------
#
copy yaarrf_pic.php to yaarrf_pic.php
#
#-----[ OPEN ]--------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]--------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-------------------------------------
#
// Anti Robotic Register
define('ANTI_ROBOT_TABLE', $table_prefix.'anti_robotic_reg');
#
#-----[ OPEN ]--------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]--------------------------------------------
#
$strip_var_list = array('username' => 'username',
#
#-----[ AFTER, ADD ]--------------------------------------
#
'confirm_code' => 'confirm_code',
#
#-----[ FIND ]--------------------------------------------
#
else if ( $mode == 'register' )
{
if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
}
#
#-----[ AFTER, ADD ]--------------------------------------
#
if ( $board_config['enable_confirm'] ) {
if ( empty($confirm_code) ) {
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
} else {
$sql = "SELECT * FROM " . ANTI_ROBOT_TABLE . " WHERE session_id = '" . $userdata['session_id'] . "'";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain registration information', '', __LINE__, __FILE__, $sql);
}
$anti_robot_row = $db->sql_fetchrow($result);
if ( $confirm_code != $anti_robot_row['reg_key'] )
{
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
} else {
$sql = "DELETE FROM " . ANTI_ROBOT_TABLE . " WHERE session_id = '" . $userdata['session_id'] . "'";
if( $db->sql_query($sql) == FALSE )
{
message_die(GENERAL_ERROR, 'Could not delete validation key', '', __LINE__, __FILE__, $sql);
}
}
}
}
#
#-----[ FIND ]--------------------------------------------
#
'CUR_PASSWORD' => $cur_password,
'NEW_PASSWORD' => $new_password,
'PASSWORD_CONFIRM' => $password_confirm,
#
#-----[ AFTER, ADD ]--------------------------------------
#
'CONFIRM_IMG' => '<img src="yaarrf_pic.php" />',
#
#-----[ FIND ]--------------------------------------------
#
'L_CONFIRM_PASSWORD_EXPLAIN' => ( $mode == 'editprofile' ) ? $lang['Confirm_password_explain'] : '',
'L_PASSWORD_IF_CHANGED' => ( $mode == 'editprofile' ) ? $lang['password_if_changed'] : '',
'L_PASSWORD_CONFIRM_IF_CHANGED' => ( $mode == 'editprofile' ) ? $lang['password_confirm_if_changed'] : '',
#
#-----[ AFTER, ADD ]--------------------------------------
#
'L_CONFIRM_CODE_IMPAIRED' => ( $mode == 'register' ) ? $lang['Confirm_code_impaired'] : '',
'L_CONFIRM_CODE' => ( $mode == 'register' ) ? $lang['Confirm_code'] : '',
'L_CONFIRM_CODE_EXPLAIN' => ( $mode == 'register' ) ? $lang['Confirm_code_explain'] : '',
#
#-----[ FIND ]--------------------------------------------
#
}
}
$template->pparse('body');
#
#-----[ BEFORE, ADD ]--------------------------------------
#
} else {
if ( $board_config['enable_confirm'] ) {
$template->assign_block_vars('switch_confirm', array() );
}
#
#-----[ OPEN ]--------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]--------------------------------------------
#
$activation_none = ( $new['require_activation'] == USER_ACTIVATION_NONE ) ? "checked=\"checked\"" : "";
$activation_user = ( $new['require_activation'] == USER_ACTIVATION_SELF ) ? "checked=\"checked\"" : "";
$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : "";
#
#-----[ AFTER, ADD ]--------------------------------------
#
$confirm_yes = ( $new['enable_confirm'] ) ? "checked=\"checked\"" : "";
$confirm_no = ( !$new['enable_confirm'] ) ? "checked=\"checked\"" : "";
#
#-----[ FIND ]--------------------------------------------
#
"L_ACCT_ACTIVATION" => $lang['Acct_activation'],
"L_NONE" => $lang['Acc_None'],
"L_USER" => $lang['Acc_User'],
"L_ADMIN" => $lang['Acc_Admin'],
#
#-----[ AFTER, ADD ]--------------------------------------
#
"L_CONFIRM_CODE" => $lang['Confirm_code'],
#
#-----[ OPEN ]--------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]--------------------------------------------
#
<tr>
<td class="row1">{L_ACCT_ACTIVATION}</td>
<td class="row2"><input type="radio" name="require_activation" value="{ACTIVATION_NONE}" {ACTIVATION_NONE_CHECKED} />{L_NONE} <input type="radio" name="require_activation" value="{ACTIVATION_USER}" {ACTIVATION_USER_CHECKED} />{L_USER} <input type="radio" name="require_activation" value="{ACTIVATION_ADMIN}" {ACTIVATION_ADMIN_CHECKED} />{L_ADMIN}</td>
</tr>
#
#-----[ AFTER, ADD ]--------------------------------------
#
<tr>
<td class="row1">{L_CONFIRM_CODE}</td>
<td class="row2"><input type="radio" name="enable_confirm" value="1" {CONFIRM_ENABLE} />{L_YES} <input type="radio" name="enable_confirm" value="0" {CONFIRM_DISABLE} />{L_NO}</td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Met groet, The Sting
Was hem inderdaad, ook zonder tekst en waar de letter moet staan, die overgenomen moet worden staat een kruisje.The Sting schreef:Helemaal niet aan gedacht, in het acp is wel een ja nee bij gekomen, maar geen teks, dus dat zal hem wel zijn, ga proberen, maar jammer als ie geen tekst erbij zet in het acpSpambot schreef:Heb je de mod op "enabled" staan in de ACP?
Met groet, The Sting
Tekst zou je wel moeten zien, kijk even of je deze defenities in language/lang_english/lang_main.php hebt staan:
Zo niet, zet ze er dan zelf in.
Code: Selecteer alles
$lang['Confirm_code_impaired']
$lang['Confirm_code']
$lang['Confirm_code_explain']Staat erin maar die werd file werd in heel de mod niet genoemd.Spambot schreef:Tekst zou je wel moeten zien, kijk even of je deze defenities in language/lang_english/lang_main.php hebt staan:
Zo niet, zet ze er dan zelf in.Code: Selecteer alles
$lang['Confirm_code_impaired'] $lang['Confirm_code'] $lang['Confirm_code_explain']
Met groet, The Sting
Moest in de includes/usercp_register.phpThe Sting schreef:Staat erin maar die werd file werd in heel de mod niet genoemd.Spambot schreef:Tekst zou je wel moeten zien, kijk even of je deze defenities in language/lang_english/lang_main.php hebt staan:
Zo niet, zet ze er dan zelf in.Code: Selecteer alles
$lang['Confirm_code_impaired'] $lang['Confirm_code'] $lang['Confirm_code_explain']
Maar ik zie bij de inmelding ook de letter niet waar het over gaat?.
Ken jij een andere manier om robots buiten te huden?.
Met groet, The Sting
Ja dus?The Sting schreef:Moest in de includes/usercp_register.php
Watte?The Sting schreef:Maar ik zie bij de inmelding ook de letter niet waar het over gaat?.
Ik heb eerlijk gezegd helemaal geen last van robots (heb er één keer eentje moeten verbannen). Ik ben op de internationale sites wel een heleboel mods tegengekomen hiervoor.The Sting schreef:Ken jij een andere manier om robots buiten te huden?.
Bedankt, neem aan dat jij al langer draait, ga er maar vanuit dat het voorlopig niet gebeurt en kom er misschien wel een tegen.Spambot schreef:Ja dus?The Sting schreef:Moest in de includes/usercp_register.php
Watte?The Sting schreef:Maar ik zie bij de inmelding ook de letter niet waar het over gaat?.
Ik heb eerlijk gezegd helemaal geen last van robots (heb er één keer eentje moeten verbannen). Ik ben op de internationale sites wel een heleboel mods tegengekomen hiervoor.The Sting schreef:Ken jij een andere manier om robots buiten te huden?.
Bedankt
Met groet, The Sting