Viewing: Web > MiniBB

MiniBB and Captcha

I've been playing around with MiniBB a bit.  I tried other forums and they required a ton of setup just to get them working properly.  Then, I had to sign in and create some startup content.  I would then have to sign out and create a new account to create more startup content from a different user.

MiniBB is just so simple, it's wonderful.  It has very few features, which makes it run super fast.  It doesn't need a lot of setup, you are up and running in minutes.  It is so simple and obvious that people go to the site and just start posting.  With other forums, I had to explain to my test users how to do everything.  Immediately they took to MiniBB, posting like crazy, laughing out loud, having a blast in the un-restricted world of anonymous web posting.  The advantage here was ease of use, and ability to change users really quickly.  It was also the biggest vulnerability, I soon realized.

Not only can human beings post very easily, but so can bots and spammers.  Within days of being indexed by google, I was inundated with spam.  It is black hat seo at it's worst.  Webmasters want more sites linking to them to boost referral traffic, and having more sites pointing in may result in higher search rankings.  So they hire a spam company to post ads for their site on all forums that they can find.  These companies don't even bother to find the forums themselves, they break search engine terms of service and query google to find all active forums out there.  LAME!!!

Adding Captcha

At first, I attempted various solutions that would still allow anonymous posting but filter out spam.  This was harder than I expected, the spammers constantly change IPs and posts.  I realized captcha was the way to go.  Rather than doing the captcha for each post, I restricted posting topics to logged in users and put the captcha in the registration form.  This removed my favorite feature of the forum.  Unfortunately, spam has forced us to do things that take away from the user's experience.

RECAPTCHA

Recaptcha is a captcha service that takes care of the image generation and updates the service to stay one step ahead of spammers. And it is free.  Download their file, and upload it to your miniBB directory.  The first block of code generates the image.  This needs to go into the registration form.  You can insert it anywhere inside the form, which is located in templates/user_dataform.html.  Since this is a html file, you can't run the php commands from there.  So make a new variable as they did for the other fields, like {$captcha_var}.  Then, go into lang/eng.php and put the code into that file.  You will have to change the code slightly, rather than echoing the html, it will have to assign it to your new $captcha_var variable.  Then we have to check to make sure they entered the correct info.  Insert the checking code from recaptcha into bb_func_regusr.php, I put it in around line 30 as another condition, so that I could define a custom warning message.  This way, users will understand that they failed the captcha and know that their other information was correct, avoiding frustration.

This method requires some knowledge of php, and I was not really descriptive about how I did it.  Most of my time spent doing this was in finding the correct files to edit, I really wanted a resource just to tell which file had which code in it.  It is a quick way to add decent spam protection to this awesome forum, we'll have to wait and see how effective it was.