Followers

အီးေမးလ္မွာဖတ္ခ်င္ရင္အေပၚမွာ Sign In (Menber)ဝင္ၾကပါလို႕ေတာင္းဆိုပါရေစ။ခင္မင္ေလးစားလွ်က္ေကပီသရီးမိသားစု

kp3နည္းပညာ၊၈၇၊Recent Comments ေတြကို Summariesနဲ႕လုပ္ခ်င္ရင္

ဒီေန႕က်ေနာ္တင္မယ့္ Post ေလးကေတာ့ဘေလာ့Recent Comments ေတြကို Summaries
နဲ႕လုပ္ျခင္ရင္ေပါ့ေနာ္၊သိျပီးၾကသူေတြလည္းမ်ားပါတယ္။အခုလက္ရွိသံုးတဲ့ဘေလာ့ဂါမိတ္ေဆြ
လည္းမ်ားပါတယ္၊မသိၾကေသးတဲ့သူငယ္ခ်င္းေတြရွိခဲ့ေသာ္သံုးလို႕ရေအာင္ပါ။အားလံုးကိုလည္း
အစဥ္ျမဲေလးစားလၽွက္ပါ။
ေအာက္မွာထည့္နည္းနွင့္တကြ Code

၁။ Layout.

၂။ Page Elements.

၃။ Add a Gadget.

၄။ HTML / Javascript.

<ul style="font-style: italic;"><script style="text/javascript
">
function showrecentcomments(json) {
for (var i = 0; i < 20; i++) {
var entry = json.feed.entry[i];
var ctlink;

if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
ctlink = entry.link[k].href;
break;
}
}
ctlink = ctlink.replace("#", "#comment-");
var ptlink = ctlink.split("#");
ptlink = ptlink[0];
var txtlink = ptlink.split("/");
txtlink = txtlink[5];
txtlink = txtlink.split(".html");
txtlink = txtlink[0];
var pttitle = txtlink.replace(/-/g," ");
pttitle = pttitle.link(ptlink);
if ("content" in entry) {
var comment = entry.content.$t;}
else
if ("summary" in entry) {
var comment = entry.summary.$t;}
else var comment = "";
var re = /<\S[^>]*>/g;
comment = comment.replace(re, "");

document.write('<li style="text-align:left">');
document.write('<a href="' + ctlink + '">' + 
entry.author[0].name.$t + '</a>');
document.write(' on ' + pttitle);
document.write('<br>');
if (comment.length < 150) {
document.write(comment + '...<a href="' + ctlink + '"> (more)
</a><br><br>');
}
else
{
comment = comment.substring(0, 150);
var quoteEnd = comment.lastIndexOf(" ");
comment = comment.substring(0, quoteEnd);
document.write(comment + '...<a href="' + ctlink + '"> (more
)</a><br><br>');
}
}
document.write('</li>');
}
</script>
<script src="http://ဘေလာ့အမည္ထည့္ပါ.blogspot.com/feeds/comments/
default?alt=json-in-script&callback=showrecentcomments">
</script></ul>


၅။Save နိုပ္လိုက္ပါ။
ဘေလာ့ဂါမိတ္ေဆြအားလံုးကိုအစဥ္ျမဲခ်စ္ခင္ေလးစားလၽွက္ kp3မိသားစု

Related Post

Reactions:

0 comments:

Post a Comment

မွတ္ခ်က္မ်ားကို စိစစ္ၿပီးမွ ေဖာ္ျပေပးမည္ ျဖစ္ပါသျဖင့္ ဤစာမ်က္ႏွာေပၚမွာ ခ်က္ခ်င္း ျမင္ရမည္မဟုတ္ပါ။ မၾကာခင္ ေနာက္တခါ ျပန္လာၿပီး မိမိ၏ မွတ္ခ်က္ကို ျပန္ၾကည့္ပါရန္ ေမတၲာရပ္ခံပါသည္။