Page Navigation Widget Blogger


Page Navigation hack is now also available in bloggers. As you may be viewing the numbered menu widget below the posts to visit the latest or previous posts. as these widgets are only provided in wordpress blogs or hosted blogs.But now his hack has been made available in bloggers also with the help of Mohammad Rias who always come out with these hacks.

Let us see how to add this Page Navigation Menu Widget :

Login To Your Blogger And Then Click On Settings And Navigate To Layout Section.

Then Click On Edit/Html.

Now Find for ]]></b:skin> tag and place below codes before it.

.showpageArea a {
text-decoration:underline;
}
.showpageNum a {
text-decoration:none;
border: 1px solid #ccc;
margin:0 3px;
padding:3px;
}
.showpageNum a:hover {
border: 1px solid #ccc;
background-color:#ccc;
}
.showpagePoint {
color:#333;
text-decoration:none;
border: 1px solid #ccc;
background: #ccc;
margin:0 3px;
padding:3px;
}
.showpageOf {
text-decoration:none;
padding:3px;
margin: 0 3px 0 0;
}
.showpage a {
text-decoration:none;
border: 1px solid #ccc;
padding:3px;
}
.showpage a:hover {
text-decoration:none;
}
.showpageNum a:link,.showpage a:link {
text-decoration:none;
color:#333;
}

Now search for </body> and place the below codes before it.

<script style=’text/javascript’>
var pageCount=5;
var displayPageNum=2;
var upPageWord=&quot;Previous&quot;;
var downPageWord=&quot;Next&quot;;
</script>
<script type=’text/javascript’>
//<![CDATA[
var home_page_url=location.href;function showpageCount(json){var thisUrl=home_page_url;var htmlMap=new Array();var thisNum=1;var postNum=1;var itemCount=0;var fFlag=0;var eFlag=0;var html=”;var upPageHtml=”;var downPageHtml=”;for(var i=0,post;post=json.feed.entry[i];i++){var timestamp1=post.published.$t.substring(0,19)+post.published.$t.substring(23,29);timestamp=encodeURIComponent(timestamp1);var title=post.title.$t;if(title!=”){if(itemCount==0||(itemCount%pageCount==(pageCount-1))){if(thisUrl.indexOf(timestamp)!=-1){thisNum=postNum}if(title!=”)postNum++;htmlMap[htmlMap.length]=’/search?updated-max=’+timestamp+’&max-results=’+pageCount}}itemCount++}for(var p=0;p<htmlMap.length;p++){if(p>=(thisNum-displayPageNum-1)&&p<(thisNum+displayPageNum)){if(fFlag==0&&p==thisNum-2){if(thisNum==2){upPageHtml='<span class=”showpage”><a href=”/”>’+upPageWord+'</a></span>’}else{upPageHtml='<span class=”showpage”><a href=”‘+htmlMap[p]+'”>’+upPageWord+'</a></span>’}fFlag++}if(p==(thisNum-1)){html+='<span class=”showpagePoint”>’+thisNum+'</span>’}else{if(p==0){html+='<span class=”showpageNum”><a href=”/”>1</a></span>’}else{html+='<span class=”showpageNum”><a href=”‘+htmlMap[p]+'”>’+(p+1)+'</a></span>’}}if(eFlag==0&&p==thisNum){downPageHtml='<span class=”showpage”> <a href=”‘+htmlMap[p]+'”>’+downPageWord+'</a></span>’;eFlag++}}}if(thisNum>1){html=”+upPageHtml+’ ‘+html+’ ‘}html='<div class=”showpageArea”><span style=”COLOR: #000;” class=”showpageOf”> Pages (‘+(postNum-1)+’)</span>’+html;if(thisNum<(postNum-1)){html+=downPageHtml}if(postNum==1)postNum++;html+='</div>’;var pageArea=document.getElementsByName(“pageArea”);var blogPager=document.getElementById(“blog-pager”);if(postNum<=2){html=”}for(var p=0;p<pageArea.length;p++){pageArea[p].innerHTML=html}if(pageArea&&pageArea.length>0){html=”}if(blogPager){blogPager.innerHTML=html}}function showpageCount2(json){var thisUrl=home_page_url;var htmlMap=new Array();var isLablePage=thisUrl.indexOf(“/search/label/”)!=-1;var thisLable=isLablePage?thisUrl.substr(thisUrl.indexOf(“/search/label/”)+14,thisUrl.length):””;thisLable=thisLable.indexOf(“?”)!=-1?thisLable.substr(0,thisLable.indexOf(“?”)):thisLable;var thisNum=1;var postNum=1;var itemCount=0;var fFlag=0;var eFlag=0;var html=”;var upPageHtml=”;var downPageHtml=”;var labelHtml='<span class=”showpageNum”><a href=”/search/label/’+thisLable+’?&max-results=’+pageCount+'”>’;var thisUrl=home_page_url;for(var i=0,post;post=json.feed.entry[i];i++){var timestamp1=post.published.$t.substring(0,19)+post.published.$t.substring(23,29);timestamp=encodeURIComponent(timestamp1);var title=post.title.$t;if(title!=”){if(itemCount==0||(itemCount%pageCount==(pageCount-1))){if(thisUrl.indexOf(timestamp)!=-1){thisNum=postNum}if(title!=”)postNum++;htmlMap[htmlMap.length]=’/search/label/’+thisLable+’?updated-max=’+timestamp+’&max-results=’+pageCount}}itemCount++}for(var p=0;p<htmlMap.length;p++){if(p>=(thisNum-displayPageNum-1)&&p<(thisNum+displayPageNum)){if(fFlag==0&&p==thisNum-2){if(thisNum==2){upPageHtml=labelHtml+upPageWord+'</a></span>’}else{upPageHtml='<span class=”showpage”><a href=”‘+htmlMap[p]+'”>’+upPageWord+'</a></span>’}fFlag++}if(p==(thisNum-1)){html+='<span class=”showpagePoint”>’+thisNum+'</span>’}else{if(p==0){html=labelHtml+’1</a></span>’}else{html+='<span class=”showpageNum”><a href=”‘+htmlMap[p]+'”>’+(p+1)+'</a></span>’}}if(eFlag==0&&p==thisNum){downPageHtml='<span class=”showpage”> <a href=”‘+htmlMap[p]+'”>’+downPageWord+'</a></span>’;eFlag++}}}if(thisNum>1){if(!isLablePage){html=”+upPageHtml+’ ‘+html+’ ‘}else{html=”+upPageHtml+’ ‘+html+’ ‘}}html='<div class=”showpageArea”><span style=”COLOR: #000;” class=”showpageOf”> Pages (‘+(postNum-1)+’)</span>’+html;if(thisNum<(postNum-1)){html+=downPageHtml}if(postNum==1)postNum++;html+='</div>’;var pageArea=document.getElementsByName(“pageArea”);var blogPager=document.getElementById(“blog-pager”);if(postNum<=2){html=”}for(var p=0;p<pageArea.length;p++){pageArea[p].innerHTML=html}if(pageArea&&pageArea.length>0){html=”}if(blogPager){blogPager.innerHTML=html}}var thisUrl=home_page_url;if(thisUrl.indexOf(“/search/label/”)!=-1){if(thisUrl.indexOf(“?updated-max”)!=-1){var lblname1=thisUrl.substring(thisUrl.indexOf(“/search/label/”)+14,thisUrl.indexOf(“?updated-max”))}else{var lblname1=thisUrl.substring(thisUrl.indexOf(“/search/label/”)+14,thisUrl.indexOf(“?&max”))}}var home_page=”/”;if(thisUrl.indexOf(“?q=”)==-1&&thisUrl.indexOf(“.html”)==-1){if(thisUrl.indexOf(“/search/label/”)==-1){document.write(‘<script src=”‘+home_page+’feeds/posts/summary?alt=json-in-script&callback=showpageCount&max-results=99999″ ></script>’)}else{document.write(‘<script src=”‘+home_page+’feeds/posts/full/-/’+lblname1+’?alt=json-in-script&callback=showpageCount2&max-results=99999″ ></script>’)}}
//]]>
</script>

In the above code you can find the below written word and can change its value from 5 to any you want.

1 : var pageCount=5;

*where 5 is the the number of post that apppear in another page you will visit.

2: var displayPageNum=2;

*This code determines the number of additional page navigation numbers that will be displayed on the page.

If you didn’t liked its look try out the another numbered page navigation Widget.

49 Comments

  1. Bariski November 6, 2008
  2. Anshul November 14, 2008
  3. sop December 10, 2008
  4. Thank you December 19, 2008
  5. jib December 23, 2008
  6. Richmond February 5, 2009
  7. james February 23, 2009
  8. Anshul February 24, 2009
  9. Dreak March 13, 2009
  10. Anshul March 16, 2009
  11. Anonymous March 17, 2009
  12. Ev.L April 3, 2009
  13. Anshul April 3, 2009
  14. Only Messages April 4, 2009
  15. Ev.L April 4, 2009
  16. Rajesh Kumar.Chekuri May 9, 2009
  17. blogger May 19, 2009
  18. Anshul May 19, 2009
  19. ian June 6, 2009
  20. bombsouthwales June 9, 2009
  21. Text Messages June 11, 2009
  22. Vidbird June 21, 2009
  23. Latest You Want July 3, 2009
  24. ravi July 17, 2009
  25. jeyaganesh July 24, 2009
  26. Vijayant Katyal August 2, 2009
  27. Owner August 10, 2009
  28. Antonina August 30, 2009
  29. Skanda September 6, 2009
  30. IshaMayrub September 10, 2009
  31. flowers September 23, 2009
  32. Abu Farhan September 24, 2009
  33. Joe December 9, 2009
  34. Abu Farhan December 11, 2009
  35. izzreen December 17, 2009
  36. esydownloads January 11, 2010
  37. Anshul January 12, 2010
  38. Esydownloads January 12, 2010
  39. Anshul January 12, 2010
  40. Esydownloads January 12, 2010
  41. Malhaar Kale August 29, 2010
  42. Sanskar Shrivastava August 31, 2010
  43. wereintergalactic September 1, 2010
  44. wereintergalactic September 1, 2010
  45. iScreeneer November 16, 2010
  46. JD July 3, 2011
  47. prathaap srk November 29, 2011

Leave a Reply