Được đăng bởi :
Minh
|
Thứ Năm, 23 tháng 12, 2010
|
21:51:00
Tiện ích Top 20 người bình luận cho blogspot
<!-- Top commentators widget v1 Start -->
<script type="text/javascript">
function getYpipe(feed) {
document.write('<ol>');
var i;
for (i = 0; i < feed.count ; i++)
{
var href = "'" + feed.value.items[i].link + "'";
if(feed.value.items[i].link == "")
var item ="<li>" + feed.value.items[i].title + "</li>";
else
var item = "<li>" + "<a href="+ href + '" target="_blank">' + feed.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write('</ol>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://huynh-nhat-ha.blogspot.com
&ExcludedNick1=Huỳnh Nhật Hà
&ExcludedNick2=
&ShowHowMany=20 // Số người bình luận được liệt kê
&_callback=getYpipe
&_id=23022d7836bf2dd3c10a329feb9be26a
&_render=json"
type="text/javascript"></script>
<!-- Top commentators widget End -->
<script type="text/javascript">
function getYpipe(feed) {
document.write('<ol>');
var i;
for (i = 0; i < feed.count ; i++)
{
var href = "'" + feed.value.items[i].link + "'";
if(feed.value.items[i].link == "")
var item ="<li>" + feed.value.items[i].title + "</li>";
else
var item = "<li>" + "<a href="+ href + '" target="_blank">' + feed.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write('</ol>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://huynh-nhat-ha.blogspot.com
&ExcludedNick1=Huỳnh Nhật Hà
&ExcludedNick2=
&ShowHowMany=20 // Số người bình luận được liệt kê
&_callback=getYpipe
&_id=23022d7836bf2dd3c10a329feb9be26a
&_render=json"
type="text/javascript"></script>
<!-- Top commentators widget End -->
Trong đoạn code trên, bạn cần thay huynh-nhat-ha thành tên blogspot của bạn và thay Huỳnh Nhật Hà thành tên hoặc nickname của bạn. Ở dòng ExcludedNick2 =, bạn có thể thêm nickname của người bình luận mà bạn không muốn được liệt vào tiện ích (đương nhiên tên hay nickname của bạn cũng không được liệt vào đây và nickname Anonymous cũng được loại ra về mặc định nên không cần thêm vào).
Dưới đây là Demo cho Kiểu 2.
Top 20 Commentators
<!-- Top Commentators Cloud Start
(c) 2010 Blogger Sentral. Original code by http://www.bloggersentral.com/. Please do not remove this credit and the “Make your own” link at the bottom of the code.-->
<div style="text-align:justify;line-height:1.2;">
<script type="text/javascript">
function cCloud(feed) {
max = 0;
min = 10000;
//finding highest and lowest count
for (i=0;i<feed.count;i++)
{
ccCount = feed.value.items[i].commentcount * 1;
if (ccCount > max)
{
max = ccCount;
}
if (ccCount < min)
{
min = ccCount;
}
}
ccCountD = "";
display = "";
for (j=0;j<feed.count;j++)
{
ccdiff = feed.value.items[j].commentcount - min;
ccFontsize = 80 + (ccdiff * 100) / (max - min) + "%";
ccUrl = "'" + feed.value.items[j].authorurl + "'";
ccCountD = "(" + feed.value.items[j].commentcount + ")";//comment count
ccName = feed.value.items[j].title + ccCountD;
ccLName = "<a style='font-size:" + ccFontsize + "' href=" + ccUrl + " target='_blank'>" + ccName + "</a>";//clickable commentator name
display = display + ccLName + " ";
}
document.write(display);
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://huynh-nhat-ha.blogspot.com
&Exclusions=Anonymous,Huỳnh Nhật Hà
&ShowHowMany=20 // Số người bình luận được liệt kê
&Order=alphabet
&_callback=cCloud
&_id=cfa196644e1d6159c9183548c4b5e2f5
&_render=json"
type="text/javascript"></script>
</div>
<!-- Top Commentators Cloud End -->
(c) 2010 Blogger Sentral. Original code by http://www.bloggersentral.com/. Please do not remove this credit and the “Make your own” link at the bottom of the code.-->
<div style="text-align:justify;line-height:1.2;">
<script type="text/javascript">
function cCloud(feed) {
max = 0;
min = 10000;
//finding highest and lowest count
for (i=0;i<feed.count;i++)
{
ccCount = feed.value.items[i].commentcount * 1;
if (ccCount > max)
{
max = ccCount;
}
if (ccCount < min)
{
min = ccCount;
}
}
ccCountD = "";
display = "";
for (j=0;j<feed.count;j++)
{
ccdiff = feed.value.items[j].commentcount - min;
ccFontsize = 80 + (ccdiff * 100) / (max - min) + "%";
ccUrl = "'" + feed.value.items[j].authorurl + "'";
ccCountD = "(" + feed.value.items[j].commentcount + ")";//comment count
ccName = feed.value.items[j].title + ccCountD;
ccLName = "<a style='font-size:" + ccFontsize + "' href=" + ccUrl + " target='_blank'>" + ccName + "</a>";//clickable commentator name
display = display + ccLName + " ";
}
document.write(display);
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://huynh-nhat-ha.blogspot.com
&Exclusions=Anonymous,Huỳnh Nhật Hà
&ShowHowMany=20 // Số người bình luận được liệt kê
&Order=alphabet
&_callback=cCloud
&_id=cfa196644e1d6159c9183548c4b5e2f5
&_render=json"
type="text/javascript"></script>
</div>
<!-- Top Commentators Cloud End -->
Trong đoạn code trên, bạn cần thay huynh-nhat-ha thành tên blogspot của bạn và thay Huỳnh Nhật Hà thành tên hoặc nickname của bạn. Ở dòng &Exclusions=, liệt kê nickname mà bạn không muốn hiển thị trong tiện ích này, phân cách giữa các tên bằng dấu phẩy (,) và không chứa khoảng trống. Dòng &Order=alphabet biểu thị danh sách theo thứ tự bảng chữ cái, nếu muốn danh sách theo tần số thì sử dụng &Order=frequency.
Nếu bạn sử dụng Hệ thống nhận xét Disqus thì có thể sử dụng tiện ích Top Commentators của Disqus. Tiện ích này có hiển thị Avatar cho người bình luận.
Top Commentators
-
Huỳnh Nhật Hà
· 44 posts
-
nguyen_libra
· 7 posts
-
hoang lee
· 3 posts
-
ViệtEnter
· 3 posts
-
bennobi
· 3 posts
-
Tan Dat
· 2 posts
-
Blog C.F
· 1 post
Để cài đặt tiện ích này bạn chỉ cần đặt code bên dưới vào một tiện ích HTML/JavaScript khi thiết kế trong Blogger của bạn.
<div id="topcommenters" class="dsq-widget">
<script type="text/javascript" src="http://huynh-nhat-ha.disqus.com/top_commenters_widget.js?num_items=10&hide_mods=0&hide_avatars=0&avatar_size=32"></script>
</div>
<script type="text/javascript" src="http://huynh-nhat-ha.disqus.com/top_commenters_widget.js?num_items=10&hide_mods=0&hide_avatars=0&avatar_size=32"></script>
</div>
Trong đoạn code trên, bạn cần thay huynh-nhat-ha bằng shortname khi bạn đăng ký tài khoản Disqus."; /* */
Khuyến khích người đọc để lại nhận xét, bình luận trên blog của bạn là một cách cải thiện lượng truy cập (traffic) cho blog. Và không có cách nào khuyến khích người đọc bình luận tốt hơn cách để tên hay nickname của họ được hiển thị trên blog của bạn. Tiện ích Top những người bình luận (Top Commentators) sẽ thực hiện điều đó một cách hiệu quả. Nó sẽ hiển thị danh sách những người bình luận nhiều nhất với liên kết đến hồ sơ của họ.
Dựa trên code trong tiện ích Top Commentators của Googlesystem và sự giúp đỡ của Hunlock.com, Greenlava tại Bloggersentral.com đã tạo ra tiện ích Top Commentators với sự hỗ trợ của Yahoo pipe, theo 2 kiểu, một kiểu theo list dọc (Kiểu 1) và một kiểu theo dạng đám mây (Kiểu 2).
Dưới đây là Demo cho Kiểu 1.
Để cài đặt tiện ích này bạn chỉ cần đặt code bên dưới vào một tiện ích HTML/JavaScript khi thiết kế trong Blogger của bạn.
Trong đoạn code trên, bạn cần thay huynh-nhat-ha thành tên blogspot của bạn và thay Huỳnh Nhật Hà thành tên hoặc nickname của bạn. Ở dòng ExcludedNick2 =, bạn có thể thêm nickname của người bình luận mà bạn không muốn được liệt vào tiện ích (đương nhiên tên hay nickname của bạn cũng không được liệt vào đây và nickname Anonymous cũng được loại ra về mặc định nên không cần thêm vào).
Dưới đây là Demo cho Kiểu 2.
Để cài đặt tiện ích này bạn chỉ cần đặt code bên dưới vào một tiện ích HTML/JavaScript khi thiết kế trong Blogger của bạn.
Trong đoạn code trên, bạn cần thay huynh-nhat-ha thành tên blogspot của bạn và thay Huỳnh Nhật Hà thành tên hoặc nickname của bạn. Ở dòng &Exclusions=, liệt kê nickname mà bạn không muốn hiển thị trong tiện ích này, phân cách giữa các tên bằng dấu phẩy (,) và không chứa khoảng trống. Dòng &Order=alphabet biểu thị danh sách theo thứ tự bảng chữ cái, nếu muốn danh sách theo tần số thì sử dụng &Order=frequency.
Nếu bạn sử dụng Hệ thống nhận xét Disqus thì có thể sử dụng tiện ích Top Commentators của Disqus. Tiện ích này có hiển thị Avatar cho người bình luận.
Để cài đặt tiện ích này bạn chỉ cần đặt code bên dưới vào một tiện ích HTML/JavaScript khi thiết kế trong Blogger của bạn.
Trong đoạn code trên, bạn cần thay huynh-nhat-ha bằng shortname khi bạn đăng ký tài khoản Disqus.
Dựa trên code trong tiện ích Top Commentators của Googlesystem và sự giúp đỡ của Hunlock.com, Greenlava tại Bloggersentral.com đã tạo ra tiện ích Top Commentators với sự hỗ trợ của Yahoo pipe, theo 2 kiểu, một kiểu theo list dọc (Kiểu 1) và một kiểu theo dạng đám mây (Kiểu 2).
Dưới đây là Demo cho Kiểu 1.
Top 20 Commentators
<!-- Top commentators widget v1 Start -->
<script type="text/javascript">
function getYpipe(feed) {
document.write('<ol>');
var i;
for (i = 0; i < feed.count ; i++)
{
var href = "'" + feed.value.items[i].link + "'";
if(feed.value.items[i].link == "")
var item ="<li>" + feed.value.items[i].title + "</li>";
else
var item = "<li>" + "<a href="+ href + '" target="_blank">' + feed.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write('</ol>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://huynh-nhat-ha.blogspot.com
&ExcludedNick1=Huỳnh Nhật Hà
&ExcludedNick2=
&ShowHowMany=20 // Số người bình luận được liệt kê
&_callback=getYpipe
&_id=23022d7836bf2dd3c10a329feb9be26a
&_render=json"
type="text/javascript"></script>
<!-- Top commentators widget End -->
<script type="text/javascript">
function getYpipe(feed) {
document.write('<ol>');
var i;
for (i = 0; i < feed.count ; i++)
{
var href = "'" + feed.value.items[i].link + "'";
if(feed.value.items[i].link == "")
var item ="<li>" + feed.value.items[i].title + "</li>";
else
var item = "<li>" + "<a href="+ href + '" target="_blank">' + feed.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write('</ol>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://huynh-nhat-ha.blogspot.com
&ExcludedNick1=Huỳnh Nhật Hà
&ExcludedNick2=
&ShowHowMany=20 // Số người bình luận được liệt kê
&_callback=getYpipe
&_id=23022d7836bf2dd3c10a329feb9be26a
&_render=json"
type="text/javascript"></script>
<!-- Top commentators widget End -->
Trong đoạn code trên, bạn cần thay huynh-nhat-ha thành tên blogspot của bạn và thay Huỳnh Nhật Hà thành tên hoặc nickname của bạn. Ở dòng ExcludedNick2 =, bạn có thể thêm nickname của người bình luận mà bạn không muốn được liệt vào tiện ích (đương nhiên tên hay nickname của bạn cũng không được liệt vào đây và nickname Anonymous cũng được loại ra về mặc định nên không cần thêm vào).
Dưới đây là Demo cho Kiểu 2.
Top 20 Commentators
<!-- Top Commentators Cloud Start
(c) 2010 Blogger Sentral. Original code by http://www.bloggersentral.com/. Please do not remove this credit and the “Make your own” link at the bottom of the code.-->
<div style="text-align:justify;line-height:1.2;">
<script type="text/javascript">
function cCloud(feed) {
max = 0;
min = 10000;
//finding highest and lowest count
for (i=0;i<feed.count;i++)
{
ccCount = feed.value.items[i].commentcount * 1;
if (ccCount > max)
{
max = ccCount;
}
if (ccCount < min)
{
min = ccCount;
}
}
ccCountD = "";
display = "";
for (j=0;j<feed.count;j++)
{
ccdiff = feed.value.items[j].commentcount - min;
ccFontsize = 80 + (ccdiff * 100) / (max - min) + "%";
ccUrl = "'" + feed.value.items[j].authorurl + "'";
ccCountD = "(" + feed.value.items[j].commentcount + ")";//comment count
ccName = feed.value.items[j].title + ccCountD;
ccLName = "<a style='font-size:" + ccFontsize + "' href=" + ccUrl + " target='_blank'>" + ccName + "</a>";//clickable commentator name
display = display + ccLName + " ";
}
document.write(display);
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://huynh-nhat-ha.blogspot.com
&Exclusions=Anonymous,Huỳnh Nhật Hà
&ShowHowMany=20 // Số người bình luận được liệt kê
&Order=alphabet
&_callback=cCloud
&_id=cfa196644e1d6159c9183548c4b5e2f5
&_render=json"
type="text/javascript"></script>
</div>
<!-- Top Commentators Cloud End -->
(c) 2010 Blogger Sentral. Original code by http://www.bloggersentral.com/. Please do not remove this credit and the “Make your own” link at the bottom of the code.-->
<div style="text-align:justify;line-height:1.2;">
<script type="text/javascript">
function cCloud(feed) {
max = 0;
min = 10000;
//finding highest and lowest count
for (i=0;i<feed.count;i++)
{
ccCount = feed.value.items[i].commentcount * 1;
if (ccCount > max)
{
max = ccCount;
}
if (ccCount < min)
{
min = ccCount;
}
}
ccCountD = "";
display = "";
for (j=0;j<feed.count;j++)
{
ccdiff = feed.value.items[j].commentcount - min;
ccFontsize = 80 + (ccdiff * 100) / (max - min) + "%";
ccUrl = "'" + feed.value.items[j].authorurl + "'";
ccCountD = "(" + feed.value.items[j].commentcount + ")";//comment count
ccName = feed.value.items[j].title + ccCountD;
ccLName = "<a style='font-size:" + ccFontsize + "' href=" + ccUrl + " target='_blank'>" + ccName + "</a>";//clickable commentator name
display = display + ccLName + " ";
}
document.write(display);
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?
YourBlogUrl=http://huynh-nhat-ha.blogspot.com
&Exclusions=Anonymous,Huỳnh Nhật Hà
&ShowHowMany=20 // Số người bình luận được liệt kê
&Order=alphabet
&_callback=cCloud
&_id=cfa196644e1d6159c9183548c4b5e2f5
&_render=json"
type="text/javascript"></script>
</div>
<!-- Top Commentators Cloud End -->
Trong đoạn code trên, bạn cần thay huynh-nhat-ha thành tên blogspot của bạn và thay Huỳnh Nhật Hà thành tên hoặc nickname của bạn. Ở dòng &Exclusions=, liệt kê nickname mà bạn không muốn hiển thị trong tiện ích này, phân cách giữa các tên bằng dấu phẩy (,) và không chứa khoảng trống. Dòng &Order=alphabet biểu thị danh sách theo thứ tự bảng chữ cái, nếu muốn danh sách theo tần số thì sử dụng &Order=frequency.
Nếu bạn sử dụng Hệ thống nhận xét Disqus thì có thể sử dụng tiện ích Top Commentators của Disqus. Tiện ích này có hiển thị Avatar cho người bình luận.
Top Commentators
-
Huỳnh Nhật Hà
· 44 posts
-
nguyen_libra
· 7 posts
-
hoang lee
· 3 posts
-
ViệtEnter
· 3 posts
-
bennobi
· 3 posts
-
Tan Dat
· 2 posts
-
Blog C.F
· 1 post
Để cài đặt tiện ích này bạn chỉ cần đặt code bên dưới vào một tiện ích HTML/JavaScript khi thiết kế trong Blogger của bạn.
<div id="topcommenters" class="dsq-widget">
<script type="text/javascript" src="http://huynh-nhat-ha.disqus.com/top_commenters_widget.js?num_items=10&hide_mods=0&hide_avatars=0&avatar_size=32"></script>
</div>
<script type="text/javascript" src="http://huynh-nhat-ha.disqus.com/top_commenters_widget.js?num_items=10&hide_mods=0&hide_avatars=0&avatar_size=32"></script>
</div>
Trong đoạn code trên, bạn cần thay huynh-nhat-ha bằng shortname khi bạn đăng ký tài khoản Disqus.
Bạn đã xem chưa
- Tạo phần Comments Block riêng cho một trang riêng biệt
- Tạo màu nền xen kẽ cho nhận xét
- Thủ thuật yêu cầu: Ẩn nhận xét của Nặc danh
- Gắn tem admin và visitor cho người nhận xét
- Tạo số đếm khi trang bài viết có hơn 200 nhận xét
- Tạo khung nội quy nhận xét đóng tự động
- Ẩn nhận xét cho một trang nhất định
- Khắc phục lỗi lặp nội dung do đánh chỉ mục Comments
- Ẩn nhận xét của người nhận xét không URL
- Một cách mới để ẩn nhận xét đã bị xóa
- Tùy biến nhận xét đã bị tác giả xóa
- Ẩn nội dung nhận xét của người nhận xét không URL
- Ẩn nội dung nhận xét của Nặc danh
- Ẩn nhận xét đã bị xóa và thống kê lại nhận xét
- Tùy biến Comments Block cho blogspot
- Tùy biến Comment Form sao cho đẹp
- Chỉ định liên kết đến trang giới thiệu cho người nhận xét là Admin
- Làm nổi bật nhận xét của Admin
- Khắc phục sự cố không hiển thị Comment Form
- Tạo nút Reply cho nhận xét Blogger
- Hệ thống nhận xét Disqus trên các trang tĩnh (static page)
0 nhận xét | Viết lời bình