
Các bước thực hiện :
1. Vào Thiết kế > Chỉnh sửa > Mở rộng mẫu tiện ích
.authortem{font-size:10px;font-weight:700;line-height:1em;color:#FFF;float:left;margin:0;padding:1px;border:1px solid #ddd}
.admintem{background:#F60;margin:0;padding:2px}
.visitortem{background:#06F;margin:0;padding:2px}
3. Tìm đoạn code sau trong template :
<dd class='comment-body' expr:id='data:widget.instanceId + data:comment.cmtBodyIdPostfix'>
Hoặc:
<p class='comment-body' style='padding-right:10px;'><data:comment.body/></p>
và chèn đoạn code bên dưới vào phía trên nó :
<div class='authortem'>
<b:if cond='data:comment.author == data:post.author'>
<div class='admintem'>ADMINISTRATOR</div>
<b:else/>
<div class='visitortem'>VISITOR</div>
</b:if>
</div>
<div style='clear:both'/>
Khi đó, sẽ trông giống thế này :
<div expr:id='data:widget.instanceId + "_comments-block-wrapper"'>
<dl expr:class='data:post.avatarIndentClass' id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
……………………………………………………….
<div class='authortem'>
<b:if cond='data:comment.author == data:post.author'>
<div class='admintem'>ADMINISTRATOR</div>
<b:else/>
<div class='visitortem'>VISITOR</div>
</b:if>
</div>
<div style='clear:both'/>
<dd class='comment-body' expr:id='data:widget.instanceId + data:comment.cmtBodyIdPostfix'> <b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
</b:loop>
</dl>
</div>
* Lưu ý : nếu bạn không thể tìm được đoạn code ở bước 3 thì có thể tìm đoạn code giống bên dưới :
<data:commentPostedByMsg/>
</dt>
<b:if cond='data:comment.author == data:post.author'>
<div class='admintem'>ADMINISTRATOR</div>
<b:else/>
<div class='visitortem'>VISITOR</div>
</b:if>
</div>
<div style='clear:both'/>
<dd class='comment-body' expr:id='data:widget.instanceId + data:comment.cmtBodyIdPostfix'> <b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
</b:loop>
</dl>
</div>
* Lưu ý : nếu bạn không thể tìm được đoạn code ở bước 3 thì có thể tìm đoạn code giống bên dưới :
<data:commentPostedByMsg/>
</dt>
Chúc các bạn thành công !
Nguồn : namkna.blogspot.com
Khi copy, các bạn nhớ ghi rõ nguồn gốc. Xin chân thành cảm ơn!

0 Bình Luận:
Đăng nhận xét
☺ Nội quy comments của CGC Forum :
1. Comments không được sử dụng lời lẽ thiếu văn hóa, ảnh hưởng xấu đến chính trị, tổ chức, cá nhân.
2. Không được sử dụng comments với mục đích spam.
Những comments làm trái quy định sẽ bị xóa...!
Xin cảm ơn các bạn đã đóng góp comments và tuân thủ nội quy của blog !
Notice by Admin