diff --git a/ext/comment/main.php b/ext/comment/main.php index 810036c4..615e749b 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -193,11 +193,6 @@ class CommentList extends SimpleExtension { $sb->add_label("
Show "); $sb->add_int_option("comment_list_count"); $sb->add_label(" comments per image on the list"); - $sb->add_label("
 
Akismet"); - $sb->add_text_option("comment_wordpress_key", "
API key: "); - $sb->add_label("
 
ReCAPTCHA"); - $sb->add_text_option("comment_recaptcha_privkey", "
Private key: "); - $sb->add_text_option("comment_recaptcha_pubkey", "
Public key: "); $event->panel->add_block($sb); } @@ -344,9 +339,9 @@ class CommentList extends SimpleExtension { private function is_spam_recaptcha($text) { global $config, $user; - if(strlen($config->get_string('comment_recaptcha_privkey')) > 0) { + if(strlen($config->get_string('api_recaptcha_privkey')) > 0) { $resp = recaptcha_check_answer( - $config->get_string('comment_recaptcha_privkey'), + $config->get_string('api_recaptcha_privkey'), $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 2b22581b..df6b906a 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -150,7 +150,7 @@ class CommentListTheme extends Themelet { $i_image_id = int_escape($image_id); $hash = CommentList::get_hash(); - $rpk = $config->get_string("comment_recaptcha_pubkey"); + $rpk = $config->get_string("api_recaptcha_pubkey"); $reca = (!$user->is_anonymous() || empty($rpk)) ? "" : recaptcha_get_html($rpk); return " diff --git a/ext/setup/main.php b/ext/setup/main.php index a8a0c021..fe0772b1 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -252,6 +252,14 @@ class Setup extends SimpleExtension { $sb->add_bool_option("nice_urls", "
Nice URLs: "); $sb->add_label("(Javascript inactive, can't test!)$nicescript"); $event->panel->add_block($sb); + + $sb = new SetupBlock("Remote API Integration"); + $sb->add_label("
 
Akismet"); + $sb->add_text_option("comment_wordpress_key", "
API key: "); + $sb->add_label("
 
ReCAPTCHA"); + $sb->add_text_option("api_recaptcha_privkey", "
Private key: "); + $sb->add_text_option("api_recaptcha_pubkey", "
Public key: "); + $event->panel->add_block($sb); } public function onConfigSave($event) {