diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27b5b64 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/nbproject/private/ +nbproject/project.properties +nbproject/project.xml \ No newline at end of file diff --git a/cms/config/definitions.conf.php b/cms/config/definitions.conf.php index 6bb8b46..bfda02f 100644 --- a/cms/config/definitions.conf.php +++ b/cms/config/definitions.conf.php @@ -8,6 +8,8 @@ define('JQUERY_UI_HANDLER', STATIC_URL.'js/jquery_ui_handler.js'); define('BOOTSTRAP', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'); define('BOOTSTRAP_CSS', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'); +define('RECAPTCHA_SCRIPT', 'https://www.google.com/recaptcha/api.js'); + define('WYSIWYG_EDITOR', '//tinymce.cachefly.net/4.0/tinymce.min.js'); define('WYSIWYG_EDITOR_INIT', BASE_URL . 'static/js/wysiwyg_init.js'); diff --git a/cms/data/content.sqlite b/cms/data/content.sqlite index 7d800f2..a4e2961 100644 Binary files a/cms/data/content.sqlite and b/cms/data/content.sqlite differ diff --git a/cms/includes/classes/Comment.class.php b/cms/includes/classes/Comment.class.php index fede2d1..6b4728a 100644 --- a/cms/includes/classes/Comment.class.php +++ b/cms/includes/classes/Comment.class.php @@ -10,6 +10,8 @@ class Comment public $prevent_repeated_posts_minutes = 2; public $akismet_key = ''; public $akismet_entry_check = 0; + public $recaptcha_secret_key = ''; + public $recaptcha_entry_check = 0; public $remove_blank_lines = 1; public $auto_link = 1; public $smilies = 1; @@ -461,6 +463,13 @@ class Comment } } } + + // reCAPTCHA check + if(!$this->admin_mode && $this->recaptcha_secret_key!='' && $this->recaptcha_entry_check==1) + { + if(!check_captcha($this->recaptcha_secret_key)) + $this->errors[] = 'wrong_captcha'; + } } // end if($save) } } diff --git a/cms/includes/functions.inc.php b/cms/includes/functions.inc.php index c9adfec..dd61e9e 100644 --- a/cms/includes/functions.inc.php +++ b/cms/includes/functions.inc.php @@ -25,6 +25,29 @@ function showme($what) exit; } + /** + * check if the entered captcha is right + * NOTE: you need PHP5 for this specific function to work, + * if you wan't to support other versions do a workaround yourself. + */ +function check_captcha($secret) { + $post_data = array( + 'secret' => htmlspecialchars($secret), // have to pass it, since here $settings is not initalized + 'response' => $_POST["g-recaptcha-response"], + ); + + $options = array( + 'http' => array( + 'method' => 'POST', + 'content' => http_build_query($post_data), + ), + ); + $context = stream_context_create($options); + $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify", false, $context); + + return json_decode($response)->success; + } + /** * fetches settings from database */ diff --git a/cms/includes/login.inc.php b/cms/includes/login.inc.php index bc883ed..168d1c1 100644 --- a/cms/includes/login.inc.php +++ b/cms/includes/login.inc.php @@ -10,28 +10,35 @@ elseif(empty($_SESSION[$settings['session_prefix'].'user_id']) && isset($_POST[' { $username = $_POST['username']; $userpw = $_POST['userpw']; - if(isset($_POST['username']) && trim($_POST['username']) != '' && isset($_POST['userpw']) && trim($_POST['userpw']) != '') + if (!$settings['recaptcha_login_check'] || check_captcha($settings['recaptcha_secret_key'])) { - $dbr = Database::$userdata->prepare('SELECT id, name, pw, type, wysiwyg FROM '.Database::$db_settings['userdata_table'].' WHERE lower(name)=lower(:name) LIMIT 1'); - #$dbr->bindValue(':name',mb_strtolower($_POST['username'],CHARSET), PDO::PARAM_STR); - $dbr->bindValue(':name',$_POST['username'], PDO::PARAM_STR); - $dbr->execute(); - $row = $dbr->fetch(); - if(isset($row['id'])) + if(isset($_POST['username']) && trim($_POST['username']) != '' && isset($_POST['userpw']) && trim($_POST['userpw']) != '') { - if(is_pw_correct($_POST['userpw'],$row['pw'])) + $dbr = Database::$userdata->prepare('SELECT id, name, pw, type, wysiwyg FROM '.Database::$db_settings['userdata_table'].' WHERE lower(name)=lower(:name) LIMIT 1'); + #$dbr->bindValue(':name',mb_strtolower($_POST['username'],CHARSET), PDO::PARAM_STR); + $dbr->bindValue(':name',$_POST['username'], PDO::PARAM_STR); + $dbr->execute(); + $row = $dbr->fetch(); + if(isset($row['id'])) { - $_SESSION[$settings['session_prefix'].'user_id'] = $row['id']; - $_SESSION[$settings['session_prefix'].'user_name'] = $row['name']; - $_SESSION[$settings['session_prefix'].'user_type'] = $row['type']; - $_SESSION[$settings['session_prefix'].'wysiwyg'] = $row['wysiwyg']; - - $dbr = Database::$userdata->prepare('UPDATE '.Database::$db_settings['userdata_table'].' SET last_login=:now WHERE id=:id'); - $dbr->bindValue(':now', time(), PDO::PARAM_INT); - $dbr->bindValue(':id', $row['id'], PDO::PARAM_INT); - $dbr->execute(); - header('Location: ../'); - exit; + if(is_pw_correct($_POST['userpw'],$row['pw'])) + { + $_SESSION[$settings['session_prefix'].'user_id'] = $row['id']; + $_SESSION[$settings['session_prefix'].'user_name'] = $row['name']; + $_SESSION[$settings['session_prefix'].'user_type'] = $row['type']; + $_SESSION[$settings['session_prefix'].'wysiwyg'] = $row['wysiwyg']; + + $dbr = Database::$userdata->prepare('UPDATE '.Database::$db_settings['userdata_table'].' SET last_login=:now WHERE id=:id'); + $dbr->bindValue(':now', time(), PDO::PARAM_INT); + $dbr->bindValue(':id', $row['id'], PDO::PARAM_INT); + $dbr->execute(); + header('Location: ../'); + exit; + } + else + { + $login_failed = true; + } } else { @@ -45,7 +52,8 @@ elseif(empty($_SESSION[$settings['session_prefix'].'user_id']) && isset($_POST[' } else { - $login_failed = true; + header('Location: index.php?msg=wrong_captcha'); + exit; } if(isset($login_failed)) { diff --git a/cms/includes/page_types/commentable_page.php b/cms/includes/page_types/commentable_page.php index 887574e..697a9fc 100644 --- a/cms/includes/page_types/commentable_page.php +++ b/cms/includes/page_types/commentable_page.php @@ -15,6 +15,8 @@ $comment->comment_maxlength = $settings['comment_maxlength']; $comment->prevent_repeated_posts_minutes = $settings['prevent_repeated_posts_minutes']; $comment->akismet_key = $settings['akismet_key']; $comment->akismet_entry_check = $settings['akismet_entry_check']; +$comment->recaptcha_secret_key = $settings['recaptcha_secret_key']; +$comment->recaptcha_entry_check = $settings['recaptcha_entry_check']; $comment->remove_blank_lines = $settings['comment_remove_blank_lines']; $comment->auto_link = $settings['comment_auto_link']; $comment->smilies = $settings['comment_smilies']; diff --git a/cms/includes/page_types/formmailer.php b/cms/includes/page_types/formmailer.php index 577a10f..d756d97 100644 --- a/cms/includes/page_types/formmailer.php +++ b/cms/includes/page_types/formmailer.php @@ -34,6 +34,10 @@ if(isset($_POST['send'])) { $errors[] = 'formmail_error_subj_too_long'; } + if ($settings['recaptcha_mail_check'] && !isset($_SESSION[$settings['session_prefix'].'user_id']) && !check_captcha($settings['recaptcha_secret_key'])) + { + $errors[] = 'wrong_captcha'; + } if(empty($errors)) { // Akismet spam check: diff --git a/cms/includes/spam_protection.inc.php b/cms/includes/spam_protection.inc.php index f912a85..a8f967d 100644 --- a/cms/includes/spam_protection.inc.php +++ b/cms/includes/spam_protection.inc.php @@ -47,6 +47,15 @@ if(isset($_SESSION[$settings['session_prefix'].'user_id']) && $_SESSION[$setting $akismet_key = !empty($_POST['akismet_key']) ? $_POST['akismet_key'] : ''; $akismet_entry_check = isset($_POST['akismet_entry_check']) ? 1 : 0; $akismet_mail_check = isset($_POST['akismet_mail_check']) ? 1 : 0; + + $recaptcha_public_key = !empty($_POST['recaptcha_public_key']) ? $_POST['recaptcha_public_key'] : ''; + $recaptcha_secret_key = !empty($_POST['recaptcha_secret_key']) ? $_POST['recaptcha_secret_key'] : ''; + $recaptcha_login_check = isset($_POST['recaptcha_login_check']) ? 1 : 0; + $recaptcha_entry_check = isset($_POST['recaptcha_entry_check']) ? 1 : 0; + $recaptcha_mail_check = isset($_POST['recaptcha_mail_check']) ? 1 : 0; + + if(($recaptcha_login_check || $recaptcha_entry_check || $recaptcha_mail_check) && (empty($recaptcha_public_key)) || empty($recaptcha_secret_key)) + $errors[] = 'error_recaptcha_keys'; if(trim($banned_ips=='') && trim($banned_user_agents=='')) $check_access_permission = 0; else $check_access_permission = 1; @@ -77,6 +86,21 @@ if(isset($_SESSION[$settings['session_prefix'].'user_id']) && $_SESSION[$setting $dbr->bindValue(':name', 'akismet_mail_check', PDO::PARAM_STR); $dbr->bindParam(':value', $akismet_mail_check, PDO::PARAM_STR); $dbr->execute(); + $dbr->bindValue(':name', 'recaptcha_public_key', PDO::PARAM_STR); + $dbr->bindParam(':value', $recaptcha_public_key, PDO::PARAM_STR); + $dbr->execute(); + $dbr->bindValue(':name', 'recaptcha_secret_key', PDO::PARAM_STR); + $dbr->bindParam(':value', $recaptcha_secret_key, PDO::PARAM_STR); + $dbr->execute(); + $dbr->bindValue(':name', 'recaptcha_login_check', PDO::PARAM_STR); + $dbr->bindParam(':value', $recaptcha_login_check, PDO::PARAM_STR); + $dbr->execute(); + $dbr->bindValue(':name', 'recaptcha_entry_check', PDO::PARAM_STR); + $dbr->bindParam(':value', $recaptcha_entry_check, PDO::PARAM_STR); + $dbr->execute(); + $dbr->bindValue(':name', 'recaptcha_mail_check', PDO::PARAM_STR); + $dbr->bindParam(':value', $recaptcha_mail_check, PDO::PARAM_STR); + $dbr->execute(); $dbr->bindValue(':name', 'check_access_permission', PDO::PARAM_STR); $dbr->bindParam(':value', $check_access_permission, PDO::PARAM_STR); $dbr->execute(); @@ -95,6 +119,11 @@ if(isset($_SESSION[$settings['session_prefix'].'user_id']) && $_SESSION[$setting if(isset($_POST['akismet_key'])) $template->assign('akismet_key',htmlspecialchars(stripslashes($_POST['akismet_key']))); if(isset($_POST['akismet_entry_check'])) $template->assign('akismet_entry_check',intval($_POST['akismet_entry_check'])); if(isset($_POST['akismet_mail_check'])) $template->assign('akismet_mail_check',intval($_POST['akismet_mail_check'])); + if(isset($_POST['recaptcha_public_key'])) $template->assign('recaptcha_public_key', htmlspecialchars(stripslashes($_POST['recaptcha_public_key']))); + if(isset($_POST['recaptcha_secret_key']))$template->assign('recaptcha_secret_key', htmlspecialchars(stripslashes($_POST['recaptcha_secret_key']))); + if(isset($_POST['recaptcha_login_check'])) $template->assign('recaptcha_login_check',intval($_POST['recaptcha_login_check'])); + if(isset($_POST['recaptcha_entry_check'])) $template->assign('recaptcha_entry_check',intval($_POST['recaptcha_entry_check'])); + if(isset($_POST['recaptcha_mail_check'])) $template->assign('recaptcha_mail_check',intval($_POST['recaptcha_mail_check'])); } @@ -120,6 +149,13 @@ if(isset($_SESSION[$settings['session_prefix'].'user_id']) && $_SESSION[$setting $template->assign('akismet_key',htmlspecialchars(stripslashes($settings['akismet_key']))); $template->assign('akismet_entry_check',intval($settings['akismet_entry_check'])); $template->assign('akismet_mail_check',intval($settings['akismet_mail_check'])); + + // reCAPTCHA + $template->assign('recaptcha_public_key', htmlspecialchars(stripslashes($settings['recaptcha_public_key']))); + $template->assign('recaptcha_secret_key', htmlspecialchars(stripslashes($settings['recaptcha_secret_key']))); + $template->assign('recaptcha_login_check',intval($settings['recaptcha_login_check'])); + $template->assign('recaptcha_entry_check',intval($settings['recaptcha_entry_check'])); + $template->assign('recaptcha_mail_check',intval($settings['recaptcha_mail_check'])); } if(isset($_GET['saved'])) { diff --git a/cms/lang/bulgarian.admin.lang.php b/cms/lang/bulgarian.admin.lang.php index 287fe8e..c3a645f 100644 --- a/cms/lang/bulgarian.admin.lang.php +++ b/cms/lang/bulgarian.admin.lang.php @@ -463,6 +463,17 @@ $lang['spam_protection_saved'] = 'Настройките на спам $lang['error_own_ip_banned'] = 'Опитвате се да забраните Вашия IP адрес!'; $lang['error_own_user_agent_banned'] = 'Опитвате се да забраните Вашия браузър (user agent)!'; +# reCAPTCHA +$lang['recaptcha'] = 'reCAPTCHA'; +$lang['recaptcha_desc'] = 'reCAPTCHA bot protection'; +$lang['recaptcha_login_check'] = 'enable for users login'; +$lang['recaptcha_entry_check'] = 'enable for comments'; +$lang['recaptcha_mail_check'] = 'enable for formmailer'; +$lang['recaptcha_public_key'] = 'Site Key'; +$lang['recaptcha_secret_key'] = 'Secret Key'; +$lang['error_recaptcha_keys'] = 'You forgot to setup your reCAPTCHA keys!'; +$lang['wrong_captcha'] = 'You entered a wrong captcha, try again!'; + # insert_image $lang['insert_image'] = 'Вмъкване на снимка'; $lang['select_image_title'] = 'Вмъкване на снимка'; diff --git a/cms/lang/bulgarian.page.lang.php b/cms/lang/bulgarian.page.lang.php index cac31fd..93c2b18 100644 --- a/cms/lang/bulgarian.page.lang.php +++ b/cms/lang/bulgarian.page.lang.php @@ -147,4 +147,7 @@ $lang['search_no_results'] = 'Не са намерени стран $lang['akismet_error_api_key'] = 'Невалиден Akismet API ключ!'; $lang['akismet_error_connection'] = 'Грешка при свързването със сървъра - моля, опитайте по-късно!'; $lang['akismet_spam_suspicion'] = 'Съмнение за Спам!'; + +// reCAPTCHA: +$lang['wrong_captcha'] = 'You entered a wrong captcha, please try again!'; ?> diff --git a/cms/lang/chinese_zh-CN.admin.lang.php b/cms/lang/chinese_zh-CN.admin.lang.php index 4837933..2b8865e 100644 --- a/cms/lang/chinese_zh-CN.admin.lang.php +++ b/cms/lang/chinese_zh-CN.admin.lang.php @@ -458,6 +458,17 @@ $lang['spam_protection_saved'] = '已保存'; $lang['error_own_ip_banned'] = '你禁止了自己的IP!'; $lang['error_own_user_agent_banned'] = '你禁止了自己的浏览器标志!'; +# reCAPTCHA +$lang['recaptcha'] = 'reCAPTCHA'; +$lang['recaptcha_desc'] = 'reCAPTCHA bot protection'; +$lang['recaptcha_login_check'] = 'enable for users login'; +$lang['recaptcha_entry_check'] = 'enable for comments'; +$lang['recaptcha_mail_check'] = 'enable for formmailer'; +$lang['recaptcha_public_key'] = 'Site Key'; +$lang['recaptcha_secret_key'] = 'Secret Key'; +$lang['error_recaptcha_keys'] = 'You forgot to setup your reCAPTCHA keys!'; +$lang['wrong_captcha'] = 'You entered a wrong captcha, try again!'; + # insert_image $lang['insert_image'] = '插入图片'; $lang['select_image_title'] = '插入图片'; diff --git a/cms/lang/chinese_zh-CN.page.lang.php b/cms/lang/chinese_zh-CN.page.lang.php index e6c0a78..d1985f9 100644 --- a/cms/lang/chinese_zh-CN.page.lang.php +++ b/cms/lang/chinese_zh-CN.page.lang.php @@ -143,5 +143,8 @@ $lang['search_no_results'] = '页面未找到'; $lang['akismet_error_api_key'] = 'Invalid akismet api key'; $lang['akismet_error_connection'] = 'Server connection error - please try again later'; $lang['akismet_spam_suspicion'] = 'Spam suspicion!'; + +// reCAPTCHA: +$lang['wrong_captcha'] = 'You entered a wrong captcha, please try again!'; ?> diff --git a/cms/lang/english.admin.lang.php b/cms/lang/english.admin.lang.php index 455df9e..66aaa81 100644 --- a/cms/lang/english.admin.lang.php +++ b/cms/lang/english.admin.lang.php @@ -458,6 +458,17 @@ $lang['spam_protection_saved'] = 'Saved'; $lang['error_own_ip_banned'] = 'You banned your own IP!'; $lang['error_own_user_agent_banned'] = 'You banned your own User Agent!'; +# reCAPTCHA +$lang['recaptcha'] = 'reCAPTCHA'; +$lang['recaptcha_desc'] = 'reCAPTCHA bot protection'; +$lang['recaptcha_login_check'] = 'enable for users login'; +$lang['recaptcha_entry_check'] = 'enable for comments'; +$lang['recaptcha_mail_check'] = 'enable for formmailer'; +$lang['recaptcha_public_key'] = 'Site Key'; +$lang['recaptcha_secret_key'] = 'Secret Key'; +$lang['error_recaptcha_keys'] = 'You forgot to setup your reCAPTCHA keys!'; +$lang['wrong_captcha'] = 'You entered a wrong captcha, try again!'; + # insert_image $lang['insert_image'] = 'Insert image'; $lang['select_image_title'] = 'Insert image'; diff --git a/cms/lang/english.page.lang.php b/cms/lang/english.page.lang.php index d6d2b1f..08cfe7b 100644 --- a/cms/lang/english.page.lang.php +++ b/cms/lang/english.page.lang.php @@ -143,4 +143,7 @@ $lang['search_no_results'] = 'No pages found'; $lang['akismet_error_api_key'] = 'Invalid akismet api key'; $lang['akismet_error_connection'] = 'Server connection error - please try again later'; $lang['akismet_spam_suspicion'] = 'Spam suspicion!'; + +// reCAPTCHA: +$lang['wrong_captcha'] = 'You entered a wrong captcha, please try again!'; ?> diff --git a/cms/lang/german.admin.lang.php b/cms/lang/german.admin.lang.php index e8e1e28..8af3982 100644 --- a/cms/lang/german.admin.lang.php +++ b/cms/lang/german.admin.lang.php @@ -458,6 +458,17 @@ $lang['spam_protection_saved'] = 'Gespeichert'; $lang['error_own_ip_banned'] = 'Sie haben Ihre eigene IP gebannt!'; $lang['error_own_user_agent_banned'] = 'Sie haben Ihren eigenen User-Agent gebannt!'; +# reCAPTCHA +$lang['recaptcha'] = 'reCAPTCHA'; +$lang['recaptcha_desc'] = 'reCAPTCHA bot protection'; +$lang['recaptcha_login_check'] = 'enable for users login'; +$lang['recaptcha_entry_check'] = 'enable for comments'; +$lang['recaptcha_mail_check'] = 'enable for formmailer'; +$lang['recaptcha_public_key'] = 'Site Key'; +$lang['recaptcha_secret_key'] = 'Secret Key'; +$lang['error_recaptcha_keys'] = 'You forgot to setup your reCAPTCHA keys!'; +$lang['wrong_captcha'] = 'You entered a wrong captcha, try again!'; + # insert_image $lang['insert_image'] = 'Bild einfügen'; $lang['select_image_title'] = 'Bild einfügen'; diff --git a/cms/lang/german.page.lang.php b/cms/lang/german.page.lang.php index 2385db7..48b5bd1 100644 --- a/cms/lang/german.page.lang.php +++ b/cms/lang/german.page.lang.php @@ -146,4 +146,7 @@ $lang['search_no_results'] = 'Keine Seiten gefunden'; $lang['akismet_error_api_key'] = 'Ungültiger Akismet-API-Key'; $lang['akismet_error_connection'] = 'Fehler bei der Serververbindung - bitte versuchen Sie es später noch einmal'; $lang['akismet_spam_suspicion'] = 'Spam-Verdacht!'; + +// reCAPTCHA: +$lang['wrong_captcha'] = 'You entered a wrong captcha, please try again!'; ?> diff --git a/cms/lang/polish.admin.lang.php b/cms/lang/polish.admin.lang.php index 79eceea..a8429d7 100644 --- a/cms/lang/polish.admin.lang.php +++ b/cms/lang/polish.admin.lang.php @@ -463,6 +463,17 @@ $lang['spam_protection_saved'] = 'Zapisane'; $lang['error_own_ip_banned'] = 'Zabanowałeś swój IP!'; $lang['error_own_user_agent_banned'] = 'Zabanowałeś swojego User Agenta!'; +# reCAPTCHA +$lang['recaptcha'] = 'reCAPTCHA'; +$lang['recaptcha_desc'] = 'reCAPTCHA bot protection'; +$lang['recaptcha_login_check'] = 'enable for users login'; +$lang['recaptcha_entry_check'] = 'enable for comments'; +$lang['recaptcha_mail_check'] = 'enable for formmailer'; +$lang['recaptcha_public_key'] = 'Site Key'; +$lang['recaptcha_secret_key'] = 'Secret Key'; +$lang['error_recaptcha_keys'] = 'You forgot to setup your reCAPTCHA keys!'; +$lang['wrong_captcha'] = 'You entered a wrong captcha, try again!'; + # insert_image $lang['insert_image'] = 'Wstaw obrazek'; $lang['select_image_title'] = 'Wstaw obrazek'; diff --git a/cms/lang/polish.page.lang.php b/cms/lang/polish.page.lang.php index 22b0c04..7fee854 100644 --- a/cms/lang/polish.page.lang.php +++ b/cms/lang/polish.page.lang.php @@ -152,4 +152,7 @@ $lang['search_no_results'] = 'Nie znaleziono stron'; $lang['akismet_error_api_key'] = 'Błędny klucz api akismet (api key)'; $lang['akismet_error_connection'] = 'Błąd połączenia z serwerem akismet - proszę spróbować później'; $lang['akismet_spam_suspicion'] = 'Podejrzenie spamu!'; + +// reCAPTCHA: +$lang['wrong_captcha'] = 'You entered a wrong captcha, please try again!'; ?> diff --git a/cms/lang/russian.admin.lang.php b/cms/lang/russian.admin.lang.php index d614246..415d0fd 100644 --- a/cms/lang/russian.admin.lang.php +++ b/cms/lang/russian.admin.lang.php @@ -462,6 +462,17 @@ $lang['spam_protection_saved'] = 'Настройки Анти-Спам $lang['error_own_ip_banned'] = 'Вы пытаетесь заблокировать свой собственный IP!'; $lang['error_own_user_agent_banned'] = 'Вы пытаетесь заблокировать свой собственный браузер (User Agent)!'; +# reCAPTCHA +$lang['recaptcha'] = 'reCAPTCHA'; +$lang['recaptcha_desc'] = 'reCAPTCHA bot protection'; +$lang['recaptcha_login_check'] = 'enable for users login'; +$lang['recaptcha_entry_check'] = 'enable for comments'; +$lang['recaptcha_mail_check'] = 'enable for formmailer'; +$lang['recaptcha_public_key'] = 'Site Key'; +$lang['recaptcha_secret_key'] = 'Secret Key'; +$lang['error_recaptcha_keys'] = 'You forgot to setup your reCAPTCHA keys!'; +$lang['wrong_captcha'] = 'You entered a wrong captcha, try again!'; + # insert_image $lang['insert_image'] = 'Вставить изображение'; $lang['select_image_title'] = 'Вставить изображение'; diff --git a/cms/lang/russian.page.lang.php b/cms/lang/russian.page.lang.php index 00d57ae..3c74cba 100644 --- a/cms/lang/russian.page.lang.php +++ b/cms/lang/russian.page.lang.php @@ -147,3 +147,5 @@ $lang['akismet_error_api_key'] = 'Недопустимый ключ akis $lang['akismet_error_connection'] = 'Ошибка подключения к серверу akismet - попробуйте повторить позже'; $lang['akismet_spam_suspicion'] = 'Похоже на спам!'; +// reCAPTCHA: +$lang['wrong_captcha'] = 'You entered a wrong captcha, please try again!'; diff --git a/cms/lang/spanish.admin.lang.php b/cms/lang/spanish.admin.lang.php index 48c4ca7..8cf1268 100644 --- a/cms/lang/spanish.admin.lang.php +++ b/cms/lang/spanish.admin.lang.php @@ -461,6 +461,17 @@ $lang['spam_protection_saved'] = 'Configuración guardada'; $lang['error_own_ip_banned'] = '¡Ha bloqueado su propia dirección IP!'; $lang['error_own_user_agent_banned'] = '¡Ha bloqueado su propio navegador!'; +# reCAPTCHA +$lang['recaptcha'] = 'reCAPTCHA'; +$lang['recaptcha_desc'] = 'reCAPTCHA bot protection'; +$lang['recaptcha_login_check'] = 'enable for users login'; +$lang['recaptcha_entry_check'] = 'enable for comments'; +$lang['recaptcha_mail_check'] = 'enable for formmailer'; +$lang['recaptcha_public_key'] = 'Site Key'; +$lang['recaptcha_secret_key'] = 'Secret Key'; +$lang['error_recaptcha_keys'] = 'You forgot to setup your reCAPTCHA keys!'; +$lang['wrong_captcha'] = 'You entered a wrong captcha, try again!'; + # insert_image $lang['insert_image'] = 'Insertar una imagen'; $lang['select_image_title'] = 'Insertar una imagen'; diff --git a/cms/lang/spanish.page.lang.php b/cms/lang/spanish.page.lang.php index 9a57d0f..2213af1 100644 --- a/cms/lang/spanish.page.lang.php +++ b/cms/lang/spanish.page.lang.php @@ -143,4 +143,7 @@ $lang['search_no_results'] = 'No se ha encontrado ninguna página'; $lang['akismet_error_api_key'] = 'La clave del API Akismet es incorrecta'; $lang['akismet_error_connection'] = 'Error de conexión al servidor - por favor, inténtelo de nuevo más tarde'; $lang['akismet_spam_suspicion'] = '¡Sospecha de Spam!'; + +// reCAPTCHA: +$lang['wrong_captcha'] = 'You entered a wrong captcha, please try again!'; ?> diff --git a/cms/lang/ukrainian.admin.lang.php b/cms/lang/ukrainian.admin.lang.php index 3c0f385..6d3551e 100644 --- a/cms/lang/ukrainian.admin.lang.php +++ b/cms/lang/ukrainian.admin.lang.php @@ -460,6 +460,17 @@ $lang['spam_protection_saved'] = 'Налаштування Анти-Сп $lang['error_own_ip_banned'] = 'Ви намагаєтесь заблокувати власний IP!'; $lang['error_own_user_agent_banned'] = 'Ви намагаєтесь заблокувати власний браузер (User Agent)!'; +# reCAPTCHA +$lang['recaptcha'] = 'reCAPTCHA'; +$lang['recaptcha_desc'] = 'reCAPTCHA bot protection'; +$lang['recaptcha_login_check'] = 'enable for users login'; +$lang['recaptcha_entry_check'] = 'enable for comments'; +$lang['recaptcha_mail_check'] = 'enable for formmailer'; +$lang['recaptcha_public_key'] = 'Site Key'; +$lang['recaptcha_secret_key'] = 'Secret Key'; +$lang['error_recaptcha_keys'] = 'You forgot to setup your reCAPTCHA keys!'; +$lang['wrong_captcha'] = 'You entered a wrong captcha, try again!'; + # insert_image $lang['insert_image'] = 'Додати зображення'; $lang['select_image_title'] = 'Додати зображення'; diff --git a/cms/lang/ukrainian.page.lang.php b/cms/lang/ukrainian.page.lang.php index 0911399..4c28653 100644 --- a/cms/lang/ukrainian.page.lang.php +++ b/cms/lang/ukrainian.page.lang.php @@ -145,3 +145,5 @@ $lang['akismet_error_api_key'] = 'Неприпустимий ключ ak $lang['akismet_error_connection'] = 'Помилка підключення до серверу akismet - спопробуйте пізніше'; $lang['akismet_spam_suspicion'] = 'Схоже на спам!'; +// reCAPTCHA: +$lang['wrong_captcha'] = 'You entered a wrong captcha, please try again!'; diff --git a/cms/templates/admin/main.tpl b/cms/templates/admin/main.tpl index 7d8085f..f8dc796 100644 --- a/cms/templates/admin/main.tpl +++ b/cms/templates/admin/main.tpl @@ -57,5 +57,8 @@ + + + diff --git a/cms/templates/admin/subtemplates/login.inc.tpl b/cms/templates/admin/subtemplates/login.inc.tpl index d30f660..e8730b6 100644 --- a/cms/templates/admin/subtemplates/login.inc.tpl +++ b/cms/templates/admin/subtemplates/login.inc.tpl @@ -1,8 +1,8 @@

- +
- +
@@ -17,7 +17,13 @@ - + + +
+
+
+ + diff --git a/cms/templates/admin/subtemplates/spam_protection.inc.tpl b/cms/templates/admin/subtemplates/spam_protection.inc.tpl index acc6bee..036c3b3 100644 --- a/cms/templates/admin/subtemplates/spam_protection.inc.tpl +++ b/cms/templates/admin/subtemplates/spam_protection.inc.tpl @@ -52,6 +52,36 @@ name="akismet_mail_check" checked> +
+ + +
+
+ +
+
+ +
+
+
+
+
+ +
+
diff --git a/cms/templates/default.tpl b/cms/templates/default.tpl index 4875afc..0274e66 100644 --- a/cms/templates/default.tpl +++ b/cms/templates/default.tpl @@ -111,6 +111,9 @@ + + + diff --git a/cms/templates/subtemplates/comments.inc.tpl b/cms/templates/subtemplates/comments.inc.tpl index a4b6667..3de0efa 100644 --- a/cms/templates/subtemplates/comments.inc.tpl +++ b/cms/templates/subtemplates/comments.inc.tpl @@ -176,6 +176,12 @@ value="" placeholder=""/> + + +
+
+
+
- + + +
+
+
+ +