2. Sao chép và thêm mã sau vào tiện ích HTML / JavaScript của bạn.
<script style="text/javascript">
function numberOfPosts(json) {
document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
function numberOfComments(json) {
document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<font color="#897150"><script src="http://share2vn.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://share2vn.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></font>
3. Thay thế http://share2vn.blogspot.com với tên blog của bạn trên thực tế trong mã ở trên.
4. Lưu các tiện ích và sắp xếp lại nó theo sở thích của bạn.
5. Thế là xong. Chúc bạn vui vẻ. ^_^
——————————————
How to show your live stats (total posts and comments on your blog)
1. Log in to your blogger account and navigate to Dashboard >> Layout >> Page Elements >> Add a Widget >> HTML/JavaScript
2. Copy and add the following code to your HTML/Javascript widget.
<script style="text/javascript">
function numberOfPosts(json) {
document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
function numberOfComments(json) {
document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<font color="#897150"><script src="http://share2vn.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script>
<script src="http://share2vn.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></font>
3. Replace http://share2vn.blogspot.com with your actual blog name in the above code.
4. Save the widget and rearrange it according to your preference.
5. You are Done.
