
Bước 1: Thêm đoạn mã dưới đây vào trước thẻ
]]></b:skin>
trong template của bạn..comments-number{position:absolute;top:55px;left:-44px;border-radius:10px;background:#d80556;width:20px;height:20px;font-size:10px;line-height:2em;color:#fff;text-align:center} .comments .comment-thread.inline-thread .comments-number{top:44px;left:-38px}
Bước 2: Thay thế đoạn mã
(function() {
nằm ở phần <b:includable id='threaded_comment_js' var='post'>
trong template của bạn bằng đoạn mã dưới đây:
var items_copy=[]; (function() {
Bước 3: Thay thế đoạn mã
var items = <data:post.commentJso/>;
trong template của bạn bằng đoạn mã dưới đây:
var items = <data:post.commentJso/>; items_copy=items;
Bước 4: Thêm đoạn mã dưới đây vào sau thẻ
<data:post.commentHtml/>
trong template của bạn.
<script type='text/javascript'> //<![CDATA[ for(i=0;i<items_copy.length;i++){a=document.getElementById('c'+items_copy[i].id);b=a.innerHTML+'<span class="comments-number">'+(i+1)+'</span>';a.innerHTML=b} //]]> </script>
Tác giả: Duy Pham
Nguồn: Đánh số thứ tự cho nhận xét
Tags
Thủ Thuật Blogger