Thank you that's all I wanted to know. Just a little difficult to piece together after reading the thread.
Try this.
Find
// captcha code
if ($CONFIG['registration_captcha'] != 0) {
$help = cpg_display_help('f=empty.htm&base=64&h='.urlencode(base64_encode(serialize($lang_common['captcha_help_title']))).'&t='.urlencode(base64_encode(serialize($lang_common['captcha_help']))), 470, 245);
$captcha_print = <<< EOT
<tr>
<td align="right" class="tablef">
{$lang_common['confirm']} {$help}
</td>
<td class="tablef">
<input type="text" name="confirmCode" id="confirmCode" size="5" maxlength="5" class="textinput" />
<img src="captcha.php" align="middle" border="0" alt="" />
</td>
</tr>
EOT;
$captcha_print = CPGPluginAPI::filter('captcha_register_print', $captcha_print);
echo $captcha_print;
}
Replace with
// captcha code
if ($CONFIG['registration_captcha'] != 0) {
require_once("solvemedialib.php");
$solvemediahtml = solvemedia_get_html("your_challenge_key");
$help = cpg_display_help('f=empty.htm&base=64&h='.urlencode(base64_encode(serialize($lang_common['captcha_help_title']))).'&t='.urlencode(base64_encode(serialize($lang_common['captcha_help']))), 470, 245);
$captcha_print = <<< EOT
<tr>
<td align="right" class="tablef">
{$lang_common['confirm']} {$help}
</td>
<td class="tablef">
{$solvemediahtml}
</td>
</tr>
EOT;
$captcha_print = CPGPluginAPI::filter('captcha_register_print', $captcha_print);
echo $captcha_print;
}
Find
// check captcha
if ($CONFIG['registration_captcha'] != 0) {
if (!captcha_plugin_enabled()) {
require("include/captcha.inc.php");
if (!PhpCaptcha::Validate($captcha_confirmation)) {
$error .= '<li style="list-style-image:url(images/icons/stop.png)">' . $lang_errors['captcha_error'] . '</li>';
}
} else {
$error = CPGPluginAPI::filter('captcha_register_validate', $error);
}
}
Replace with
// check captcha
if ($CONFIG['registration_captcha'] != 0) {
require_once("solvemedialib.php");
$privkey="your_private_key";
$hashkey="your_hash_key";
$solvemedia_response = solvemedia_check_answer($privkey,
$superCage->server->getRaw('REMOTE_ADDR'),
$superCage->post->getRaw('adcopy_challenge'),
$superCage->post->getRaw('adcopy_response'),
$hashkey);
if (!$solvemedia_response->is_valid) {
$error .= '<li style="list-style-image:url(images/icons/stop.png)">Error: ' . $solvemedia_response->error . '</li>';
}
}
I of course have no way to test this, so there is probably something wrong with it.