tutorial 12 :Total post and comment

Okay .kalau korang nak tahu berapa post yg korang pernah publish and berapa comment yg pernah korang terima , sila tngok sini .
Design > Edit layout > Add a gadjet > Html javascript
and paste kod ni
<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>
<small><a href="http://tutorialuntukblog.blogspot.com/2011/01/ketahui-jumlah-post-dan-jumlah-komen.html" target="_blank"></a></small>

Okay ? Kemudian save and tngok hasil nya .
creds ; tutorial untuk blog

No comments:

Subscribe