[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

mad_bob
Registered User
Posts: 266
Joined: Thu Aug 11, 2005 6:39 am

Post by mad_bob »

Just installed this mod but am now having problems deleting users... I go through it all in the ACP but when I have ticked the delete box then click submit I don't get any confirmation box. It goes back the the find user page and no one has been deleted.

Can anyone help please. thanks.
paul_amass
Registered User
Posts: 10
Joined: Tue May 16, 2006 2:33 pm

Post by paul_amass »

Has anybody else had problems with this mod after upgrading to 20.0.22 version?

I now get the following error message when a user tries to register:

Invalid Session. Please resubmit the form.


Can anyone help
paul_amass
Registered User
Posts: 10
Joined: Tue May 16, 2006 2:33 pm

Post by paul_amass »

Ok, I have tried to debug this one, but have got stuck

The problem seems to be with the following new check in usercp_register.php

Code: Select all

// session id check
if ($sid == '' || $sid != $userdata['session_id'])....
I outputed both of the variables and got the following:
SID - 0
Userdata - 7040a49736a363a5136889a2414523d7

I tracked this up and found for some reason the sid is not being posted to this page and is therefore not being set.

Code: Select all

$sid = (isset($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : 0;
and now, I'm stuck! Can someone help?
paul_amass
Registered User
Posts: 10
Joined: Tue May 16, 2006 2:33 pm

Post by paul_amass »

Ok I managed to find a solution as follows for anyone else who experiences the same issue

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]---------------------------------------------
# Around Line 916
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="'.AGREED_VAR.'" value="'.AGREED_VAL.'" /><input type="hidden" name="'.COPPA_VAR.'" value="' . $coppa . '" />';
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

Paul, your patch seems to be for the "Lite" version of this MOD...

In any case, the FIND used in the v2.0.22 update MOD file is far too long, and will break with just about any MOD that changes the $s_hidden_fields variable. This is one of the dangers of EasyMOD, and something that has been discussed amongst MOD writers more than once. In general, what you search for has to be as small as you can get away with to find where to make the changes, sometimes using the confusing "double-FIND", to keep EM happy. And then the update MOD comes out, and does just the opposite! :roll:

In this case, the update MOD should have used this as the search:

Code: Select all

#
#-----[ FIND ]---------------------------------------------
# Around Line 916, partial line
$s_hidden_fields = '<input type="hidden" name="mode"
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
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
davidm999
Registered User
Posts: 12
Joined: Sat Aug 14, 2004 3:14 am

Post by davidm999 »

I installed this mod today and ran into a problem that might catch others.

In the ConfusaBOT_ACP.MOD file I downloaded the following is included:


#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
"L_ALLOW_AUTOLOGIN_EXPLAIN" => $lang['Allow_autologin_explain'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_AGREED_VAR' => $lang['Agreed_Var'],
'L_AGREED_VAR_EXPLAIN' => $lang['Agreed_Var_explain'],
'L_AGREED_VAL' => $lang['Agreed_Val'],
'L_AGREED_VAL_EXPLAIN' => $lang['Agreed_Val_explain'],
'L_COPPA_VAR' => $lang['Coppa_Var'],
'L_COPPA_VAR_EXPLAIN' => $lang['Coppa_Var_explain'],
#
#-----[ FIND ]------------------------------------------
#
'AUTOLOGIN_TIME' => (int) $new['max_autologin_time'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"AGREED_VAR" => $new['agreed_var'],
"AGREED_VAL" => $new['agreed_val'],
"COPPA_VAR" => $new['coppa_var'],
#


I don't know a lot about this stuff but when the mod didn't work correctly I looked at the admin_board.php file and it seemed that the lines starting with single-quotes should have double-quotes and vice-versa:

'L_AGREED_VAR' => $lang['Agreed_Var'],
should have double-quotes at the beginning i.e.:
"L_AGREED_VAR" => $lang['Agreed_Var'],

and

"AGREED_VAR" => $new['agreed_var'],
should have single-quotes i.e.
'AGREED_VAR' => $new['agreed_var'],

Is this correct?

I don't think I can have been the only person caught by this so maybe the ConfusaBOT_ACP.MOD file I have is incorrect or has been corrupted? I'm using skEdit on a Mac to read the file and make the required changes.

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

Post by espicom »

In PHP, the use of single or double quotes is, generally, interchangeable. If you are putting together a string that contains single quote characters, use the double quote to delimit it, and vice versa.

Yes, there is a difference. If you want PHP to do variable substitution inside the string, you can not use single quotes to delimit it - single quotes say "This string is not to be messed with", while double quotes allow PHP to look at the string for things to be substituted. A line end character, \n, will be replaced with a real line end in the string, if the string is done in double quotes, but NOT if it is in single quotes. Example:

Code: Select all

$testvar = "testing\n1\n2\n3\n!!!"; 
echo 'the value of $testvar is ';
echo "$testvar";
will print out:

Code: Select all

the value of $testvar is testing
1
2
3
!!!

Code: Select all

$testvar = 'testing\n1\n2\n3\n!!!'; 
echo 'the value of $testvar is ';
echo "$testvar";
will print out:

Code: Select all

the value of $testvar is testing\n1\n2\n3\n!!!
Yes, I should have been consistent, but it does not matter in this case.
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
somervilledog
Registered User
Posts: 9
Joined: Mon Jul 26, 2004 3:36 pm
Location: Somerville, MA

Free Gifts with ConfusaBOT_ACP_v100

Post by somervilledog »

Why does this mod come with a file named ConfusaBOT_ACP.XML which appears to be a game called Big Bang 4-in-a-row?
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

The XML file is part of the "new era of MODs", called MODX. It's not a game, it's the MOD's text, formatted so that it can be displayed in a browser.

At least, that's what it was when I submitted the MOD for approval... :wink:

This is what it looks like in a browser.
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
somervilledog
Registered User
Posts: 9
Joined: Mon Jul 26, 2004 3:36 pm
Location: Somerville, MA

Got that too

Post by somervilledog »

In additition to the text file,

ConfusaBOT_ACP.MOD

I also got the files

modx.subsilver.en.xsl
ConfusaBOT_ACP.XML

modx.subsilver.en.xsl looks like this

Image

ConfusaBOT_ACP.XML looks like this

Image

The only file I downloaded yesterday was
ConfusaBOT_ACP_v100a.zip

and the three files to which I refer here were all included.
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

Don't know what to say, somervilledog, but this is the contents of ConfusaBOT_ACP.XML, as downloaded from here 2 minutes ago, edited to keep from clogging this forum up:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.subsilver.en.xsl"?>
<!--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/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.xsd">
	<header>
		<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
		<title lang="en-gb">ConfusaBOT ACP</title>
		<description lang="en-gb"><![CDATA[Change "agreed" and "coppa" variables to confuse bots]]></description>
		<author-notes><![CDATA[This MOD makes the "agreed" and "coppa" variables used in the registration screen more
easily adjustable through the Admin Control Panel. This MOD requires phpBB v2.0.20 or later.
Prior to installing this mod, you need to add the following configuration items to your
phpbb_config table:

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');

Of course, you need to substitute the names for YOUR config table and the variable names you
want to use.
IMPORTANT!!!!!!!!!!!!!
If you are using any templates other than subSilver, overall_header.tpl, admin/board_config_body.tpl,
and admin/styles_edit_body.tpl in each of them will need to be modified, as well.

If you are using any languages other than English, lang_admin.php in each language will need to
be modified, as well.]]></author-notes>
		<author-group>
			<author>
				<realname>Jeff Brenton</realname>
				<email>phpbb2mods@espi.com</email>
				<username>espicom</username>
				<homepage>N/A</homepage>
				<contributions />
			</author>
		</author-group>
		<mod-version>
			<major>1</major>
			<minor>0</minor>
			<revision>0</revision>
		</mod-version>
		<installation>
			<level>Easy</level>
			<time>0</time>
			<target-version>
				<target-primary>2.0</target-primary>
				<target-major allow="exact">2</target-major>
				<target-minor allow="exact">0</target-minor>
			</target-version>
		</installation>
		<history>
			<entry>
				<date>2005-05-11</date>
				<rev-version>
					<major>1</major>
					<minor>0</minor>
					<revision>0</revision>
				</rev-version>
				<changelog lang="en-gb">
					<change> mod created</change>
				</changelog>
			</entry>
		</history>
	</header>
There's no game involved. However, your system might be configured to load the game when it encounters XML files. Google says the game comes from www.freeverse.com/bbbg/ ...
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
somervilledog
Registered User
Posts: 9
Joined: Mon Jul 26, 2004 3:36 pm
Location: Somerville, MA

Post by somervilledog »

Thanks again, Jeff.

I just wanted to ascertain that I had not somehow downloaded malicious code from here before installing the MOD.

Thanks for checking the file. I think I'll try downloading it again, just in case...

Cheers,
Michele
mmkayle
Registered User
Posts: 61
Joined: Mon Nov 15, 2004 2:09 am

Admin Panel Text for ConfusaBot.MOD

Post by mmkayle »

I have completed the file revisions and SQL INSERT called for by ConfusaBot.MOD. The SQL INSERT in the MOD which I performed was
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');


I have three questions about how to proceed from here.

1) Am I correct in thinking that I now have to enter text into all three of the blank spaces at the Admin Panel (Agreed Variable, Agreed Value, and COPPA Variable - please see the graphic at http://www.zoofence.com/sql12.gif)?

2) If so, would you please give me examples of what might be acceptable entries at "Agreed Variable" and "Agreed Value" and "COPPA Variable". I assume from what I have read here that I should change the entries from time to time (to "confuse" the bots), but if someone here could give me some idea of what the text might be in each of the three spaces, I would appreciate it.

3) Finally, if I am correct at (1) and (2) about having to enter text in the three blank spaces, and from time to time changing that text, am I correct that that is all I need to do. In other words, I do not need to make a new SQL INSERT each time?

Thank you for your help.
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Re: Admin Panel Text for ConfusaBot.MOD

Post by espicom »

mmkayle wrote: 1) Am I correct in thinking that I now have to enter text into all three of the blank spaces at the Admin Panel (Agreed Variable, Agreed Value, and COPPA Variable - please see the graphic at http://www.zoofence.com/sql12.gif)?

2) If so, would you please give me examples of what might be acceptable entries at "Agreed Variable" and "Agreed Value" and "COPPA Variable". I assume from what I have read here that I should change the entries from time to time (to "confuse" the bots), but if someone here could give me some idea of what the text might be in each of the three spaces, I would appreciate it.

3) Finally, if I am correct at (1) and (2) about having to enter text in the three blank spaces, and from time to time changing that text, am I correct that that is all I need to do. In other words, I do not need to make a new SQL INSERT each time?


1) If you want to change any of the variables, you can do so through the ACP now. They SHOULD have contained the information from the inserts, however... Blank entries means your database fields were empty, Is your table prefix "phpbb_"? If not, you need to change the insert commands to use YOUR table prefix.

2) Acceptable values are anything you want, with the proviso that there be no spaces in the variable name, and it should be mixed-case. "DollyPartonHasManyTalents" is a viable variable name, as is "WellDoYou", or "MyDogSkippy". And the value has the same constraints. Just make it unique to your site.

3) The SQL insert is just to "seed" the values. With nothing in the database, registration won't work. When it's properly set up, you just use the admin control panel to make the changes.
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
mmkayle
Registered User
Posts: 61
Joined: Mon Nov 15, 2004 2:09 am

Post by mmkayle »

espicom, Thanks for your response. This is the first MOD I have ever installed, so forgive me if I stumble here a little.

You wrote,
If you want to change any of the variables, you can do so through the ACP now. They SHOULD have contained the information from the inserts, however. Blank entries means your database fields were empty. Is your table prefix "phpbb_"? If not, you need to change the insert commands to use YOUR table prefix.


I have posted a screen capture of the SQL page where I performed the INSERT. The URL is http://www.zoofence.com/sql14.gif. At the top of that graphic, it says "Table phpbb_config" which I think may be the answer to your question asking whether the table prefix is phpbb_.

I pasted all three lines together as shown in the screen capture (except, of course, they were not in red). Then I clicked "GO". I did not click "INSERT". The page that opened after I clicked "Go" indicated that the process had completed successfully.

When making the file changes called for by the MOD, I inadvertently screwed up, and so the ACP did not display properly. With the help of a friend, I was able to repair my mistake, and the ACP now displays properly (except for the blank spaces). However, I made the mistake BEFORE performing the INSERT and I made the repair AFTER performing the INSERT. Based on your comments, including ...
The SQL insert is just to "seed" the values. With nothing in the database, registration won't work. When it's properly set up, you just use the admin control panel to make the changes.


which leads me to wonder if perhaps I need to redo the SQL INSERT. Does that make sense? Is there any danger in performing the SQL INSERT a second time?

Thanks!
Post Reply

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