Post by Gunter » Mon Nov 27, 2006 12:44 am
That one looks more difficult to install, so let's try this first....
I made some alterations to the current mod to see if it will confuse the bots (or really stupid people) (unless I messed up the code, in which case I probably won't even be able to post

)
The changes are in 4 places where I wrote in: #### Changed blah blah....
Maybe Wasted can try these alterations and we'll see if it does any good.
Code: Select all
##############################################################
## MOD Title: Anti-bot Guest Post Mod
## MOD Author: otseng < N/A > (Oliver Tseng) http://debatingchristianity.com
## MOD Description: This MOD makes it a little bit harder
## for a robot to make an anonymous posting.
## It will ask to select a dropdown to confirm
## an anonymous post.
##
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: <5 Minutes
## Files To Edit:
## posting.php
## templates/subSilver/posting_body.tpl
## language/lang_english/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:
##
## The MOD will install using EasyMOD
##
## MOD dev thread:
## http://www.phpbb.com/phpBB/viewtopic.php?t=264103
##
## This MOD was in response to the following topic:
## http://www.phpbb.com/phpBB/viewtopic.php?t=263469
##
## Demo is available at:
## http://debatingchristianity.com/forum/viewtopic.php?t=1300
##
##############################################################
## MOD History:
##
## 2005-02-17 - Version 0.0.1
## - Beta release
##
## 2006-01-20 - Version 1.0.0
## - General release
##
## 2006-01-25 - Version 1.0.1
## - Replaced hard coded values
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
# $poll_options = ( isset($HTTP_POST_VARS['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_option_text'] : '';
# $poll_length = ( isset($HTTP_POST_VARS['poll_length']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_length'] : '';
$bbcode_uid = '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Anti-bot Guest Post Mod
$confirm_guest_post = ( !empty($HTTP_POST_VARS['confirm_guest_post']) ) ? $HTTP_POST_VARS['confirm_guest_post'] : '';
#
#-----[ FIND ]------------------------------------------
#
# prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
prepare_post($mode, $post_data,
#
#-----[ AFTER, ADD ]------------------------------------------
#
#### Changed "1" to "14"
// Anti-bot Guest Post Mod
if( !$userdata['session_logged_in'])
{
if ($confirm_guest_post != "14")
{
$error_msg = $lang['Confirm_post_error'];
}
}
#
#-----[ FIND ]------------------------------------------
#
if( !$userdata['session_logged_in'] || ( $mode == 'editpost' && $post_info['poster_id'] == ANONYMOUS ) )
{
$template->assign_block_vars('switch_username_select', array());
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Anti-bot Guest Post Mod
if( !$userdata['session_logged_in'])
{
$template->assign_block_vars('switch_antibot_post', array());
}
#
#-----[ FIND ]------------------------------------------
#
'SMILIES_STATUS' => $smilies_status,
#
#-----[ AFTER, ADD ]------------------------------------------
#
#### Changed to add more choices
'L_CONFIRM_POST' => $lang['Confirm_post'],
'L_CONFIRM_POST_EXPLAIN' => $lang['Confirm_post_explain'],
'L_YES_1' => $lang['No Im not a bot.'],
'L_NO_1' => $lang['I might be a bot.'],
'L_NO_2' => $lang['No Im not a dog.'],
'L_NO_3' => $lang['No Im not a train.'],
'L_NO_4' => $lang['No Im not a frog.'],
'L_NO_5' => $lang['No Im not a what?'],
'L_NO_6' => $lang['Yes I eat cheese.'],
'L_NO_7' => $lang['Yes Im a bot'],
'L_NO_8' => $lang['Yes but I love you.'],
'L_NO_9' => $lang['Yes please ban me.'],
'L_NO_10' => $lang['Yes yes yes oh gosh yes!'],
'L_NO_11' => $lang['Yes'],
'L_NO_12' => $lang['No comprende.'],
'L_NO_13' => $lang['No Nukes.'],
'L_NO_14' => $lang['No Im not a dot.'],
'L_NO_15' => $lang['No Im not a pot.'],
'L_NO_16' => $lang['No but Im naked'],
'L_NO_17' => $lang['Yes.'],
'L_NO_18' => $lang['No No No please No!'],
'L_NO_19' => $lang['No means No.'],
'L_NO_20' => $lang['I hate bots.'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
<td class="row2" width="78%"> <span class="gen">
<input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />
</span> </td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
### Changed to add more answers
<!-- BEGIN switch_antibot_post -->
<tr>
<td class="row1"><span class="gen"><b>{L_CONFIRM_POST}</b></span></td>
<td class="row2"><span class="genmed">
<select name="confirm_guest_post" size="10">
<option value="0">{L_NO_1}</option>
<option value="1">{L_NO_2}</option>
<option value="2">{L_NO_3}</option>
<option value="3">{L_NO_4}</option>
<option value="4">{L_NO_5}</option>
<option value="5">{L_NO_6}</option>
<option value="6">{L_NO_7}</option>
<option value="7">{L_NO_8}</option>
<option value="8">{L_NO_9}</option>
<option value="9">{L_NO_10}</option>
<option value="10">{L_NO_11}</option>
<option value="11">{L_NO_12}</option>
<option value="12">{L_NO_13}</option>
<option value="13">{L_NO_14}</option>
<option value="14">{L_YES_1}</option>
<option value="15">{L_NO_15}</option>
<option value="16">{L_NO_16}</option>
<option value="17">{L_NO_17}</option>
<option value="18">{L_NO_18}</option>
<option value="19">{L_NO_19}</option>
<option value="20">{L_NO_20}</option>
</select>
{L_CONFIRM_POST_EXPLAIN}</span></td>
</tr>
<!-- END switch_antibot_post -->
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
#### Changed some messages
// Anti-bot Guest Post Mod
$lang['Confirm_post'] = 'Bot Check:';
$lang['Confirm_post_explain'] = 'Are you a bot?';
$lang['Confirm_post_error'] = 'I cant confirm youre not a bot. Check the Bot Check again.';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
That one looks more difficult to install, so let's try this first....
I made some alterations to the current mod to see if it will confuse the bots (or really stupid people) (unless I messed up the code, in which case I probably won't even be able to post :lol: )
The changes are in 4 places where I wrote in: #### Changed blah blah....
Maybe Wasted can try these alterations and we'll see if it does any good.
[code]
##############################################################
## MOD Title: Anti-bot Guest Post Mod
## MOD Author: otseng < N/A > (Oliver Tseng) http://debatingchristianity.com
## MOD Description: This MOD makes it a little bit harder
## for a robot to make an anonymous posting.
## It will ask to select a dropdown to confirm
## an anonymous post.
##
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: <5 Minutes
## Files To Edit:
## posting.php
## templates/subSilver/posting_body.tpl
## language/lang_english/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:
##
## The MOD will install using EasyMOD
##
## MOD dev thread:
## http://www.phpbb.com/phpBB/viewtopic.php?t=264103
##
## This MOD was in response to the following topic:
## http://www.phpbb.com/phpBB/viewtopic.php?t=263469
##
## Demo is available at:
## http://debatingchristianity.com/forum/viewtopic.php?t=1300
##
##############################################################
## MOD History:
##
## 2005-02-17 - Version 0.0.1
## - Beta release
##
## 2006-01-20 - Version 1.0.0
## - General release
##
## 2006-01-25 - Version 1.0.1
## - Replaced hard coded values
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
# $poll_options = ( isset($HTTP_POST_VARS['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_option_text'] : '';
# $poll_length = ( isset($HTTP_POST_VARS['poll_length']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_length'] : '';
$bbcode_uid = '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Anti-bot Guest Post Mod
$confirm_guest_post = ( !empty($HTTP_POST_VARS['confirm_guest_post']) ) ? $HTTP_POST_VARS['confirm_guest_post'] : '';
#
#-----[ FIND ]------------------------------------------
#
# prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
prepare_post($mode, $post_data,
#
#-----[ AFTER, ADD ]------------------------------------------
#
#### Changed "1" to "14"
// Anti-bot Guest Post Mod
if( !$userdata['session_logged_in'])
{
if ($confirm_guest_post != "14")
{
$error_msg = $lang['Confirm_post_error'];
}
}
#
#-----[ FIND ]------------------------------------------
#
if( !$userdata['session_logged_in'] || ( $mode == 'editpost' && $post_info['poster_id'] == ANONYMOUS ) )
{
$template->assign_block_vars('switch_username_select', array());
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Anti-bot Guest Post Mod
if( !$userdata['session_logged_in'])
{
$template->assign_block_vars('switch_antibot_post', array());
}
#
#-----[ FIND ]------------------------------------------
#
'SMILIES_STATUS' => $smilies_status,
#
#-----[ AFTER, ADD ]------------------------------------------
#
#### Changed to add more choices
'L_CONFIRM_POST' => $lang['Confirm_post'],
'L_CONFIRM_POST_EXPLAIN' => $lang['Confirm_post_explain'],
'L_YES_1' => $lang['No Im not a bot.'],
'L_NO_1' => $lang['I might be a bot.'],
'L_NO_2' => $lang['No Im not a dog.'],
'L_NO_3' => $lang['No Im not a train.'],
'L_NO_4' => $lang['No Im not a frog.'],
'L_NO_5' => $lang['No Im not a what?'],
'L_NO_6' => $lang['Yes I eat cheese.'],
'L_NO_7' => $lang['Yes Im a bot'],
'L_NO_8' => $lang['Yes but I love you.'],
'L_NO_9' => $lang['Yes please ban me.'],
'L_NO_10' => $lang['Yes yes yes oh gosh yes!'],
'L_NO_11' => $lang['Yes'],
'L_NO_12' => $lang['No comprende.'],
'L_NO_13' => $lang['No Nukes.'],
'L_NO_14' => $lang['No Im not a dot.'],
'L_NO_15' => $lang['No Im not a pot.'],
'L_NO_16' => $lang['No but Im naked'],
'L_NO_17' => $lang['Yes.'],
'L_NO_18' => $lang['No No No please No!'],
'L_NO_19' => $lang['No means No.'],
'L_NO_20' => $lang['I hate bots.'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
<td class="row2" width="78%"> <span class="gen">
<input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />
</span> </td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
### Changed to add more answers
<!-- BEGIN switch_antibot_post -->
<tr>
<td class="row1"><span class="gen"><b>{L_CONFIRM_POST}</b></span></td>
<td class="row2"><span class="genmed">
<select name="confirm_guest_post" size="10">
<option value="0">{L_NO_1}</option>
<option value="1">{L_NO_2}</option>
<option value="2">{L_NO_3}</option>
<option value="3">{L_NO_4}</option>
<option value="4">{L_NO_5}</option>
<option value="5">{L_NO_6}</option>
<option value="6">{L_NO_7}</option>
<option value="7">{L_NO_8}</option>
<option value="8">{L_NO_9}</option>
<option value="9">{L_NO_10}</option>
<option value="10">{L_NO_11}</option>
<option value="11">{L_NO_12}</option>
<option value="12">{L_NO_13}</option>
<option value="13">{L_NO_14}</option>
<option value="14">{L_YES_1}</option>
<option value="15">{L_NO_15}</option>
<option value="16">{L_NO_16}</option>
<option value="17">{L_NO_17}</option>
<option value="18">{L_NO_18}</option>
<option value="19">{L_NO_19}</option>
<option value="20">{L_NO_20}</option>
</select>
{L_CONFIRM_POST_EXPLAIN}</span></td>
</tr>
<!-- END switch_antibot_post -->
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
#### Changed some messages
// Anti-bot Guest Post Mod
$lang['Confirm_post'] = 'Bot Check:';
$lang['Confirm_post_explain'] = 'Are you a bot?';
$lang['Confirm_post_error'] = 'I cant confirm youre not a bot. Check the Bot Check again.';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
[/code]