diff --git a/PluginRecaptcha.class.php b/PluginRecaptcha.class.php index 876c62a..fce3769 100644 --- a/PluginRecaptcha.class.php +++ b/PluginRecaptcha.class.php @@ -30,6 +30,7 @@ public function Deactivate(){ } public function Init() { + $this->Viewer_AppendScript(Plugin::GetTemplatePath(__CLASS__)."js/script.js"); Config::Set('module.user.captcha_use_registration', false); } } diff --git a/classes/hooks/HookRecaptcha.class.php b/classes/hooks/HookRecaptcha.class.php index 06e069e..83561c3 100644 --- a/classes/hooks/HookRecaptcha.class.php +++ b/classes/hooks/HookRecaptcha.class.php @@ -18,14 +18,12 @@ public function RegisterHook() { } public function Recaptcha() { - $recaptcha = recaptcha_get_html(Config::Get('plugin.recaptcha.public_key'), null, Config::Get('plugin.recaptcha.use_ssl')); - $this->Viewer_Assign('recaptcha', $recaptcha); return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__).'inject.recaptcha.tpl'); } public function Recaptcha_modal() { - $recaptcha = recaptcha_get_html(Config::Get('plugin.recaptcha.public_key'), null, Config::Get('plugin.recaptcha.use_ssl')); - $this->Viewer_Assign('recaptcha_modal', $recaptcha); + $recaptcha = recaptcha_get_html(Config::Get('plugin.recaptcha.public_key'), null, Config::Get('plugin.recaptcha.use_ssl')); + $this->Viewer_Assign('recaptcha', $recaptcha); return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__).'inject.recaptcha_modal.tpl'); } } diff --git a/templates/skin/default/inject.recaptcha.tpl b/templates/skin/default/inject.recaptcha.tpl index 385e964..5f434c8 100644 --- a/templates/skin/default/inject.recaptcha.tpl +++ b/templates/skin/default/inject.recaptcha.tpl @@ -1,7 +1,7 @@
- {$recaptcha_modal} +