7.5 reCAPTCHAを利用したコメント認証
P.667
<p id="comments-open-text">
<label for="comment-text">コメント:<mt:ifAllowCommentHTML>(スタイル用のHTMLタグが使えます)</mt:ifAllowCommentHTML></label>
<textarea id="comment-text" name="text" tabindex="6" accesskey="t" rows="10" cols="30" onfocus="if (this.value == 'Please comment') this.value = '';" onblur="if (this.value == '') this.value = 'Please comment';" onfocus="<mt:if name="body_class" like="mt-comment-preview|mt-comment-error">mtShowCaptcha()<mt:else>mtCommentFormOnFocus()</mt:if>"><mt:if name="body_class" like="mt-comment-preview|mt-comment-error"><mt:commentBody autolink="0" sanitize="0" convert_breaks="0" encode_html="1" /><mt:else>Please comment</mt:if></textarea>
</p>
<mt:if tag="captchaFields">
<script type="text/javascript">
var u = mtGetUser();
var commenter_name;
if ( u && u.is_authenticated ) {
commenter_name = u.name;
}
</script>
<div id="comment-form-recaptcha">
<mt:ifCommentsAccepted><mt:ifRegistrationRequired><mt:else><mt:captchaFields /></mt:ifRegistrationRequired></mt:ifCommentsAccepted>
</div>
</mt:if>
<div id="comments-open-footer" class="comments-open-footer">
<input type="submit" tabindex="7" accesskey="v" name="preview_button" id="comment-preview" value="確認" onclick="this.form.preview.value='1';" />
<input type="submit" tabindex="8" accesskey="s" name="post" id="comment-submit" value="投稿" />
</div>
P.668
<div id="comments-open-text">
<label for="comment-text">コメント
<MTIfAllowCommentHTML>(スタイル用のHTMLタグを使えます)</MTIfAllowCommentHTML></label>
<textarea id="comment-text" name="text" rows="15" cols="50" onfocus="mtCommentFormOnFocus()"></textarea>
</div>
<mt:if tag="captchaFields">
<script type="text/javascript">
var u = mtGetUser();
var commenter_name;
if ( u && u.is_authenticated ) {
commenter_name = u.name;
}
</script>
<div id="comment-form-recaptcha">
<mt:ifCommentsAccepted><mt:ifRegistrationRequired><mt:else><mt:captchaFields /></mt:ifRegistrationRequired></mt:ifCommentsAccepted>
</div>
</mt:if>
<div id="comments-open-footer">
<input type="submit" accesskey="v" name="preview_button" id="comment-preview" value="確認" onclick="this.form.preview.value='1';" />
<input type="submit" accesskey="s" name="post" id="comment-submit" value="投稿" />
</div>