Sunday, 1 June 2014

RECENT POST WIDGET AUTO

RECENT POST WIDGET AUTO



---------------------------------------------------------------------------------------------------------

  1. ADD HTML/JAVA WIDGET
  2. COPY AND PASTE BELOW CODE IN THIS WIDGET

---------------------------------------------------------------------------------------------------------


<style type='text/css'>
ul.recntpst,ul.recntpst li,ul.rcomnetxx,ul.rcomnetxx li{list-style:none;padding:0;margin:0;overflow:hidden}
ul.recntpst .thumbp,ul.rcomnetxx .kmtimg{float:left;margin:0 5px 3px 0}
ul.recntpst strong,ul.rcomnetxx strong{display:block}
ul.recntpst p,ul.rcomnetxx p{margin:5px 0 10px}
ul.recntpst .date,ul.recntpst .cm,ul.rcomnetxx .date{font-size:10px}
ul.rcomnetxx .dd,ul.rcomnetxx .dm,ul.rcomnetxx .dy{margin-right:3px}
ul.recntpst .cm{padding-left:5px;border-left:1px solid #969191}
</style>

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js' type='text/javascript'></script>

<div id="recentpostxx"></div>


<script type='text/javascript'>
//<![CDATA[

$(document).ready(function () {
rccpostsx({
numpostx:4,
id_cintainrp:"#recentpostxx",
cmtext:"Comments",
thumbSize:60,
contjumlah:100
});
});

window.rccpostsx=(function(){var a=function(p){var d=p||{},i=d.url_blog||"",n=d.numpostx||5,h=d.id_cintainrp||"#rcentpost",e=d.thumbSize||40,b=d.contjumlah||100,c=d.loadingClass||"loadingxx",m=d.cmtext||"Comments",l=d.firstcmtext||"Comment",f=d.NoCmtext||"No Comment",g=d.MonthNames||["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],k=d.pBlank||"http://1.bp.blogspot.com/-htG7vy9vIAA/Tp0KrMUdoWI/AAAAAAAABAU/e7XkFtErqsU/s1600/grey.gif";$(h).addClass(c);var j=i;if(i===""){j=window.location.protocol+"//"+window.location.host}$.ajax({url:j+"/feeds/posts/default?alt=json-in-script&orderby=published&max-results="+n+"",type:"get",dataType:"jsonp",success:function(v){var y,o,w,q,A,D,z,F,x,C,E,s="",B=v.feed.entry;if(B!==undefined){s="<ul class='recntpst'>";for(var u=0;u<B.length;u++){for(var t=0;t<B[u].link.length;t++){if(B[u].link[t].rel=="alternate"){y=B[u].link[t].href;break}}for(var r=0;r<B[u].link.length;r++){if(B[u].link[r].rel=="replies"&&B[u].link[r].type=="text/html"){w=B[u].link[r].title.split(" ")[0];break}}if("content" in B[u]){A=B[u].content.$t}else{if("summary" in B[u]){A=B[u].summary.$t}else{A=""}}if("media$thumbnail" in B[u]){D=B[u].media$thumbnail.url.replace(/\/s[0-9]+\-c/g,"/s"+e+"-c")}else{D=k}if(w===0){q=' <span class="cm">'+f+"</span>"}else{if(w===1){q=' <span class="cm">'+w+" "+l+"</span>"}else{q=' <span class="cm">'+w+" "+m+"</span>"}}A=A.replace(/<\S[^>]*>/g,"");if(A.length>b){A=A.substring(0,b)+"..."}o=B[u].title.$t;z=B[u].published.$t.substring(0,10),F=z.substring(0,4),x=z.substring(5,7),C=z.substring(8,10),E=g[parseInt(x,10)-1],s+='<li><a class="thumbp" href="'+y+'" target="_blank"><img style="width:'+e+"px;height:"+e+'px;display:block" alt="'+o+'"src="'+D+'"/></a><strong><a href="'+y+'" target="_blank">'+o+'</a></strong><span class="date"><span class="dd">'+C+'</span> <span class="dm">'+E+'</span> <span class="dy">'+F+"</span></span>"+q+"<p>"+A+"</p></li>"}s+="</ul>";$(h).html(s).removeClass(c)}else{$(h).html("<span>No result!</span>").removeClass(c)}},error:function(){$(h).html("<strong>Error Loading Feed!</strong>").removeClass(c)}})};return function(b){a(b)}})();


//]]>
</script>

0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

FB Gadgets | Template Designed by Fatakat PhotosCoolBThemes.com
Code by : paid web directory

https://www.google.co.uk/search?q=site%3Ablogspot.com+fbgadgets