Đối với 1 số blog, khi sử dụng Comment Form đôi khi gặp tình trạng không load được Profile, tức là khi trang load xong rồi, muốn comment mà bạn không thể chọn được Profile nào để comment, như thế tức là bạn phải reload trang lại cho tới khi load được Profile mới thôi, quả thật bất tiện.
Không có Profile nào để chọn cả
Cách giải quyết vấn đề này ở đây là chèn thêm 1 link, gọi là "Viết Comment trên Form chính", sẽ giúp ích cho trường hợp không chọn được Profile. Khi user click vào "Viết Comment trên Form chính" thì sẽ hiện ra trang Comment Classic trước đây, và tất nhiên Profile người comment luôn luôn chọn được.
Để cài đặt code, bạn vào Dashboard -> Template -> Edit HTML -> Expand widget template. Sau đó thêm đoạn code màu đỏ vào ví trí đã của nó như sau:
<b:includable id='comment-form' var='post'>
<p align="right" id='comment-post-message'>
<a expr:href='"http://www.blogger.com/comment.g?blogID=937920098338306331&postID=" + data:post.id' expr:target='"_blank"'>Viết comment trên Form chính</a>
</p>
<div class='comment-form'>
<a name='comment-form'/>
<h4 id='comment-post-message'><data:postCommentMsg/></h4>
<p><data:blogCommentMessage/></p>
<data:blogTeamBlogMessage/>
<a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/>
<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='275' id='comment-editor' name='comment-editor' scrolling='no' src='' width='100%'/>
<data:post.friendConnectJs/>
<data:post.cmtfpIframe/>
<script type='text/javascript'>
BLOG_CMT_createIframe('<data:post.appRpcRelayPath/>', '<data:post.communityId/>');
</script>
</div>
</b:includable>
Như vậy coi như là đã thành công. Thật ra bạn có thể thêm link này vào trên hay dưới Comment Form đều được, nhưng vì mỗi template có code khác nhau nên tôi không thể chỉ tổng quát được. Khi bạn thực hành nhiều lần trên Template, bạn sẽ hiểu nó dần dần và sẽ biết cách tùy biến theo ý của mình.

0 comments:
Post a Comment