Rusnak PHP Scripts Support Forums

Full Version: Add a CAPTCHA to your MyBB-MF 2.0.0 forum create page.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi

I said I'd do it and here it is! A captcha for your create page!.

I'll update it in a while with some extra stuff.

INSTALLATION

1) Upload the attached files to /create/ajofcaptcha/

2) Open /create/index.php

3) find
PHP Code:
<input name='forumname' type='text' id='forumname'>&nbsp;&nbsp;<span class='style10'>The displayed name for your forums that appears on all pages of your forums.</span

after add

PHP Code:
<br><br>
<
p align='left'><span class='style6'><u>Captcha</u></span><br><br>
<
img src='ajofcaptcha/captchagen.php'><br>
<
input type='text' id='captcha' name='captcha'>&nbsp;&nbsp;<span class='style10'>Please enter the text as it appears in the image above. (NoteEntry is case sensitive)</span

4) open mkforum.php

5) find

PHP Code:
$display $_POST['forumname']; //Forum Name as it appears on forums 

after add

PHP Code:
$capinput $_POST['captcha']; // Ajof Captcha User input 

Now find

PHP Code:
//Check that the passwords are the right length, otherwise give up

$pwlen strlen($pass1);



if(
$pwlen 6) {

die(
"The password you entered is too short!  It needs to be at least six characters long.  Please go back and try again.");



after add

PHP Code:
// ***************************************************************************​********

//Do Ajof Captcha Stuff
session_start();


$captrue $_SESSION['ce'];

$capinput md5($capinput);

if(
$capinput != $captrue)
{
die(
"Sorry the captcha text you entered was incorrect. Please note that entry is case sensitive.");
}
session_destroy(); 

6) There is no 6, your done!

Any problems then reply here! Smile
This looks like it will work nice. You have a live demo online? Smile

BMR777
http://ardougne.net/boards/create/

^^ Thats almost exactly as the mod above but the index.php's layout with the image at the bottom isn't as clean as in the mod above, I just havent got round to updateing that one.

I reckon something like this is needed as standard as bots could automatically create forums atm so it is a security issue
Your demo is kind of hard to read, especially to someone like me (I'm partially colorblind). You might want to change that a little bit. It has to be good so automators can't read it, but make sure normal people can! Wink Or, have a variety of different backgrounds, randomly selected, and a little "Load a different CAPTCHA" link in case one is illegible to the current user.
Good day AJOF.
We will have CAPTCHA in new version.

Thanks.
lupus6x9 Wrote:Your demo is kind of hard to read, especially to someone like me (I'm partially colorblind). You might want to change that a little bit. It has to be good so automators can't read it, but make sure normal people can! Wink Or, have a variety of different backgrounds, randomly selected, and a little "Load a different CAPTCHA" link in case one is illegible to the current user.

Aye getting the balance is hard. I was looking into the reload link but as I am unknowledged in javascript and google wasn't showing me what I wanted I left it for the mo.

But thanks for your critique lupus! Its very much appreciated!
Ajof Wrote:
lupus6x9 Wrote:Your demo is kind of hard to read, especially to someone like me (I'm partially colorblind). You might want to change that a little bit. It has to be good so automators can't read it, but make sure normal people can! Wink Or, have a variety of different backgrounds, randomly selected, and a little "Load a different CAPTCHA" link in case one is illegible to the current user.

Aye getting the balance is hard. I was looking into the reload link but as I am unknowledged in javascript and google wasn't showing me what I wanted I left it for the mo.

But thanks for your critique lupus! Its very much appreciated!

It's very good, and difficult for a computer (obviously). As for googling, try searching "AJAX" instead of JavaScript, since captchas are handled at the server end. Smile
Cheers, I may just use the mybb capture file instead of mine in future, don't know why I didn't think of it before!
Fatal error: Call to undefined function imagettftext() in /home/user/public_html/mybb/create/ajofcaptcha/captchagen.php on line 54

Sad Sad Sad ?
I didn't notice this thread before.. But this would prevent spams =D
Pages: 1 2
Reference URL's