Ngày Thứ Sáu, 18 tháng 5, 2012 Blog của Báo Mới Hà Nội chia sẻ với bạn đọc bài viết Thông báo cảm ơn người vừa nhận xét
Chúc bạn xem tin tức vui vẻ !!
Lần trước Tanchau123 đã chia sẽ cùng các bạn Style dành cho Thread Comment và gắn tem cho nhận xét đầu tiên. Hôm nay mình muốn chia sẽ một thủ thuật khác là "gửi lời cảm ơn đến người nhận xét" trên blog / web bạn. Thủ thuật này sẽ giúp bạn thay lời thông báo tới những người nhận xét. Thủ thuật áp dụng cho Thread Comment của Blogger.
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 .thanks-comment{position:relative;margin:10px 0;padding-left:40px;font-style:italic;font-size:16px;quotes:"\201C""\201D""\2018""\2019"}.comments .thanks-comment:before{content:open-quote;position:absolute;top:0;left:0;margin-top:15px;font-size:4em;color:#d80556}
Bước 2: Thay thế đoạn mã
(function() { 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++){if(i==items_copy.length-1){d=document.getElementById('c'+items_copy[i].id).getElementsByTagName('p').item(0);e=d.innerHTML+'<div class="thanks-comment '+items_copy[i].deleteclass.replace(/ blog-admin/,'')+'">Thanks '+items_copy[i].author.name+' for nice comment!</div>';d.innerHTML=e}}//]]></script>
Nếu bạn đã áp dụng thủ thuật Đánh số thứ tự cho nhận xét thì chỉ cần thêm đoạn mã
;if(i==items_copy.length-1){d=document.getElementById('c'+items_copy[i].id).getElementsByTagName('p').item(0);e=d.innerHTML+'<div class="thanks-comment '+items_copy[i].deleteclass.replace(/ blog-admin/,'')+'">Thanks '+items_copy[i].author.name+' for nice comment!</div>';d.innerHTML=e} vào sau a.innerHTML=b và bỏ qua bước 2, bước 3 và bước 4.Theo duypham
.jpg)
Không có nhận xét nào:
Đăng nhận xét