Di chuyển Form comment lên trên , trước phần Comment Blocks


Thủ thuật sẽ di chuyển form comment lên trước phần comment block (tức là đưa form comment lên trên cùng thay vì nằm ở dưới cùng ). Thực ra yêu cầu chuyển form comment lên trên cũng đơn giản, ở đây chỉ đơn thuần là ta thay đổi bố cục cho blog.

Các bạn xem hình minh họa:

Trước khi thực hiện

Sau khi thực hiện


* Bây giờ ta bắt đầu:

1. Vào Thiết kế
2. Vào Chỉnh sửa HTML
3. Nhấp chọn Mở rộng mẫu tiện ích
4. Tìm đoạn code bên dưới (hoặc tương tự) - đoạn code này chính là đoạn code để hiển thị form comment:

<p class='comment-footer'>
<b:if cond='data:post.embedCommentForm'>
<b:if cond='data:post.allowNewComments'>
<b:include data='post' name='comment-form'/>
<b:else/>
<data:post.noNewCommentsText/>
</b:if>
<b:else/>
<b:if cond='data:post.allowComments'>
<a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:postCommentMsg/></a>
</b:if>
</b:if>
</p>

5. Di chuyển tất cả code ( in đậm ) bên trong thẻ <p class='comment-footer'> ... </p> ( mà ta tìm được ở bước 4 ) vào ngay sau đoạn code bên dưới:

<b:includable id='comments' var='post'>
<div class='comments' id='comments'>
<a name='comments'/>
<b:if cond='data:post.allowComments'>
<h4>
<b:if cond='data:post.numComments == 1'>
1 <data:commentLabel/>:
<b:else/>
<data:post.numComments/> <data:commentLabelPlural/>:
</b:if>
</h4>

6. Save template.

- Chú ý: các code của các tempalte khác nhau sẽ khác nhau, nhưng nếu các bạn dùng template từ bộ template mà blogger cung cấp thì các code tương tự nhau. Nếu dùng các mẫu template khác thì code có lẽ sẽ khác đôi chút.

Chúc các bạn thành công.

Phan Dũng

Advertisement

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com