MyBB Community Forums

Full Version: Captcha before posting new thread/post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all,

I have maybe a weird question but is there anyway to force people to input a captcha before posting?

I want to make it that certain user groups below 10 post need to input a captcha before they can post a new thread/new reply to a thread.
Open the following files;
./showthread.php line 1052
./newreply.php line 438 and 1030
./newthread.php line 370 and 881;

Search for;
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])

and Change it into;

if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && (!$mybb->user['uid'] || $mybb->user['postnum'] < 10))

Change the 10 the the number of posts you want to check against.
Works perfectly thank you yaldaram, only wish there was a plugin for this.

Continue on the question then, if thats even allowed. Anybody able to tell me how this could be changed into a small plugin? Would be a nice little feature and would atleast mean each update i dont have to change file's again.
possible like this in question answer too.....?? so we can add question answer instead of captcha.....?
Hello I want to add here also www.smmdesk.com please help me

Hello help me please i can not find this code

if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])

Where i have to check??
Why not use the patches plugin Anori?

That can be switched off on upgrade then switched back on again setting all your core edits back as they were pre upgrade.
Thread was necro'ed it did work and all but stopforumspam simply is the solution in the end that worked best for me. Spam thingie is no option since most people post a huge amount of links in their first posts. And as i read it those things dont mix well.

Honestly im still waiting for the plugin that does:

- Disables certain profile fields below a certain number of posts
- If its the first post check post for know spam things like multitude of urls etc. words etc.
- If its the first post Check IP / email / username against stopforumspam database.

If any of these would be positive put post in approve by moderators thingie. And also have a button there to bann/IP bann etc.
This also would be nice to have a approve x amount of post before poster is in the clear. And that a poster cant make more then x amount of post to not glog up the approve thingie.

That for me would be the best spam prevention plugin. Though i dont think it would be ever created.

Quote:Hello I want to add here also http://www.smmdesk.com please help me
Hello help me please i can not find this code

if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])

Where i have to check??

Follow yaldarams instructions. And like leefish said:

If you wish to do this use:

http://mods.mybb.com/view/patches + http://mods.mybb.com/view/pluginlibrary

Makes this easier to do and keep it working with new MyBB updates.
Do i need to enable captcha option in setting to enable captcha in newthread, showthread, newreply ...??