#############################################

/**
 * This file is part of Simple Captcha plugin for MyBB.
 * Copyright (C) 2010-2013 Lukasz Tkacz <lukasamd@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */ 

#############################################





INSTALLATION:


1. Upload all files from "root" directory to your mybb installation on the server

2. Go to ACP -> Plugins and activate "Simple Captcha" plugin

3. Turn off option "CAPTCHA Images for Registration & Posting" in ACP -> Configuration -> General Configuration  

3. Optionally, edit files for full functionality
   


*******************************************************
*******************************************************
FILE:   member.php
*******************************************************


FIND (line ~1221):
-------------------------------------------------------
if(!empty($errors))


ADD BEFORE:
-------------------------------------------------------
// START - Simple Captcha MOD
if (isset($plugins->objects['simpleCaptcha']) && is_object($plugins->objects['simpleCaptcha']))
{
  $plugins->objects['simpleCaptcha']->checkLogin(); 
}
// END - Simple Captcha MOD  
    
    
FIND (line ~1348):
-------------------------------------------------------
$username = "";
$password = "";
	
	
ADD BEFORE:
-------------------------------------------------------
// START - Simple Captcha MOD
if (isset($plugins->objects['simpleCaptcha']) && is_object($plugins->objects['simpleCaptcha']))
{
  $plugins->objects['simpleCaptcha']->generateLogin(); 
}
// END - Simple Captcha MOD    
  

  
  
*******************************************************  
*******************************************************
FILE:   newreply.php
*******************************************************


FIND (line ~469):
-------------------------------------------------------
// One or more errors returned, fetch error list and throw to newreply page
  
  
ADD BEFORE:
-------------------------------------------------------
// START - Simple Captcha MOD
if (isset($plugins->objects['simpleCaptcha']) && is_object($plugins->objects['simpleCaptcha']))
{
  $plugins->objects['simpleCaptcha']->checkNewPost(); 
}
// END - Simple Captcha MOD
    
  
FIND (line ~1100):
-------------------------------------------------------
if($mybb->settings['threadreview'] != 0)

  
ADD BEFORE:
-------------------------------------------------------
// START - Simple Captcha MOD
if (isset($plugins->objects['simpleCaptcha']) && is_object($plugins->objects['simpleCaptcha']))
{
  $plugins->objects['simpleCaptcha']->generateNewPost(); 
}
// END - Simple Captcha MOD
  
  
  
  
*******************************************************  
*******************************************************
FILE:   newthread.php
*******************************************************


FIND (line ~355):
-------------------------------------------------------
// One or more errors returned, fetch error list and throw to newthread page
  
  
ADD BEFORE:
-------------------------------------------------------
// START - Simple Captcha MOD
if (isset($plugins->objects['simpleCaptcha']) && is_object($plugins->objects['simpleCaptcha']))
{
  $plugins->objects['simpleCaptcha']->checkNewPost(); 
}
// END - Simple Captcha MOD
  
  
FIND (line ~900):
-------------------------------------------------------
if($forumpermissions['canpostpolls'] != 0)


ADD BEFORE:
-------------------------------------------------------
// START - Simple Captcha MOD
if (isset($plugins->objects['simpleCaptcha']) && is_object($plugins->objects['simpleCaptcha']))
{
  $plugins->objects['simpleCaptcha']->generateNewPost(); 
}
// END - Simple Captcha MOD




*******************************************************
*******************************************************
FILE:   showthread.php
*******************************************************


FIND (line ~1100):
-------------------------------------------------------
if($mybb->user['signature'])


ADD BEFORE:
-------------------------------------------------------	
// START - Simple Captcha MOD
if (isset($plugins->objects['simpleCaptcha']) && is_object($plugins->objects['simpleCaptcha']))
{
  $plugins->objects['simpleCaptcha']->generateNewPost(); 
}
// END - Simple Captcha MOD 
  
  
  
