Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/integrate-recaptcha-plugin'
- Loading branch information
Showing
54 changed files
with
3,291 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Install/Uninstall/Upgrade instruction for the Geeklog reCAPTCHA plugin | ||
|
||
* Repository: https://github.com/mystralkk/recaptcha | ||
* Version: 1.2.0 | ||
* License: GPL v2 or later | ||
|
||
## What is reCAPTCHA? | ||
|
||
ReCAPTCHA(R) is a free anti-bot service providing powerful CAPTCHA(Completely Automated Public Turing test to tell Computers and Humans Apart). This plugin makes it easy to use reCAPTCHA with Geeklog. | ||
|
||
## System Requirements | ||
|
||
* Geeklog-2.2.0+ | ||
|
||
## INSTALL | ||
|
||
In the following descriptions | ||
|
||
* <geeklog_dir> is the directory where the system config.php file resides | ||
* <admin> is the directory where the administration files reside (usually, under <public_html>) | ||
|
||
1. Uncompress the recaptcha plugin archive while in the <geeklog_dir>/plugins directory. The archive will create a directory called recaptcha in the plugins directory. | ||
2. Create the admin directory. Under your <admin>/plugins/ directory, create a directory called recaptcha. | ||
3. Change to your <geeklog_dir>/plugins/recaptcha/ directory. Copy the files in the admin directory to the <admin>/plugins/recaptcha/ directory your created in step 2. | ||
4. Log in to your Geeklog as a root user, go to the plugin editor and click on reCAPTCHA. If the install failed, examine Geeklog system errorlog for possible problems. | ||
5. **Important**: Set up API keys. Go to the Configuration and enter reCAPTCHA API Public Key and Private Key that you can get at [https://www.google.com/recaptcha/admin/create](https://www.google.com/recaptcha/admin/create). **It is not until you set the API keys that you can use reCAPTCHA service.** | ||
|
||
## UNINSTALL | ||
|
||
1. Log in to your Geeklog web site as a root user, go to the plugin editor and click on reCAPTCHA. If the unstall failed, examine Geeklog system errorlog for possible problems. | ||
2. Delete the two plugin directories created in the install process: <geeklog-dir>/plugins/recaptcha/ and <admin>/plugins/recaptcha/. | ||
|
||
## UPGRADE | ||
|
||
1. Log in to your Geeklog web site as a root user, go to the plugin editor and disable the reCAPTCHA plugin. | ||
2. Uncompress the recaptcha plugin archive and upload the resulting files as you did when you installed the plugin. | ||
3. Go to the plugin editor and Enable the reCAPTCHA plugin. Then, upgrade the plugin. | ||
|
||
## REVISION HISTORY | ||
|
||
| Version | Date(YYYY-MM-DD) |Description | | ||
|:-------:|-----------------:|------------------------------------------------------------------------------------| | ||
| 1.2.0 | 2017-12-02 |* Added support for Invisible reCAPTCHA. | | ||
| 1.1.6 | 2017-11-28 |* Added support for Login Form. | | ||
| | |* Added support for Forget Password Form. | | ||
| | |* Added support for the demo mode introduced in Geeklog 2.2.0. | | ||
| 1.1.5 | 2017-04-12 |* Fixed a bug where reCAPTCHA failed to check for input when $_RECAPTCHA_CONF['logging'] is set to off. | | ||
| 1.1.4 | 2017-01-18 |* Small bug fix. | | ||
| 1.1.3 | 2016-08-12 |* Replaced COM_siteHeader and COM_siteFooter with COM_createHTMLDocument. | | ||
| 1.1.2 | 2016-02-20 |* Modified to use reCAPTCHA v1.1.2 library. | | ||
| 1.1.0 | 2015-07-03 |* Upgraded to Google reCAPTCHA v2. | | ||
| | |* Added an error code to a log file(logs/recaptch.log) entry. Patch provided by Tom.| | ||
| 1.0.1 | 2014-01-26 |* Added a <div> tag to enclose the reCAPTCHA code. Patch provided by Tom. | | ||
| | |* Changed to write log entries into "logs/recaptch.log". Patch provided by Tom. | | ||
| 1.0.0 | 2014-01-24 |* Initial release | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
|
||
// +---------------------------------------------------------------------------+ | ||
// | reCAPTCHA Plugin for Geeklog - The Ultimate Weblog | | ||
// +---------------------------------------------------------------------------+ | ||
// | geeklog/plugins/recaptcha/autoinstall.php | | ||
// +---------------------------------------------------------------------------+ | ||
// | Copyright (C) 2014-2017 mystral-kk - geeklog AT mystral-kk DOT net | | ||
// | | | ||
// | Based on the CAPTCHA Plugin by Ben | | ||
// | - ben AT geeklog DOT fr | | ||
// | Based on the original CAPTCHA Plugin by Mark R. Evans | | ||
// | - mark AT glfusion DOT org | | ||
// | Constructed with the Universal Plugin | | ||
// +---------------------------------------------------------------------------+ | ||
// | | | ||
// | This program is free software; you can redistribute it and/or | | ||
// | modify it under the terms of the GNU General Public License | | ||
// | as published by the Free Software Foundation; either version 2 | | ||
// | 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 General Public License for more details. | | ||
// | | | ||
// | You should have received a copy of the GNU General Public License | | ||
// | along with this program; if not, write to the Free Software Foundation, | | ||
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | | ||
// | | | ||
// +---------------------------------------------------------------------------+ | ||
|
||
if (stripos($_SERVER['PHP_SELF'], basename(__FILE__)) !== false) { | ||
die('This file cannot be used on its own!'); | ||
} | ||
|
||
/** | ||
* Plugin autoinstall function | ||
* | ||
* @param string $pi_name Plugin name | ||
* @return array Plugin information | ||
*/ | ||
function plugin_autoinstall_recaptcha($pi_name) | ||
{ | ||
global $_CONF, $_RECAPTCHA_CONF; | ||
|
||
// IF demo mode (since GL 2.2.0) is in effect, return no valid information | ||
if (isset($_CONF['demo_mode']) && $_CONF['demo_mode']) { | ||
return array(); | ||
} | ||
|
||
require_once __DIR__ . '/config.php'; | ||
|
||
return array( | ||
'info' => array( | ||
'pi_name' => 'recaptcha', | ||
'pi_display_name' => 'reCAPTCHA', | ||
'pi_version' => $_RECAPTCHA_CONF['pi_version'], | ||
'pi_gl_version' => $_RECAPTCHA_CONF['gl_version'], | ||
'pi_homepage' => $_RECAPTCHA_CONF['pi_url'], | ||
), | ||
'groups' => $_RECAPTCHA_CONF['GROUPS'], | ||
'features' => $_RECAPTCHA_CONF['FEATURES'], | ||
'mappings' => $_RECAPTCHA_CONF['MAPPINGS'], | ||
'tables' => array(), | ||
); | ||
} | ||
|
||
/** | ||
* Load plugin configuration from database | ||
* | ||
* @param string $pi_name Plugin name | ||
* @return bool true on success, otherwise false | ||
* @see plugin_initconfig_recaptcha | ||
*/ | ||
function plugin_load_configuration_recaptcha($pi_name) | ||
{ | ||
require_once __DIR__ . '/install_defaults.php'; | ||
|
||
return plugin_initconfig_recaptcha(); | ||
} | ||
|
||
/** | ||
* Checks if the plugin is compatible with this Geeklog version | ||
* | ||
* @param string $pi_name Plugin name | ||
* @return bool true: plugin compatible; false: not compatible | ||
*/ | ||
function plugin_compatible_with_this_version_recaptcha($pi_name) | ||
{ | ||
global $_RECAPTCHA_CONF; | ||
|
||
require_once __DIR__ . '/config.php'; | ||
|
||
$geeklogVersion = preg_replace('/[^0-9.]/', '', VERSION); | ||
|
||
return version_compare(PHP_VERSION, '5.3.0', '>=') && | ||
version_compare($geeklogVersion, $_RECAPTCHA_CONF['gl_version'], '>='); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
// +---------------------------------------------------------------------------+ | ||
// | reCAPTCHA Plugin for Geeklog - The Ultimate Weblog | | ||
// +---------------------------------------------------------------------------+ | ||
// | geeklog/plugins/recaptcha/config.php | | ||
// +---------------------------------------------------------------------------+ | ||
// | Copyright (C) 2014-2017 mystral-kk - geeklog AT mystral-kk DOT net | | ||
// | | | ||
// | Based on the CAPTCHA Plugin by Ben | | ||
// | - ben AT geeklog DOT fr | | ||
// | Based on the original CAPTCHA Plugin by Mark R. Evans | | ||
// | - mark AT glfusion DOT org | | ||
// | Constructed with the Universal Plugin | | ||
// +---------------------------------------------------------------------------+ | ||
// | | | ||
// | This program is free software; you can redistribute it and/or | | ||
// | modify it under the terms of the GNU General Public License | | ||
// | as published by the Free Software Foundation; either version 2 | | ||
// | 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 General Public License for more details. | | ||
// | | | ||
// | You should have received a copy of the GNU General Public License | | ||
// | along with this program; if not, write to the Free Software Foundation, | | ||
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | | ||
// | | | ||
// +---------------------------------------------------------------------------+ | ||
|
||
if (stripos($_SERVER['PHP_SELF'], basename(__FILE__)) !== false) { | ||
die('This file cannot be used on its own!'); | ||
} | ||
|
||
$_RECAPTCHA_CONF = array(); | ||
|
||
// Plugin info | ||
$_RECAPTCHA_CONF['pi_version'] = '1.2.0'; // Plugin Version | ||
$_RECAPTCHA_CONF['gl_version'] = '2.2.0'; // GL Version plugin for | ||
$_RECAPTCHA_CONF['pi_url'] = 'https://github.com/Geeklog-Plugins/recaptcha'; // Plugin Homepage | ||
$_RECAPTCHA_CONF['GROUPS'] = array( | ||
'reCAPTCHA Admin' => 'Users in this group can administer the ReCAPTCHA plugin', | ||
); | ||
$_RECAPTCHA_CONF['FEATURES'] = array( | ||
'recaptcha.edit' => 'Access to reCAPTCHA editor', | ||
); | ||
$_RECAPTCHA_CONF['MAPPINGS'] = array( | ||
'recaptcha.edit' => array('reCAPTCHA Admin'), | ||
); | ||
|
||
// Items the reCAPTCHA plugin supports | ||
$_RECAPTCHA_CONF['supported_items'] = array( | ||
'comment', 'story', 'registration', 'loginform', 'getpassword', 'contact', | ||
'emailstory', 'forum', 'mediagallery', 'rating', 'links', 'calendar', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
// +---------------------------------------------------------------------------+ | ||
// | reCAPTCHA Plugin for Geeklog - The Ultimate Weblog | | ||
// +---------------------------------------------------------------------------+ | ||
// | geeklog/plugins/recaptcha/autoinstall.php | | ||
// +---------------------------------------------------------------------------+ | ||
// | Copyright (C) 2014-2017 mystral-kk - geeklog AT mystral-kk DOT net | | ||
// | | | ||
// | Based on the CAPTCHA Plugin by Ben | | ||
// | - ben AT geeklog DOT fr | | ||
// | Based on the original CAPTCHA Plugin by Mark R. Evans | | ||
// | - mark AT glfusion DOT org | | ||
// | Constructed with the Universal Plugin | | ||
// +---------------------------------------------------------------------------+ | ||
// | | | ||
// | This program is free software; you can redistribute it and/or | | ||
// | modify it under the terms of the GNU General Public License | | ||
// | as published by the Free Software Foundation; either version 2 | | ||
// | 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 General Public License for more details. | | ||
// | | | ||
// | You should have received a copy of the GNU General Public License | | ||
// | along with this program; if not, write to the Free Software Foundation, | | ||
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | | ||
// | | | ||
// +---------------------------------------------------------------------------+ | ||
|
||
if (stripos($_SERVER['PHP_SELF'], basename(__FILE__)) !== false) { | ||
die('This file cannot be used on its own!'); | ||
} | ||
|
||
// reCAPTCHA Plugin Main Settings | ||
$_CONF_VALIDATE['recaptcha'] = array( | ||
'site_key' => array('rule' => 'stringOrEmpty'), | ||
'secret_key' => array('rule' => 'stringOrEmpty'), | ||
'invisible_site_key' => array('rule' => 'stringOrEmpty'), | ||
'invisible_secret_key' => array('rule' => 'stringOrEmpty'), | ||
'logging' => array('rule' => array('inList', array('0', '1'), true)), | ||
'anonymous_only' => array('rule' => array('inList', array('0', '1'), true)), | ||
'remoteusers' => array('rule' => array('inList', array('0', '1'), true)), | ||
|
||
// '0' => Disabled, '1' => reCAPTCHA v2, '2' => Invisible reCAPTCHA | ||
'enable_comment' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
'enable_contact' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
'enable_emailstory' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
'enable_registration' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
'enable_getpassword' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
'enable_loginform' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
'enable_story' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
'enable_calendar' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
'enable_links' => array('rule' => array('inList', array('0', '1', '2'), true)), | ||
|
||
// The plugins below still don't support Invisible reCAPTCHA | ||
'enable_forum' => array('rule' => array('inList', array('0', '1'), true)), | ||
'enable_mediagallery' => array('rule' => array('inList', array('0', '1'), true)), | ||
'enable_rating' => array('rule' => array('inList', array('0', '1'), true)), | ||
); |
Oops, something went wrong.