The installation instructions for the WordPress PlugIn MyCaptcha on wordpress.org is false. The code shown there is not complete. Here are the correct way to install it.
- for the single.php-file of your theme (must start at the first line of your file):
<?php
if (class_exists('MyCaptcha')) {
$MyCaptcha->initialize();
}
//
?>
- for the comment.php-file the code on wordpress.org is correct:
<?php
if (class_exists('MyCaptcha')) {
global $MyCaptcha;
?>
Enter this code <!-- or any text that fits you -->
<?php
$MyCaptcha->comment_form();
?>
<br>
<input type=”text” name=”securitycode” id=”securitycode” size=”30″ />
<?php
}
?>
Important is, that you paste the code for the single.php in the first line! If you have the get_header(); in the first line, you´ll get following error (the path and the code-line is different from yours – it is dependent from your webserver and your wordpress-theme):
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /path/to/your/website/wordpress/wp-content/themes/k2/header.php:24) in /path/to/your/website/wordpress/wp-content/plugins/mycaptcha/MyCaptcha.php on line 41
Hope this will help you fix a installation problem with the MyCaptcha Plugin for WordPress.
At douglaswademedia.com are also some information available on how to install the Plugin. But attention – there is also shown the failure at the 2nd screenshots, where the get_header(); is in the first line (that is false!).
Update 05.07.2009 – Prefering SI Captcha
I now prefer the more easier to install Captcha-Plugin SI Captcha. It also provides more functionality like reload Captcha. It also works perfectly with the newest WordPress version!
Verwandte Beiträge:





















0 Responses to “Installation of the WordPress Plugin MyCaptcha”