[ABD] Prime Anti-bot - Anti-spambot Text Verification

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
rainbowz
Registered User
Posts: 51
Joined: Sat Dec 01, 2001 12:24 am
Location: Depths of Hell

Re: [RC1] Prime CAPTCHA (1.0.0) - Text-based Human Verification

Post by rainbowz »

I think I have spotted a small error in the xml file.

Open: includes/ucp/ucp_register.php

>>> in the second "FIND" instructions; <<<

Find

Code: Select all

			$error = preg_replace
Add after

Code: Select all

//-- mod: Prime CAPTCHA -----------------------------------------------------//
			if ($prime_captcha->error)
			{
				$error[] = $user->lang[$prime_captcha->error];
			}
//-- end: Prime CAPTCHA -----------------------------------------------------//
The Find should actually read:

Code: Select all

$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
Otherwise, you get an error.
Once I moved this bit of code to the end of that section, it worked like a charm.

Thanks!

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime CAPTCHA (1.0.0) - Text-based Human Verification

Post by primehalo »

This snippet is from another MOD's installation instructions, but it is still relevant for your issue:
Image
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime CAPTCHA (1.0.0) - Text-based Human Verification

Post by primehalo »

rufus_ wrote:I have installed all your code for subsilver2 AND prosilver , totally
and I get No human verification key exists, which indicates a robotic submission
Are the form fields showing up? Did you clear the board's cache? Did you refresh your template from the ACP?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

rufus_
Registered User
Posts: 65
Joined: Sun Dec 16, 2007 11:01 am

Re: [RC1] Prime CAPTCHA (1.0.0) - Text-based Human Verification

Post by rufus_ »

no the fields are not in the registration form

cache and all is cleared

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime CAPTCHA (1.0.0) - Text-based Human Verification

Post by primehalo »

rufus_ wrote:no the fields are not in the registration form

cache and all is cleared
If you are getting that message and the fields aren't showing up then the template portions must not have been installed correctly.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

rufus_
Registered User
Posts: 65
Joined: Sun Dec 16, 2007 11:01 am

Re: [RC1] Prime CAPTCHA (1.0.0) - Text-based Human Verification

Post by rufus_ »

for subsilver2 I must install what is written in installation instructions.xml AND templates/subsilver2.xml

or only what is wriiten in templates/subsilver2.xml ??

I have installed both

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime CAPTCHA (1.0.0) - Text-based Human Verification

Post by primehalo »

rufus_ wrote:for subsilver2 I must install what is written in installation instructions.xml AND templates/subsilver2.xml

or only what is wriiten in templates/subsilver2.xml ??

I have installed both
Yeah, you need to install both.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

rufus_
Registered User
Posts: 65
Joined: Sun Dec 16, 2007 11:01 am

Re: [RC1] Prime CAPTCHA (1.0.0) - Text-based Human Verification

Post by rufus_ »

i'll try again from zero

nonegiven
Registered User
Posts: 121
Joined: Tue Apr 24, 2007 4:42 am

Re: [RC1] Prime Anti-bot - Anti-spambot Text Verification

Post by nonegiven »

I had a major issue with this mod ... I have not yet looked at or tried the note above. See another topic, here. No idea what or where it was conflicting but it made posting or editing impossible and visibly screwed up the posting.php page. See other topic for error codes showing in includes.php.

I worked my way backwards and discovered that this was a conflict with Prime Captcha Version 1.0.0a, the "Text-based Human Verification".

In posting.php, it requires this line to be subtituted;

Code: Select all

//-- mod: Prime CAPTCHA -----------------------------------------------------//
$s_hidden_fields .= build_hidden_fields($prime_captcha->fields);
//-- end: Prime CAPTCHA -----------------------------------------------------//
After;

Code: Select all

$s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . request_var('draft_loaded', $draft_id) . '" />' : '';
Doing so reliably causes the problem and taking it out, removes the problem. I have no idea why and must just leave it.

The funny thing is the MOD still seems to work on registration with these lines removed ...

I am not exactly comfortable at leaving broken code in page and so any opinions/fixes/workarounds are welcome.

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Anti-bot - Anti-spambot Text Verification

Post by primehalo »

nonegiven wrote:I had a major issue with this mod ... I have not yet looked at or tried the note above. See another topic, here. No idea what or where it was conflicting but it made posting or editing impossible and visibly screwed up the posting.php page. See other topic for error codes showing in includes.php.

I worked my way backwards and discovered that this was a conflict with Prime Captcha Version 1.0.0a, the "Text-based Human Verification".

In posting.php, it requires this line to be subtituted;

Code: Select all

//-- mod: Prime CAPTCHA -----------------------------------------------------//
$s_hidden_fields .= build_hidden_fields($prime_captcha->fields);
//-- end: Prime CAPTCHA -----------------------------------------------------//
After;

Code: Select all

$s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . request_var('draft_loaded', $draft_id) . '" />' : '';
Doing so reliably causes the problem and taking it out, removes the problem. I have no idea why and must just leave it.

The funny thing is the MOD still seems to work on registration with these lines removed ...

I am not exactly comfortable at leaving broken code in page and so any opinions/fixes/workarounds are welcome.
That looks like outdated code. I believe the latest version uses this code:

Code: Select all

//-- mod: Prime Anti-bot ----------------------------------------------------//
$s_hidden_fields .= isset($prime_captcha->fields) ? build_hidden_fields($prime_captcha->fields) : '';
//-- end: Prime Anti-bot ----------------------------------------------------//   
I'd recommend downloading the latest version. Oh, and since that code is in posting.php, it's for guest postings and wouldn't affect registration.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Malshadow
Registered User
Posts: 4
Joined: Fri May 09, 2008 12:39 am

Re: [RC1] Prime Anti-bot - Anti-spambot Text Verification

Post by Malshadow »

I had a bit of trouble installing this. It is only one file that keeps messing the whole mod installation up, but it doesn't give the option to choose the things it tells you to enable at the end of the installation guide.

Here is the error in full:

[phpBB Debug] PHP Notice: in file /adm/index.php on line 344: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'prime_captcha_make_options' was given
[phpBB Debug] PHP Notice: in file /adm/index.php on line 344: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'prime_captcha_make_options' was given
[phpBB Debug] PHP Notice: in file /adm/index.php on line 149: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 151: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)

Anyone care to elaborate on the problem?

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Anti-bot - Anti-spambot Text Verification

Post by primehalo »

I don't know why that would be happening. Are you sure the "prime_captcha.php" was copied to the correct location?
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Malshadow
Registered User
Posts: 4
Joined: Fri May 09, 2008 12:39 am

Re: [RC1] Prime Anti-bot - Anti-spambot Text Verification

Post by Malshadow »

I'm pretty sure.. possibly because I accidentally copied it to a wrong location and the right location?

User avatar
primehalo
Former Team Member
Posts: 2855
Joined: Fri May 06, 2005 5:58 pm
Location: Redding, CA
Contact:

Re: [RC1] Prime Anti-bot - Anti-spambot Text Verification

Post by primehalo »

Malshadow wrote:I'm pretty sure.. possibly because I accidentally copied it to a wrong location and the right location?
No, that shouldn't matter.
Ken F. Innes IV
My Extensions | My MODs | My Topics | My Site: Absolute Anime
Experience the wonder of Japanese Animation!

Malshadow
Registered User
Posts: 4
Joined: Fri May 09, 2008 12:39 am

Re: [RC1] Prime Anti-bot - Anti-spambot Text Verification

Post by Malshadow »

Okay, let me try re-doing the whole thing here then.. I'll post with results of that. If it helps it's acp_board that's causing the problem, when I restore the backup file to it it's fine but it, of course, doesn't include the enabling options.

Edit: Alright, I traced one problem down.. I accidentally put the prime_captcha.php that is supposed to be the language one under includes. Though I found that little incident by noticing the 10,000kb difference, it still didn't help. I'll keep trying, so I'll post some more if I get it working.

Edit2: Great, I got it working. Realized that not only did I make the above mistake I forgot a step in the installation of acp_board. Thanks for pointing out prime_captcha.php so I would check it out, I probably would have given up had I had not took at look at that.

Locked

Return to “[3.0.x] Abandoned MODs”