Friday, 30 May 2014
RECENT AND RANDOM POST WIDGETS


--------------------------------------------------------------------------------------------------
RECENT POST CODE:
- ADD HTML/JAVA WIDGET AND PASTE BELOW CODE
---------------------------------------------------------------------------------------------------
<style type='text/css'>
#recent-posts img{float:left;margin-right:10px;border:1px solid #999;background:#FFF;width:36px;height:36px;padding:3px}
</style>
<div id='recent-posts'>
<script type='text/javaScript'>
var rcp_numposts=5;
var rcp_snippet_length=150;
var rcp_info='yes';
var rcp_comment='Comments';
var rcp_disable='Turn off comments';
function recent_posts(json){var dw='';a=location.href;y=a.indexOf('?m=0');dw+='<ul>';for(var i=0;i<rcp_numposts;i++){var entry=json.feed.entry[i];var rcp_posttitle=entry.title.$t;if('content'in entry){var rcp_get_snippet=entry.content.$t}else{if('summary'in entry){var rcp_get_snippet=entry.summary.$t}else{var rcp_get_snippet="";}};rcp_get_snippet=rcp_get_snippet.replace(/<[^>]*>/g,"");if(rcp_get_snippet.length<rcp_snippet_length){var rcp_snippet=rcp_get_snippet}else{rcp_get_snippet=rcp_get_snippet.substring(0,rcp_snippet_length);var space=rcp_get_snippet.lastIndexOf(" ");rcp_snippet=rcp_get_snippet.substring(0,space)+"…";};for(var j=0;j<entry.link.length;j++){if('thr$total'in entry){var rcp_commentsNum=entry.thr$total.$t+' '+rcp_comment}else{rcp_commentsNum=rcp_disable};if(entry.link[j].rel=='alternate'){var rcp_posturl=entry.link[j].href;if(y!=-1){rcp_posturl=rcp_posturl+'?m=0'}var rcp_postdate=entry.published.$t;if('media$thumbnail'in entry){var rcp_thumb=entry.media$thumbnail.url}else{rcp_thumb="http://1.bp.blogspot.com/-F9gb64Mlbq0/UOc8eRKL3sI/AAAAAAAACms/DEXj7UWLbkg/s000/no-image.png"};}};dw+='<li>';dw+='<img alt="'+rcp_posttitle+'" src="'+rcp_thumb+'"/>';dw+='<div><a href="'+rcp_posturl+'" rel="nofollow" title="'+rcp_snippet+'">'+rcp_posttitle+'</a></div>';if(rcp_info=='yes'){dw+='<span>'+rcp_postdate.substring(8,10)+'/'+rcp_postdate.substring(5,7)+'/'+rcp_postdate.substring(0,4)+' - '+rcp_commentsNum+'</span>';};dw+='<div style="clear:both"></div></li>';};dw+='</ul>';document.getElementById('recent-posts').innerHTML=dw;};document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&max-results='+rcp_numposts+'&callback=recent_posts\"><\/script>');
</script>
</div>
--------------------------------------------------------------------------------------------------
RANDOM POST CODE:
- ADD HTML/JAVA WIDGET AND PASTE BELOW CODE
---------------------------------------------------------------------------------------------------
<style type='text/css'>
#random-posts img{float:left;margin-right:10px;border:1px solid #999;background:#FFF;width:36px;height:36px;padding:3px}
</style>
<ul id='random-posts'>
<script type='text/javaScript'>
var rdp_numposts=5;
var rdp_snippet_length=150;
var rdp_info='yes';
var rdp_comment='Comments';
var rdp_disable='Turn off comments';
var rdp_current=[];var rdp_total_posts=0;var rdp_current=new Array(rdp_numposts);function totalposts(json){rdp_total_posts=json.feed.openSearch$totalResults.$t}document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&max-results=0&callback=totalposts\"><\/script>');function getvalue(){for(var i=0;i<rdp_numposts;i++){var found=false;var rndValue=get_random();for(var j=0;j<rdp_current.length;j++){if(rdp_current[j]==rndValue){found=true;break}};if(found){i--}else{rdp_current[i]=rndValue}}};function get_random(){var ranNum=1+Math.round(Math.random()*(rdp_total_posts-1));return ranNum};
</script>
<script type='text/javaScript'>
function random_posts(json){a=location.href;y=a.indexOf('?m=0');for(var i=0;i<rdp_numposts;i++){var entry=json.feed.entry[i];var rdp_posttitle=entry.title.$t;if('content'in entry){var rdp_get_snippet=entry.content.$t}else{if('summary'in entry){var rdp_get_snippet=entry.summary.$t}else{var rdp_get_snippet="";}};rdp_get_snippet=rdp_get_snippet.replace(/<[^>]*>/g,"");if(rdp_get_snippet.length<rdp_snippet_length){var rdp_snippet=rdp_get_snippet}else{rdp_get_snippet=rdp_get_snippet.substring(0,rdp_snippet_length);var space=rdp_get_snippet.lastIndexOf(" ");rdp_snippet=rdp_get_snippet.substring(0,space)+"…";};for(var j=0;j<entry.link.length;j++){if('thr$total'in entry){var rdp_commentsNum=entry.thr$total.$t+' '+rdp_comment}else{rdp_commentsNum=rdp_disable};if(entry.link[j].rel=='alternate'){var rdp_posturl=entry.link[j].href;if(y!=-1){rdp_posturl=rdp_posturl+'?m=0'}var rdp_postdate=entry.published.$t;if('media$thumbnail'in entry){var rdp_thumb=entry.media$thumbnail.url}else{rdp_thumb="http://2.bp.blogspot.com/-nS7c5HXLGUk/UOc8fwTK3xI/AAAAAAAACnE/IrNlqUR2-Cs/s000/no-image.png"}}};document.write('<li>');document.write('<img alt="'+rdp_posttitle+'" src="'+rdp_thumb+'"/>');document.write('<div><a href="'+rdp_posturl+'" rel="nofollow" title="'+rdp_snippet+'">'+rdp_posttitle+'</a></div>');if(rdp_info=='yes'){document.write('<span>'+rdp_postdate.substring(8,10)+'/'+rdp_postdate.substring(5,7)+'/'+rdp_postdate.substring(0,4)+' - '+rdp_commentsNum)+'</span>'}document.write('<div style="clear:both"></div></li>')}};getvalue();for(var i=0;i<rdp_numposts;i++){document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&start-index='+rdp_current[i]+'&max-results=1&callback=random_posts\"><\/script>')};
</script>
</ul>
--------------------------------------------------------------------------------------------------
RANDOM POST CODE WITH BLOG URL BUT NO IMAGE:
- ADD HTML/JAVA WIDGET AND PASTE BELOW CODE
- COPY AND PASTE BELOW CODE
- CHANGE BLOG URL
<script type="text/javascript">
var randarray = new Array();var l=0;var flag;
var numofpost=9;function randomposts(json){
var total = parseInt(json.feed.openSearch$totalResults.$t,10);
for(i=0;i < numofpost;){flag=0;randarray.length=numofpost;l=Math.floor(Math.random()*total);for(j in randarray){if(l==randarray[j]){ flag=1;}}
if(flag==0&&l!=0){randarray[i++]=l;}}document.write('<ul>');
for(n in randarray){ var p=randarray[n];var entry=json.feed.entry[p-1];
for(k=0; k < entry.link.length; k++){if(entry.link[k].rel=='alternate'){var item = "<li>" + "<a href=" + entry.link[k].href + ">" + entry.title.$t + "</a> </li>";
document.write(item);}}
}document.write('</ul>');}
</script>
<script src="http://fbgadgets.blogspot.co.uk/feeds/posts/default?alt=json-in-script&start-index=1&max-results=1000&callback=randomposts" type="text/javascript"></script>
Related movie you might like to see :

Magento Hello World Module (Extensi...

FEATURE POST WIDGET IN BLOG

IMPORT SQL CSV FILE ON PHPMYADMIN

Direct Link Generator CODE

Direct Links to your Files on Googl...

PHP CONTACT FORM WITH CAPTCHA

ON LINE JAVA LIBRARY

GOOGLE PROJECT HOSTING

PRESTASHOP THUMBNAIL WITH HOVER EFF...

RADIO BUTTON SLIDER TO KEY FRAME SL...

RELATED POST WIDGET WITH SOCIAL WID...

NEWS TICKER BLOGGER TEMPLATES

RELATED POST WIDGET FRONT SCREEN TE...

RECAPTCHA KEY CONTCAT FORM FOR BLOG...

POPULAR POST WIDGET DIFFERENT STYLE...

ONLINE ZIP OPNER

JAVA COLOR PICKER WITH

RECENT OR FEATURED POST SLIDER AFTE...

Random/Recent/Feature Posts Button ...

Related PostWidget WithFirst Big Th...
?
+
X
Recommended for you
Loading..
Related Post for RECENT AND RANDOM POST WIDGETS
CLIP BOARD EXAMPLES CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION ---------------…
CSS AUTHOR COM Ultimate CSS Resources (CSS Tools, Frameworks, Ebooks, Snippets..) http://tools.bin63.com/css-minifier-unminifier BY PRECHU CSS Advertise Here A ser…
ONLINE CSS UNMINIFIER CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION ---------------…
SCRIPT TUTORIALS CSSO CSS COMPOSER CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION ------------…
TRANSLATE IN JAVA SCRIPT -------------------------------------------------------------------------------------------------------------------------- ENGLISH TO HINDI CODE ------------------------------…
RENAME PDF FOLDER IN PRESTASHOP ----------------------------------------------------------------------------------------------------------------- 0) BEFORE INSTALLATION CHANGE FOLDER NAME pdf To PAK 1) …
MAKE WODPRESS THEME ------------------------------------------------------------------------------------------------------------------------ MAKE AND SAVE ALL FILE ONE BY ONE IN SAME FOLDER -…
CLIP BOARD EXAMPLES CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION ----------------…
RENAME CSS FOLDER IN PRESTASHOP ----------------------------------------------------------------------------------------------------------------- 0) BEFORE INSTALLATION CHANGE FOLDER NAME css To CAT 1) BEFO…
SCRIPT TUTORIALS CSSO CSS COMPOSER #stats{font-size:22px;font-weight:bold}.wpp-comments{} .content{border-left:none!important}.syntaxhighlighter .lines.no-wrap{overflow:auto!important;overflow-y:hidden!impo…
CODE OR TEXT WRITING BOX -------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN HTML --------------------------------…
WORD PRESS PARTS -------------------------------------------------------------------------------------------------------- Read More: ----------------------------------…
RENAME CACHE FOLDER IN PRESTASHOP ----------------------------------------------------------------------------------------------------------------- 0) BEFORE INSTALLATION CHANGE FOLDER NAME cache To CASH 1) G…
HTML CSS JAVA COMPRESSOR CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION http://fbgad…
SEARCH BOX WITHOUT JAVA CODE ------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE <input id='input' name='q' placeholde…
RENAME DOCS FOLDER IN PRESTASHOP ----------------------------------------------------------------------------------------------------------------- 0) BEFORE INSTALLATION CHANGE FOLDER NAME docs To …
JavaScript Compressor Packer A JavaScript Compressor h1 { display: block; font-size: 2em; margin-top: 0.67em; margin-bottom: 0.67em; margin-left: 0; margin-right: 0; font-weight: bold;background: …
COMPRESS HTML COMPRESS HTML #content{width:500px;margin:0;padding:0;} h1 { width:500px; background: repeating-linear-gradient( 45deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 10p…
INSTALL WORD PRESS TEMPLATE Plugins are tools which provide additional functionality to your application. To install a plugin you generally just need to put the plugin file into your 'wp-content/plugins' di…
URL ENCORDER DECODER CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION bit.ly shorte…
HTML CSS JAVA COMPRESSOR Tools - CSS Compressor -FBGadgets.com fieldset { width:580px; } #main { width:580px; } input[type="text"].wide, input[type="password"].wide, textarea.wide { backgroun…
URL ENCORDER DECODER URL Decoder/Encoder !-- body {background: white; color: black;} form {margin: 0;} h1 {font-family: Arial, sans-serif; line-height: 0.85em; border-bottom: 2px solid; marg…
ONLINE CSS UNMINIFIER Online CSS Unminifier textarea{ background:url("data:image/gif;base64,R0lGODlhIAMoAOYAAP///8rPy/7+/snOysvQzMjNyfn7+cfNyN/m39bc19zo5Nfd2P3+/eTr5Nbc1s/V0MnOy8vPy+3v7v…
CLIP BOARD EXAMPLES CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION --------------…
COMMENTS REMOVER CODE ----------------------------------------------------------------------------------------------------------------- CODE: -------------------------------------------------------…
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.