mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-02 22:45:02 +03:00
Поддержка ReCaptcha
This commit is contained in:
parent
d2cb5cb0b2
commit
85dc27f99d
|
@ -47,9 +47,15 @@ class HookMain extends Hook
|
||||||
if (!$oUserCurrent and Config::Get('general.close') and !Router::CheckIsCurrentAction((array)Config::Get('general.close_exceptions'))) {
|
if (!$oUserCurrent and Config::Get('general.close') and !Router::CheckIsCurrentAction((array)Config::Get('general.close_exceptions'))) {
|
||||||
Router::Action('login');
|
Router::Action('login');
|
||||||
}
|
}
|
||||||
|
$this->LoadDefaultJsVar();
|
||||||
/**
|
/**
|
||||||
* Запуск обработки сборщика
|
* Запуск обработки сборщика
|
||||||
*/
|
*/
|
||||||
$this->Ls_SenderRun();
|
$this->Ls_SenderRun();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function LoadDefaultJsVar()
|
||||||
|
{
|
||||||
|
$this->Viewer_AssignJs('recaptcha.site_key', Config::Get('module.validate.recaptcha.site_key'));
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -268,6 +268,15 @@ $config['module']['media']['image']['preview']['sizes'] = array( // списо
|
||||||
'crop' => true,
|
'crop' => true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
/**
|
||||||
|
* Модуль Validate
|
||||||
|
*/
|
||||||
|
// Настройки Google рекаптчи - https://www.google.com/recaptcha/admin#createsite
|
||||||
|
$config['module']['validate']['recaptcha']= array(
|
||||||
|
'site_key' => '', // Ключ
|
||||||
|
'secret_key' => '', // Секретный ключ
|
||||||
|
'use_ip' => false, // Использовать при валидации IP адрес клиента
|
||||||
|
);
|
||||||
|
|
||||||
// Какие модули должны быть загружены на старте
|
// Какие модули должны быть загружены на старте
|
||||||
$config['module']['autoLoad'] = array('Hook', 'Cache', 'Logger', 'Security', 'Session', 'Lang', 'Message', 'User');
|
$config['module']['autoLoad'] = array('Hook', 'Cache', 'Logger', 'Security', 'Session', 'Lang', 'Message', 'User');
|
||||||
|
@ -491,6 +500,7 @@ $config['head']['default']['js'] = array(
|
||||||
//"___path.skin.web___/components/ls-vendor/jquery.placeholder.min.js" => array('browser' => 'lt IE 9'),
|
//"___path.skin.web___/components/ls-vendor/jquery.placeholder.min.js" => array('browser' => 'lt IE 9'),
|
||||||
|
|
||||||
"//yandex.st/share/share.js" => array('merge' => false),
|
"//yandex.st/share/share.js" => array('merge' => false),
|
||||||
|
"https://www.google.com/recaptcha/api.js?onload=__do_nothing__&render=explicit" => array('merge' => false),
|
||||||
);
|
);
|
||||||
|
|
||||||
$config['head']['default']['css'] = array();
|
$config['head']['default']['css'] = array();
|
||||||
|
|
|
@ -87,6 +87,11 @@ jQuery(document).ready(function($){
|
||||||
$(this).lsCaptcha();
|
$(this).lsCaptcha();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('[data-type=recaptcha]').livequery(function () {
|
||||||
|
$(this).lsReCaptcha({
|
||||||
|
key: ls.registry.get('recaptcha.site_key')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Alerts
|
* Alerts
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1cca764a40ffc8ea86badf16934b2438de453e9e
|
Subproject commit 5935107655b89ea78271a92e583c101a79a71e45
|
Loading…
Reference in a new issue