[RC2] Anti Bot Question

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
antisa33
Registered User
Posts: 21
Joined: Thu Jun 29, 2006 12:07 pm

Re: [RC2] Anti Bot Question

Post by antisa33 » Sat Aug 18, 2007 11:09 am

I have setup this great mod thanks a lot all is ok.
I just have a little problem : i need my users to subscribe on the website without seeing the agreement.
They need to see the subscription form when they clic on "register on the forum".
How can i do ?
Thanks again for all

ras123
Registered User
Posts: 79
Joined: Sun Dec 14, 2003 12:10 pm

Warning: mysql_free_result(): supplied argument is not a val

Post by ras123 » Mon Aug 20, 2007 6:29 pm

Hi,
I got the following warning message, after installing Anti bot question mode., the complete message is given below,

Code: Select all

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in \db\mysql4.php on line 302

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in \db\mysql4.php on line 302 
I find the message originate somewhere from the ABQ_AskQuestion function in includes/abq_functions.php

Since it is only a warning, my site running (I use @ to suppress the warning), any help?

User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [RC2] Anti Bot Question

Post by IPB_Refugee » Mon Aug 20, 2007 6:45 pm

Ah,

you haven't read page 32 of this thread, right? ;)

http://www.phpbb.com/community/viewtopi ... 3#p2905813

Regards
Wolfgang

ras123
Registered User
Posts: 79
Joined: Sun Dec 14, 2003 12:10 pm

Re: [RC2] Anti Bot Question

Post by ras123 » Mon Aug 20, 2007 7:10 pm

IPB_Refugee wrote:Ah,

you haven't read page 32 of this thread, right? ;)

http://www.phpbb.com/community/viewtopi ... 3#p2905813

Regards
Wolfgang
No solution yet !!, You just suppress the warning...Why nobody can fix the problem?

dozza
Registered User
Posts: 16
Joined: Fri Jun 08, 2007 9:35 am

Which instance to 'REPLACE WITH' in admin/admin_users.php

Post by dozza » Tue Aug 21, 2007 12:36 pm

I'm in the middle of installing this MOD manually. I've done everything outlined in the anti-bot-question-mod_v_3_0_0.txt file up to the point where i'm modifying admin/admin_users.php

Everything fine until...

Code: Select all

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$template->assign_vars(array(

# 
#-----[ BEFORE, ADD ]------------------------------------------------ 
# 
		// Anti Bot Question Mod - Start
		if ($abq_config['abq_register'])
		{
			$abq_email_variable_name = $abq_config['email_variable_name'];
		}
		else
		{
			$abq_email_variable_name = 'email';
		}
		// Anti Bot Question Mod - End
Trouble is my text editor can find 3 instances of

Code: Select all

$template->assign_vars(array(
in this file!

Which instance should I add the new code before, or does FIND imply all instances? Apologies if this has already been addressed previously but I could find no specific reference to it.

Many thanks for your help in advance...

User avatar
aunrea
Registered User
Posts: 4
Joined: Tue Dec 14, 2004 3:05 am
Contact:

Re: [RC2] Anti Bot Question

Post by aunrea » Sat Aug 25, 2007 12:31 am

I had this problem:

Code: Select all

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in \db\mysql4.php on line 302

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in \db\mysql4.php on line 302
so I read this entire thread (a complete waste of my time) and found no solution. So I found the solution myself. When you installed your phpbb if you selected mysql 4/5 you will get that error. You just need to change to mysql 3. To do this go into your config file and remove the 4 after mysql like:

Code: Select all

$dbms = 'mysql';
You should not get that error message anymore.

dozza
Registered User
Posts: 16
Joined: Fri Jun 08, 2007 9:35 am

Re: Which instance to 'REPLACE WITH' in admin/admin_users.php

Post by dozza » Sun Aug 26, 2007 8:22 pm

dozza wrote:Which instance should I add the new code before, or does FIND imply all instances?
I bit the bullet and went for the first instance and it proved correct! I seem to have installed and configured the MOD correctly and manually at first attempt, something this topic almost put me off doing. It was laborious but very rewarding. Not a single spammy posting since and 24 bogus registrations intercepted in a week.

ArryGUK
Registered User
Posts: 5
Joined: Tue Apr 11, 2006 10:03 pm

Re: [RC2] Anti Bot Question

Post by ArryGUK » Fri Sep 07, 2007 2:07 am

Hi,

I'm slowly reading through all 41 pages of this, however i was hoping someone could answer my query in the meantime whilst i take everything in.

I've followed the instructions, however when i goto load my board i get the following error: -

Code: Select all

Fatal error: Call to a member function on a non-object in /var/www/vhosts/mywebsite/httpdocs/phpBB2/includes/functions.php on line 349
Line 349 is in red, but i've pasted the code paragraph below: -

Code: Select all

// Anti Bot Question Mod - Start
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_abq.' . $phpEx);

	$abq_config = array();
	$sql = "SELECT *
		FROM " . ANTI_BOT_QUEST_CONFIG_TABLE;
	[color=#FF0000]if( !($result = $db->sql_query($sql)) )[/color]
	{
		message_die(CRITICAL_ERROR, "Could not query anti bot question mod config information", "", __LINE__, __FILE__, $sql);
	}

	while ( $row = $db->sql_fetchrow($result) )
	{
		$abq_config[$row['config_name']] = $row['config_value'];
	}
	// Anti Bot Question Mod - End
I've installed a few mods before and not really had any trouble. The Mysql query went successfully, however i can't get my board to work. Interestingly enough if i upload the old functions.php the board works.

However that isnt a satisfactory mod is it!

Any help would be appreciated :)

ArryGUK
Registered User
Posts: 5
Joined: Tue Apr 11, 2006 10:03 pm

Re: [RC2] Anti Bot Question

Post by ArryGUK » Fri Sep 07, 2007 3:14 am

Ok so it didnt come out in Red, however it is the same problem as 2 people on page 38 have had.

Thanks in advance (hopefully :) )

rcrboss
Registered User
Posts: 12
Joined: Fri Jul 06, 2007 8:44 am
Location: UK

Re: [RC2] Anti Bot Question

Post by rcrboss » Fri Sep 07, 2007 2:35 pm

Hi,

Running phpBB2.0.22.

Installed this mod and checked it over 5 times now.

If i turn off the visual in phpBB and turn on the anti-bot, when i go to register and click on either
I Agree to these terms and am over or exactly 13 years of age or
I Agree to these terms and am under 13 years of age it just refreshes the screen and returns the same registration screen without the template i.e white screen with text. Then the only way to get back is to use the back button the browser.

Then when you turn off the anti-bot and turn on the visual registration nothing happens. No registrations can then happen. Even clearing cookies and cache does not help.

Any ideas of where the problem is??. This is using the standard sub-silver.

EDIT. All working ok, conflict with another mod. Had to run it under php debugger to sort it though.

RCRBoss

StoneFalconProductions
Registered User
Posts: 15
Joined: Wed Oct 25, 2006 8:36 pm

Re: [RC2] Anti Bot Question

Post by StoneFalconProductions » Fri Sep 07, 2007 9:39 pm

I installed everything fine here and the Question field appears properly in the registration form. HOWEVER - if you leave the answer field blank, the registration still goes through! Spambots are still registering! Did I do something wrong?

ArryGUK
Registered User
Posts: 5
Joined: Tue Apr 11, 2006 10:03 pm

Re: [RC2] Anti Bot Question

Post by ArryGUK » Sun Sep 09, 2007 6:11 pm

Does anyone have any suggestions i can try to resolve my query above? :cry:

gsnow
Registered User
Posts: 1
Joined: Mon Sep 10, 2007 12:43 pm

Re: [RC2] Anti Bot Question

Post by gsnow » Mon Sep 10, 2007 12:48 pm

I am using EasyMod and phpBB 2.0.22
When I try to process this mod, I get the following error message:

-----------------------
Critical Error

FIND FAILED: In file [includes/usercp_register.php] could not find:

if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
}

MOD script line #1413 :

-----------------------

Any help?

Blizz_xx
Registered User
Posts: 17
Joined: Mon Jul 23, 2007 7:47 pm

Re: [RC2] Anti Bot Question

Post by Blizz_xx » Sat Sep 15, 2007 8:56 pm

I installed this code manually, and now I'm trying to get it to show up on my forum. When I attempt to turn it on in the configuration section, it says it's now been changed, but when I return to the configuration page nothing has been changed, and the questions do not show up when posting or registering. Anyone know whats wrong?

georgelb
Registered User
Posts: 15
Joined: Wed Dec 04, 2002 9:27 am
Location: DFW, TX
Contact:

Re: [RC2] Anti Bot Question

Post by georgelb » Mon Sep 17, 2007 8:04 am

I installed this mod on a forum and experienced the same issues many many people in this thread have...and here are the fixes that worked for me.
*Disclaimer...these are the fixes that worked on my board....please back up your files before attempting on yours.

Sorry, but this e-mail address is invalid.
This one was quite annoying, but after tracking the variable through the different steps I decided it was being passed to the functions_validate.php file as an empty variable. To fix this I made the change below.

Code: Select all


# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_avatar.php

# 
#-----[ FIND ]------------------------------------------------ 
# 

	if ($abq_config['abq_register'])
	{
		$params[] = $abq_config['email_variable_name'];
		$$abq_config['email_variable_name'] = $email;

# 
#-----[ REPLACE WITH ]----------------------------------------
# 

	if ($abq_config['abq_register'])
	{
		$params[] = $abq_config['email_variable_name'];
		$abq_config['email_variable_name'] = $email;









Fatal error: Call to a member function on a non-object in /*******/forum/includes/functions.php on line 348
This one was much easier...just need to help it out a little and tell it what $db is.

Code: Select all

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/functions.php

# 
#-----[ FIND ]------------------------------------------------ 
# 

	$abq_config = array();
	$sql = "SELECT *
		FROM " . ANTI_BOT_QUEST_CONFIG_TABLE;

# 
#-----[ REPLACE WITH ]----------------------------------------
# 

	global $db;
	$abq_config = array();
	$sql = "SELECT *
		FROM " . ANTI_BOT_QUEST_CONFIG_TABLE;





Hopefully these fixes help for some of you..

Post Reply

Return to “[2.0.x] MODs in Development”