Code: Select all
// session id check
if ($sid == '' || $sid != $userdata['session_id'])....
Code: Select all
$sid = (isset($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : 0;
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'] . '" />';
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'] . '" />';
Code: Select all
$testvar = "testing\n1\n2\n3\n!!!";
echo 'the value of $testvar is ';
echo "$testvar";
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";
Code: Select all
the value of $testvar is testing\n1\n2\n3\n!!!
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>
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');
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?
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.
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.