Sometimes silence is a really good answer.

ဘေလာ့ဂ္မွာ Total Post and Total Comment Widget ထည့္နည္း

B log မွာ မိမိ ေရးထားတဲ႕ Post အေရးအတြက္ ၊ Comments အေရးအတြက္ ဘယ္ေလာက္ရွိတယ္ဆုိတာကုိ ေဖာ္ျပတဲ႕ Widget လုပ္လုိ႕ ရတဲ႕နည္းကုိ တင္ျပမွာျဖစ္ပါတယ္။ မိမိ ေရးထားတဲ႕ Post အေရးအတြက္နဲ႕ Comments အေရးအတြက္ကုိ ေအာက္ပါအတုိင္း တင္ျပေနတာကုိ Sidebar Widget မွာ ေတြ႕ရမွာျဖစ္ပါတယ္။( ကြၽန္ေတာ္ဆိုဒ္မွာေတာ႕ Post အေရးအတြက္ 180 နဲ႕ Comments ကေတာ႕ 0 ျဖစ္ပါတယ္။)




1. မိမိ Blog မွ Layout ကုိ click လုိက္ပါ။
2. Page Elements ကုိ click လုိက္ပါ။
3. Add a Gadget ကုိ click ျပီ HTML / JavaScript ထဲမွာ ေအာက္က code ေတြကုိ ထည္႕လုိက္ပါ။အနီေရာင္နဲ႕ ျပသထားတဲ႕ေနရာမွာ မိမိရဲ႕ Blog လိပ္စာကုိ ထည္႕လုိက္ပါ။

<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>

<ul><li><script src="http://www.knowledgewar07.co.cc/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script></li>

<li><script src="http://www.knowledgewar07.co.cc/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></li></ul>

http://www.knowledgewar07.com/search/label/Blog 

0 စာဖတ္သူတို႔စကားမ်ား:

Post a Comment

FLAG COUNTER

Tue,Sep14,2010at2:02PMတြင္Blogကုိစတင္။27.2.2011တြင္FlagCounterကုိစတင္။ Free counters!