TUTORIAL : LETAK JUMLAH POST DAN JUMLAH KOMEN



Tak nak buang masa.
Ayuh kita belajar macam mana nak letak Jumlah Post dan Komen di dalam blog macam gambar dekat bawah nih.


1. Dashboard > Design > Add New Gadget > HTML / Java Script

2. Copy dan Paste kod kat bawah nih dalam HTML / Java Script tadi.
<center><script style="text/javascript">function totalPosts(json) {
document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
function totalComments(json) {
document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<script src=" /feeds/posts/default?alt=json-in-script&callback=totalPosts"></script>
<script src=" /feeds/comments/default?alt=json-in-script&callback=totalComments"></script></center>
Oke, done! Save, dan tengok hasilnya.


1 comment:

DISCLAIMER: Comments are welcomed. However, noted that, tasteless and insulting comments may be deleted. Any personal remarks and attacks may be deleted. The same holds true for off-topic comment. Any comments that reek of link spam or marketing messages will be deleted.

I am not responsible for the content in comments other than those made by me, or in blogs, or other online content that I may link to.</p>

Powered by Blogger.