Gadget For Blogger แก็ดเจ็ท บทความล่าสุด สำหรับบล็อกเกอร์





<style type="text/css"></style><br /><script><br/>function showrecentpostswiththumbs(json) {document.write('<ul class="recent_posts_with_thumbs">'); for (var i = 0; i < numposts; i++) {var entry = json.feed.entry[i];var posttitle = entry.title.$t;var posturl;if (i == json.feed.entry.length) break;for (var k = 0; k < entry.link.length;k++){<br/><br/>if(entry.link[k].rel=='replies'&&entry.link[k].type=='text/html'){var commenttext=entry.link[k].title;var commenturl=entry.link[k].href;}<br/>if (entry.link[k].rel == 'alternate') {posturl = entry.link[k].href;break;}}var thumburl;try {thumburl=entry.media$thumbnail.url;}catch (error)<br/><br/>{<br/>s=entry.content.$t;a=s.indexOf("<img");b=s.indexOf("src=\"",a);c=s.indexOf("\"",b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")){<br/>thumburl=d;} else thumburl='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgygCeyEsGck6_WghM0zQ39_zsvpOMjH6Pg1j8oCaWD1CzUnmqCcXX7EKINHUmmMojt_pR2oen83bTNdS4uavTvWZYQ7159jI7C32vN2ff5swYMMG1YQJkFntNhJw6z9X1NrFoTuxU5808/s72/no-image-available.png';<br/>}<br/><br/>var postdate = entry.published.$t;var cdyear = postdate.substring(0,4);var cdmonth = postdate.substring(5,7);var cdday = postdate.substring(8,10);var monthnames = new Array();monthnames[1] = "Jan";monthnames[2] = "Feb";monthnames[3] = "Mar";monthnames[4] = "Apr";monthnames[5] = "May";monthnames[6] = "Jun";monthnames[7] = "Jul";monthnames[8] = "Aug";monthnames[9] = "Sep";monthnames[10] = "Oct";monthnames[11] = "Nov";monthnames[12] = "Dec";document.write('<li class="clearfix">');<br/><br/>if(showpostthumbnails==true)<br/>document.write('<img class="recent_thumb" src="'+thumburl+'"/ / />');<br/>document.write('<b><a href="'+posturl+'" target ="_top">'+posttitle+'</a></b><br />');<br/><br/>    if ("content" in entry) {<br/>      var postcontent = entry.content.$t;}<br/>    else<br/>    if ("summary" in entry) {<br/>      var postcontent = entry.summary.$t;}<br/>    else var postcontent = "";<br/>    var re = /<\S[^>]*>/g;<br/>    postcontent = postcontent.replace(re, "");<br/><br/>if (showpostsummary == true) {<br/><br/>      if (postcontent.length < numchars) {<br/>          document.write('<i>');<br/>         document.write(postcontent);<br/>          document.write('</i>');}<br/>      else {<br/>          document.write('<i>');<br/>         postcontent = postcontent.substring(0, numchars);<br/>         var quoteEnd = postcontent.lastIndexOf(" ");<br/>         postcontent = postcontent.substring(0,quoteEnd);<br/>         document.write(postcontent + '...');<br/>          document.write('</i>');}<br/>}<br/><br/>var towrite='';var flag=0;<br/>document.write('<br /><strong>');<br/><br/>if(showpostdate==true) {towrite=towrite+monthnames[parseInt(cdmonth,10)]+'-'+cdday+' - '+cdyear;flag=1;}<br/><br/>if(showcommentnum==true)<br/>{<br/>if (flag==1) {towrite=towrite+' | ';}<br/>if(commenttext=='1 Comments') commenttext='1 Comment';<br/>if(commenttext=='0 Comments') commenttext='No Comments';<br/>commenttext = '<a href="'+commenturl+'" target ="_top">'+commenttext+'</a>';<br/>towrite=towrite+commenttext;<br/>flag=1;<br/>;<br/>}<br/><br/>if(displaymore==true)<br/>{<br/>if (flag==1) towrite=towrite+' | ';<br/>towrite=towrite+'<a href="'+posturl+'" class="url" target ="_top">More -></a>';<br/>flag=1;<br/>;<br/>}<br/><br/>document.write(towrite);<br/><br/>document.write('</strong></li>');<br/>if(displayseparator==true)<br/>if (i!=(numposts-1))<br/>document.write('<hr size=0.5>');<br/>}document.write('</ul>');<br/>}<br/><br/></script><br /><script><br/>var numposts = 5;<br/>var showpostthumbnails = true;<br/>var displaymore = true;<br/>var displayseparator = true;<br/>var showcommentnum = true;<br/>var showpostdate = true;<br/>var showpostsummary = true;<br/>var numchars = 100;</script><br /><script src="http://9tortae.blogspot.com/feeds/posts/default?orderby=published&amp;alt=json-in-script&amp;callback=showrecentpostswiththumbs"><br/></script>


ตัวหนังสือสีแดงๆ เลข 5 คือ จำนวนโพสต์ที่จะแสดง

http://9tortae.blogspot.com/  เปลี่ยนเป็นเว็บของท่านครับ

ให้นำโค้ดไปวางที่ Gadget > HTML/JAVAScript นะครับบบบบ