1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 07:08:09 +01:00

fix the captcha ACP, restore xhtml compliance for recaptcha (#46195) - note, that this will not work in IE

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9645 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2009-06-21 13:31:26 +00:00
parent afc0ef93c5
commit c2c79d8297
5 changed files with 24 additions and 13 deletions

View File

@ -54,8 +54,9 @@
<h3>{L_WARNING}</h3> <h3>{L_WARNING}</h3>
<p>{L_CAPTCHA_PREVIEW_MSG}</p> <p>{L_CAPTCHA_PREVIEW_MSG}</p>
</div> </div>
<!-- INCLUDE {CAPTCHA_PREVIEW} -->
<!-- ENDIF --> <!-- ENDIF -->
{CAPTCHA_PREVIEW}
</fieldset> </fieldset>
<fieldset class="submit-buttons"> <fieldset class="submit-buttons">

View File

@ -1,5 +1,6 @@
<!-- IF S_RECAPTCHA_AVAILABLE --> <!-- IF S_RECAPTCHA_AVAILABLE -->
<dl> <dl>
<dd>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"> <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { var RecaptchaOptions = {
@ -7,12 +8,17 @@
}; };
// ]]> // ]]>
</script> </script>
<noscript>
<iframe src="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" height="300" width="500" frameborder="0"></iframe><br/> <noscript>
<div>
<object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br />
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/> <input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
</div>
</noscript> </noscript>
</dd>
</dl> </dl>
<!-- ELSE --> <!-- ELSE -->
{L_RECAPTCHA_NOT_AVAILABLE} {L_RECAPTCHA_NOT_AVAILABLE}

View File

@ -31,7 +31,7 @@
<p>{L_CAPTCHA_PREVIEW_MSG}</p> <p>{L_CAPTCHA_PREVIEW_MSG}</p>
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->
{CAPTCHA_PREVIEW} <!-- include {CAPTCHA_PREVIEW} -->
</fieldset> </fieldset>
<fieldset class="submit-buttons"> <fieldset class="submit-buttons">

View File

@ -107,7 +107,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
} }
$template->assign_vars(array( $template->assign_vars(array(
'CAPTCHA_PREVIEW' => $this->get_demo_template($id), 'CAPTCHA_PREVIEW' => $this->get_demo_template(),
'CAPTCHA_NAME' => $this->get_class_name(), 'CAPTCHA_NAME' => $this->get_class_name(),
)); ));

View File

@ -1,5 +1,6 @@
<!-- IF S_RECAPTCHA_AVAILABLE --> <!-- IF S_RECAPTCHA_AVAILABLE -->
<dl> <dl>
<dd>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"> <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { var RecaptchaOptions = {
@ -8,13 +9,16 @@
// ]]> // ]]>
</script> </script>
<div>
<noscript> <noscript>
<iframe src="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" height="300" width="500" frameborder="0"></iframe><br /> <div>
<object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br />
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge" /> <input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
</div>
</noscript> </noscript>
</div>
</dd>
</dl> </dl>
<!-- ELSE --> <!-- ELSE -->
{L_RECAPTCHA_NOT_AVAILABLE} {L_RECAPTCHA_NOT_AVAILABLE}