[2.0.20] ConfusaBOT ACP

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
9
56%
Very Good
1
6%
Good
3
19%
Fair
1
6%
Poor
2
13%
 
Total votes: 16

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom » Thu Jun 08, 2006 1:24 pm

I just downloaded the 2.0.21 archive, and it's there - line 47, to be exact. But what I'm wondering is if, during the validation process, the <tab> characters in the search string got changed to spaces... that would confuse the search.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

neilbombd
Registered User
Posts: 85
Joined: Thu May 22, 2003 2:09 am

Post by neilbombd » Thu Jun 15, 2006 1:46 pm

Thanks for this, seems like a good idea :-)

DanGarion
Registered User
Posts: 8
Joined: Mon Nov 07, 2005 8:47 am

Post by DanGarion » Wed Jun 28, 2006 2:06 pm

Hrm,

I can't get this one to work for me. I installed it manually and went through it twice. When I click on Register and I get the agreement screen both the Over and Under 13 links do nothing.

http://www.theprc.com/phpBB2/profile.ph ... er&=&=true

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom » Wed Jun 28, 2006 4:40 pm

Did you make the SQL entries, so the program will have something to fill in? If you don't add the following to your database, things won't work:

Code: Select all

INSERT INTO phpbb_config (config_name,config_value) VALUES ('agreed_var','IAmInAgreement');
INSERT INTO phpbb_config (config_name,config_value) VALUES ('agreed_val','Yes');
INSERT INTO phpbb_config (config_name,config_value) VALUES ('coppa_var','Under13');
The key is that the ACP can not add values to the database; it can only change them. If you don't insert them beforehand, the update (quietly) fails.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

DanGarion
Registered User
Posts: 8
Joined: Mon Nov 07, 2005 8:47 am

Post by DanGarion » Wed Jun 28, 2006 7:08 pm

espicom wrote: Did you make the SQL entries, so the program will have something to fill in? If you don't add the following to your database, things won't work:

Code: Select all

INSERT INTO phpbb_config (config_name,config_value) VALUES ('agreed_var','IAmInAgreement');
INSERT INTO phpbb_config (config_name,config_value) VALUES ('agreed_val','Yes');
INSERT INTO phpbb_config (config_name,config_value) VALUES ('coppa_var','Under13');
The key is that the ACP can not add values to the database; it can only change them. If you don't insert them beforehand, the update (quietly) fails.


Yes I did but I will recheck my SQL to determine if I named them correctly. :)

DanGarion
Registered User
Posts: 8
Joined: Mon Nov 07, 2005 8:47 am

Post by DanGarion » Wed Jun 28, 2006 7:12 pm

Weird the values are there.

Code: Select all

 MySQL said: Documentation
#1062 - Duplicate entry 'agreed_var' for key 1
But in the ACP they aren't showing.

I'll have to fire up subsilver and see if it's a template issue. Any advice?

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom » Wed Jun 28, 2006 7:31 pm

The changes for other templates should be identical to subSilver. If the values are in the config table, though, they should be getting displayed, no matter which template you use - the user-side template files do not change, it's all in the program files. Only the board administration template is different.

Check your usercp_register.php against this code snippet; the "global" line in the show_coppa() function is very important!

Code: Select all

// ---------------------------------------
// Load agreement template since user has not yet
// agreed to registration conditions/coppa
//
function show_coppa()
{
	global $userdata, $template, $lang, $phpbb_root_path, $phpEx;
	global $board_config;

	$template->set_filenames(array(
		'body' => 'agreement.tpl')
	);

	$template->assign_vars(array(
		'REGISTRATION' => $lang['Registration'],
		'AGREEMENT' => $lang['Reg_agreement'],
		"AGREE_OVER_13" => $lang['Agree_over_13'],
		"AGREE_UNDER_13" => $lang['Agree_under_13'],
		'DO_NOT_AGREE' => $lang['Agree_not'],

		"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&".$board_config['agreed_var']."=".$board_config['agreed_val']),
		"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&".$board_config['agreed_var']."=".$board_config['agreed_val']."&".$board_config['coppa_var']."=true"))
	);

	$template->pparse('body');

}
//
// ---------------------------------------

$error = FALSE;
$error_msg = '';

// change to test for new setting of agreed
if ( isset($HTTP_POST_VARS[$board_config['agreed_var']]))
{
	if ($HTTP_POST_VARS[$board_config['agreed_var']] != $board_config['agreed_val'])
		unset($HTTP_POST_VARS[$board_config['agreed_var']]);
}
if ( isset($HTTP_GET_VARS[$board_config['agreed_var']]))
{
	if ($HTTP_GET_VARS[$board_config['agreed_var']] != $board_config['agreed_val'])
		unset($HTTP_GET_VARS[$board_config['agreed_var']]);
}
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

DanGarion
Registered User
Posts: 8
Joined: Mon Nov 07, 2005 8:47 am

Post by DanGarion » Wed Jun 28, 2006 8:00 pm

Yeah, that didn't seem to help. I just copied your's exactly the way it was. I'll try blowing away the script and template and start from scratch later.

Thanks for the help Jeff.

Cheers!

cyla
Registered User
Posts: 2
Joined: Fri Jul 07, 2006 4:04 pm
Location: Texas
Contact:

Post by cyla » Fri Jul 07, 2006 4:37 pm

Was there a solution for this?
iNfLuX wrote: ^^^ yeah, which is what i started doing... but i searched my
board_config_body.tpl and can find no reference to the {L_AUTOLOGIN_TIME} variable....


I'm having the same problem. I'm using the Classic style which has been pretty heavily modded.

Since that variable doesn't exist in my board_config_body.tpl is that step of the mod even necessary? What will happen if I skip it?

This looks like an excellent mod that I would like to install if I can.

Update: I checked and that variable doesn't even exist in the "virgin" unmodded Classic template, nor, for that matter, does the {L_ALLOW_AUTOLOGIN} variable (which probably explains why the {L_AUTOLOGIN_TIME} doesn't exist. I'm going to go ahead and try this mod while skipping that step and see what happens. I'll post back with my results.
I may be confused and clueless, but I show it with style!

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom » Fri Jul 07, 2006 5:45 pm

When dealing with other styles, you have to make sure those styles are up-to-date themselves - the auto_login stuff was added at 2.0.18, and a LOT of templates do not have it... In fact, I test for it in my v2.0.20 compatibility test program. You need to first update those styles to current (copying the coresponding subSilver file is usually the best bet) before applying this MOD.

Note that you can not administer everything in v2.0.18 and later if you do not have the string I'm searching for in your template!

In actuallity, where the template changes are placed does not matter. I have to put in something for EasyMOD to do the insert, and subSilver is the standard for what a template is supposed to support. Putting it after the auto login control stuff was just the most logical place.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

cyla
Registered User
Posts: 2
Joined: Fri Jul 07, 2006 4:04 pm
Location: Texas
Contact:

Post by cyla » Fri Jul 07, 2006 5:51 pm

Yeah I sorta figured that, so I just stuck it in somewhere else. It works great. Thanks for the mod and the prompt response. :)

For those using the Classic template, this is how I did that last step:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
templates/ca_classic/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
# Partial line match. Actual line is much longer.
#
		<td class="row1">{L_VISUAL_CONFIRM}
#
#-----[ FIND ]------------------------------------------
#
	</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
	<tr>
		<td class="row1">{L_AGREED_VAR}<br /><span class="gensmall">{L_AGREED_VAR_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="agreed_var" value="{AGREED_VAR}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_AGREED_VAL}<br /><span class="gensmall">{L_AGREED_VAL_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="agreed_val" value="{AGREED_VAL}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_COPPA_VAR}<br /><span class="gensmall">{L_COPPA_VAR_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="coppa_var" value="{COPPA_VAR}" /></td>
	</tr>
#
I may be confused and clueless, but I show it with style!

User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Post by EXreaction » Sat Jul 15, 2006 10:29 pm

Hey espicom, I was a hair bored so I decided to make a database installer for your mod. It does all of the SQL sections automatically. If you want, you could repackage your mod with this in, that would probably save you some time with the people that ask how to install the SQL section later on. :)

http://www.lithiumstudios.org/files/php ... nstall.php

Prince_Cedric
Registered User
Posts: 36
Joined: Wed Jun 26, 2002 12:28 pm
Location: Pilipinas
Contact:

Post by Prince_Cedric » Tue Aug 01, 2006 3:14 pm

Thanks for this mod. I just installed it. Let's see if it will work for me. :)

curiousgeorge2222
Registered User
Posts: 26
Joined: Fri Jan 09, 2004 12:05 am

Post by curiousgeorge2222 » Wed Aug 02, 2006 1:35 pm

I'd be curious to know how you make out........I put it on a while back and to be honest it didn't even slow the bots down.........
From what I can see...the bots aren't just posting blindly....they seem to be parsing the page to see whats required THEN they post.
Anyone else notice this ?

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom » Wed Aug 02, 2006 1:48 pm

More and more bots are parsing the page. When this change was originally done in January 2005, it was 100% effective against bots; My logs now show it to be about 50-60%, depending upon what time of the week you look at. I have seen instances where bots use the "sample" variants I've posted here, like "IAmInAgreement". I have not seen, though, one sent to me last month, where the bot used several variations in a single post....

It's all part of the layered approach. I have not had many spam registrations in the past year because this is not my only weapon against them. Visual Confirmation, especially if you're using one of the alternative CAPTCHA generators available, has caught all but two that got past this gate, and the logs show "proper history" for someone visiting the page (requests for images other than the CAPTCHA), and a full trail from index.php through the registration - it's hard to claim they were not a live person doing it, and you don't want to make things impossible for live people!
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

Post Reply

Return to “[2.0.x] MOD Database Releases”