Friday, April 17, 2009

Top những người comment nhiều nhất

Showing Top Commentators in Blogger
[FD's BlOg] - Với thủ thuật này bạn có thể biết ai đã comment nhiều nhất trong blog của bạn.

Đề làm điều này, bạn tạo 1 widget HTML/Java ở nơi muốn đặt bẳng hiển thị những người comment nhiều nhất. Sau đó dán code bên dưới vào. Như vậy là xong.

Code:

<script type="text/javascript">
function pipeCallback(obj) {
document.write("<ol>");
var i;
for (i = 0; i < obj.count ; i++)
{
var href = "'" + obj.value.items[i].link + "'";
var item = "<li>" + "<a href=" + href + ">" + obj.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write("</ol>");
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&_id=c92ac21897d8b56e61cfa85930dd89a1&filter=nickname&url=http%3A%2F%2FYourBlogName.blogspot.com&num=10" type="text/javascript"></script>

►Chú ý 3 đọan code màu đỏ
+ filter=nickname : Điền tên mà bạn muốn lọc. Ví dụ tên bạn là ABC, nếu bạn không muốn tên mình hiển thị trong list những người comment nhiều nhất thì hãy thay nickname thành ABC
+ YourBlogName.blogspot.com : Địa chỉ URL blog của bạn.
+ num=10 : Số người sẽ xuất hiện trên list.


Xem ảnh minh họa:

Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 nhận xét

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

 
© Sổ ghi chú
Designed by BlogThietKe Cooperated with Duy Pham
Released under Creative Commons 3.0 CC BY-NC 3.0
Posts RSSComments RSS
Back to top