Showing posts with label Blogger Tutorial. Show all posts
Showing posts with label Blogger Tutorial. Show all posts

Thursday, July 22, 2010

How To Create Scrolling Popular Post

0 comments
If previously Latest Post blog featuring dozens or hundreds of the most popular posts but have not completed the scroll box scroll bar alias definitely the result will be long, so a bit short, looks simple, not heavy and not terrible you should use this way:
Copy the following code:
<div style="overflow:auto;width:300px;height:100px;padding:10px;border:1px solid #eee">

<script language='javascript'>
aBold = true;
numposts=200;
maxshowresult=10;
home_page = "http://mfaroz.blogspot.com/";
</script>
<script language="JavaScript" type="text/JavaScript">
var postTitlear=new Array();var postUrlar=new Array();var postCommentar=new Array();var totalpost;document.write("<ul>");function showrecentposts(j){var a=j.feed.entry.length;totalpost=a;for(var f=0;f<a;f++){var h=j.feed.entry[f];var c=h.title.$t;var b;var g;if(f==j.feed.entry.length){break}for(var d=0;d<h.link.length;d++){if(h.link[d].rel=="alternate"){g=h.link[d].href;break}}for(var d=0;d<h.link.length;d++){if(h.link[d].rel=="replies"&&h.link[d].type=="text/html"){b=h.link[d].title.split(" ")[0];break}}c=(aBold)?"<b>"+c+"</b>":c;postTitlear.push(c);postUrlar.push(g);postCommentar.push(b)}sortPosts();for(var f=0;f<maxshowresult;f++){var e='<li><a href="'+postUrlar[f]+'" class="recent-link">'+postTitlear[f]+" ("+postCommentar[f]+" comments)</a>";document.write(e)}}function sortPosts(){function c(d,f){var e=postTitlear[d];postTitlear[d]=postTitlear[f];postTitlear[f]=e;var e=postUrlar[d];postUrlar[d]=postUrlar[f];postUrlar[f]=e;var e=postCommentar[d];postCommentar[d]=postCommentar[f];postCommentar[f]=e}for(var b=0;b<postTitlear.length-1;b++){for(var a=b+1;a<postTitlear.length;a++){if(parseInt(postCommentar[b])<parseInt(postCommentar[a])){c(b,a)}}}}document.write('<script src="'+home_page+"feeds/posts/default?max-results="+numposts+'&orderby=published&alt=json-in-script&callback=showrecentposts"><\/script>');
</script>

</div> 





According to Red Change Color Size All you needBlue color shows the number of posts you want to display ..Save Template and View Results.
Good luck

How To Create Scrolling Recent Post

0 comments
Scroll Box is often found on blogs, serves to save space on the blog so that page views are not too long, as in posting a few months ago entitled Adding a Scroll Box In Blogger with examples of the display as follows:


How to create a scrolling bar / Box Scroll by Title Recent Post on Blogger.
Ok is that so, follow these easy steps below:


Blogger Login>> Dashboard>> Layout>> Add Gadget>> HTML Script
Copy Code Here:


<div style="overflow:auto;width:300px;height:200px;padding:10px;border:1px solid #eee">
 
<script language="JavaScript" src="http://feed2js.org//feed2js.php?src=http%3A%2F%2Fwww.yourblog.blogspot.com%2Ffeeds%2Fposts%2Fdefault&amp;num=10" type="text/javascript"></script>

</div>

Remember to replace your blog with your.blogspot.comBlue Color = The number of posts you want displayed300 = width BoxScroll size200 = high Scroll Box size
10   = 
the number of posts to be displayed 

Good luck
Related Posts Plugin for WordPress, Blogger...