Add Page Number (with First and Last Page) Navigation Link for Blogger (Blogspot) with Gadget Element and Manual Hack添加页码(同第一页和最后一页)导航链接的Blogger (博客)与小元和手动砍
Blogger free blog publishing platform uses a pretty limited navigation features that only display “Older Posts” or “Newer Posts” link to let readers navigate and browse to other pages on homepage (index), archive, category and label pages. Blogger是免费的博客发布平台采用了相当有限的导航功能,只显示“较旧的文章”或“较新的文章”链接,让读者浏览和浏览其他网页的主页(索引) ,存档,类别和标签的网页。 Unlike WordPress blog that supports plugin to customize the page navigation link to numbered pages listing to make it more user friendly, Blogger, whether hosted on blogspot.com or custom domain does not have such flexibility.与WordPress的博客,支持插件定制网页导航链接到的网页数列,使其更加用户友好的Blogger ,无论是托管在blogspot.com或自定义域没有这种灵活性。
However, it’s still possible to change and replace the typical classic “Older Posts” and “Newer Posts” navigation link on Blogger blog to numbered pages navigation, as illustrated in figure below by using a CSS and JavaScript hack wrote by Mohamed Rias.但是,它仍然可能改变,代之以典型的经典之作“较旧的文章”和“较新的文章”导航链接Blogger博客以网页浏览人数所示,在图所示使用CSS和JavaScript写的黑客穆罕默德里亚斯。

As shown in image above, a navigation link consists of page numbers, first page, last page, next page and previous page (when applicable) is display on Blogger blog instead of the usual “Older Items” and “Newer Items” text links.如上图中,导航链接包括页码,第一页,最后一页,下一页和前一页(适用时)是显示在Blogger博客而不是通常的“旧项目”和“较新的物品”文字链接。
To add the “new” navigation link with page number to Blogger blog, simply add in a new Page Element Gadget in the Blogger.新增的“新”导航链接页面编号, Blogger博客,只需添加一个新的页面元素工具在Blogger 。 To do so, follow the guide below:为了做到这一点,按照指南如下:
- Login to登录 Blogger的Blogger account Dashboard .到控制台。
- Click on the Layout link for the blog that you want to modify (if you’re viewing the blog and logged in to Blogger or Google Account, just click on Customize on the Next Blog toolbar.点击链接布局的博客,您要修改(如果你看的博客和登录到Blogger或谷歌帐户,只需按一下定制的下一个Blog工具栏。
- Go to Page Element tab (by default). 转到页面元素标签(默认) 。
- Click on Add a Gadget anywhere in the layout.点击添加一个小地方的布局。
- In the Add a Gadget window, select HTML/JavaScript .在添加小工具窗口中,选择的HTML / JavaScript的 。
- Add the following code into the Content text field.将下面的代码添加到文本字段的内容 。 Title field can be left blank, or just type in any description such as “Page Navigation” to differentiate it from the rest of widgets.标题栏位可以留白,或者只是在任何类型的描述,如“页面导航” ,以区别于其他的小玩意。
<style>
.showpageArea { 。 showpageArea (
padding: 0 2px;margin-top:10px;margin-bottom:10px;填充: 0 2px ;利润率顶: 10px ;缘底: 10px ;
} ).showpageArea a { 。 showpageArea了一个(
border: 1px solid #505050;边界: 1px #五十○点五零五万坚实;
color: #000000;font-weight:normal;颜色: # 000000 ;字型粗细:正常;
padding: 3px 6px !important;填充: 3px 6px !重要的;
padding: 1px 4px ;margin:0px 4px;填充: 1px 4px ;保证金: 0px 4px ;
text-decoration: none;文字修饰:无;
} ).showpageArea a:hover { 。 showpageArea答:悬停(
font-size:11px;字体大小: 11px ;
border: 1px solid #333;边界: 1px固体# 333 ;
color: #000000;颜色: # 000000 ;
background-color: #FFFFFF;背景颜色: # FFFFFF ;
} ).showpageNum a { 。 showpageNum了一个(
border: 1px solid #505050;边界: 1px #五十万五千〇五十〇坚实;
color: #000000;font-weight:normal;颜色: # 000000 ;字型粗细:正常;
padding: 3px 6px !important;填充: 3px 6px !重要的;
padding: 1px 4px ;margin:0px 4px;填充: 1px 4px ;保证金: 0px 4px ;
text-decoration: none;文字修饰:无;
} ).showpageNum a:hover { 。 showpageNum答:悬停(
font-size:11px;字体大小: 11px ;
border: 1px solid #333;边界: 1px固体# 333 ;
color: #000000;颜色: # 000000 ;
background-color: #FFFFFF;背景颜色: # FFFFFF ;} )
.showpagePoint { 。 showpagePoint (
font-size:11px;字体大小: 11px ;
padding: 2px 4px 2px 4px;填充: 2px 4px 2px 4px ;
margin: 2px;保证金: 2px ;
font-weight: bold;字型粗细:大胆;
border: 1px solid #333;边界: 1px固体# 333 ;
color: #fff;颜色: #足协;
background-color: #000000;背景颜色: # 000000 ;
} ).showpage a:hover { 。 showpage答:悬停(
font-size:11px;字体大小: 11px ;
border: 1px solid #333;边界: 1px固体# 333 ;
color: #000000;颜色: # 000000 ;
background-color: #FFFFFF;背景颜色: # FFFFFF ;
} ).showpageNum a:link,.showpage a:link { 。 showpageNum答:连结, 。 showpage 1 :连结(
font-size:11px;字体大小: 11px ;
padding: 2px 4px 2px 4px;填充: 2px 4px 2px 4px ;
margin: 2px;保证金: 2px ;
text-decoration: none;文字修饰:无;
border: 1px solid #0066cc;边界: 1px # 0066cc坚实;
color: #0066cc;颜色: 0066cc # ;
background-color: #FFFFFF;}背景颜色: # FFFFFF ; ).showpageNum a:hover { 。 showpageNum答:悬停(
font-size:11px;字体大小: 11px ;
border: 1px solid #333;边界: 1px固体# 333 ;
color: #000000;颜色: # 000000 ;
background-color: #FFFFFF;背景颜色: # FFFFFF ;
} )
</style> “ /样式”<script type=”text/javascript”> <script type="text/javascript">
function showpageCount(json) {功能showpageCount ( json ) (
var thisUrl = location.href;叶thisUrl = location.href ;
var htmlMap = new Array();叶htmlMap =新的阵列( ) ;
var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==”.blogspot.com/”;叶isFirstPage = thisUrl.substring ( thisUrl.length - 14 , thisUrl.length )==". blogspot.com / “ ;
var isLablePage = thisUrl.indexOf(”/search/label/”)!=-1;叶isLablePage = thisUrl.indexOf ( “ /搜索/标签/")!=- 1 ;
var isPage = thisUrl.indexOf(”/search?updated”)!=-1;叶isPage = thisUrl.indexOf ( “ /搜索?更新")!=- 1 ;
var thisLable = isLablePage ?叶thisLable = isLablePage ? thisUrl.substr(thisUrl.indexOf(”/search/label/”)+14,thisUrl.length) : “”; thisUrl.substr ( thisUrl.indexOf ( “ /搜索/标签/ ” ) 14 , thisUrl.length ) : “ ” ;
thisLable = thisLable.indexOf(”?”)!=-1 ? thisLable = thisLable.indexOf ("?")!=- 1 ? thisLable.substr(0,thisLable.indexOf(”?”)) : thisLable; thisLable.substr ( 0 , thisLable.indexOf ("?")) : thisLable ;
var thisNum = 1; thisNum叶= 1 ;
var postNum=1;叶postNum = 1 ;
var itemCount = 0;叶itemCount = 0 ;
var fFlag = 0;叶fFlag = 0 ;
var eFlag = 0;叶eFlag = 0 ;
var html= ”;无功的HTML = “ ;
var upPageHtml =”;叶upPageHtml = “ ;
var downPageHtml =”;叶downPageHtml = “ ;var pageCount=5;叶pageCount = 5 ;
var displayPageNum=3;叶displayPageNum = 3 ;
var firstPageWord = ‘First’; firstPageWord叶= '第一' ;
var endPageWord = ‘Last’;叶endPageWord = '最后' ;
var upPageWord =’Previous’;叶upPageWord = '前' ;
var downPageWord =’Next’;叶downPageWord = '下一步' ;var labelHtml = ‘<span class=”showpageNum”><a href=”/search/label/’+thisLable+’?&max-results=’+pageCount+’”>’;叶labelHtml = ' <span class="showpageNum">的<a href="/search/label/'+thisLable+'?&max-results='+pageCount+'"> ' ;
for(var i=0, post; post = json.feed.entry[i]; i++) {为(无功字母i = 0 ,员额;后= json.feed.entry [一]我+ + ) (
var timestamp = post.published.$t.substr(0,10);叶时间戳= post.published 。 t.substr $ ( 0,10 ) ;
var title = post.title.$t;无功标题= post.title 。 $吨;
if(isLablePage){如果( isLablePage ) (
if(title!=”){如果(标题!="){
if(post.category){如果( post.category ) (
for(var c=0, post_category; post_category = post.category[c]; c++) {为(变种的C = 0 , post_category ; post_category = post.category [中] ;的C + + ) (
if(encodeURIComponent(post_category.term)==thisLable){如果( encodeURIComponent ( post_category.term ) == thisLable ) (
if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){如果( itemCount == 0 | | ( itemCount % pageCount == ( pageCount - 1 ) ) ) (
if(thisUrl.indexOf(timestamp)!=-1 ){如果( thisUrl.indexOf (时间戳) ! =- 1 ) (
thisNum = postNum; thisNum = postNum ;
} )postNum++; postNum + + ;
htmlMap[htmlMap.length] = ‘/search/label/’+thisLable+’?updated-max=’+timestamp+’T00%3A00%3A00%2B08%3A00&max-results=’+pageCount; htmlMap [ htmlMap.length ] = ' /搜索/标签/ ' + thisLable + ' ?更新的最大值= ' +时间+ ' T00 % 3A00 % 3A00 % , 2B08 % 3A00 &最大成果= ' + pageCount ;
} )
} )
} )
}//end if(post.category){ ) / /结束,如果( post.category ) (itemCount++; itemCount + + ;
} )}else{其他) (
if(title!=”){如果(标题!="){
if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){如果( itemCount == 0 | | ( itemCount % pageCount == ( pageCount - 1 ) ) ) (
if(thisUrl.indexOf(timestamp)!=-1 ){如果( thisUrl.indexOf (时间戳) ! =- 1 ) (
thisNum = postNum; thisNum = postNum ;
} )if(title!=”) postNum++;如果(标题! = “ ) postNum + + ;
htmlMap[htmlMap.length] = ‘/search?updated-max=’+timestamp+’T00%3A00%3A00%2B08%3A00&max-results=’+pageCount; htmlMap [ htmlMap.length ] = ' /搜索?更新的最大值= ' +时间+ ' T00 % 3A00 % 3A00 % , 2B08 % 3A00 &最大成果= ' + pageCount ;
} )
} )
itemCount++; itemCount + + ;
} )
} )for(var p =0;p< htmlMap.length;p++){为(叶P值0 ; p “ htmlMap.length ; p + + ) (
if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){如果( p “ = ( thisNum - displayPageNum - 1 )及标准普尔” ( thisNum + displayPageNum ) ) (
if(fFlag ==0 && p == thisNum-2){如果( fFlag == 0 &标准普尔thisNum == 2 ) (
if(thisNum==2){如果( thisNum == 2 ) (
if(isLablePage){如果( isLablePage ) (
upPageHtml = labelHtml + upPageWord +’</a></span>’; upPageHtml = labelHtml + upPageWord + “ < / 1 ” “ /跨度> ” ;
}else{其他) (
upPageHtml = ‘<span class=”showpage”><a href=”/”>’+ upPageWord +’</a></span>’; upPageHtml = ' <span class="showpage">的<a href="/"> ' + upPageWord + “ < / 1 ” “ /跨度> ” ;
} )
}else{其他) (
upPageHtml = ‘<span class=”showpage”><a href=”‘+htmlMap[p]+’”>’+ upPageWord +’</a></span>’; upPageHtml = ' <span class="showpage">的<a href="'+htmlMap[p]+'"> ' + upPageWord + “ < / 1 ” “ /跨度> ” ;
} )fFlag++; fFlag + + ;
} )if(p==(thisNum-1)){如果( p == ( thisNum - 1 ) ) (
html += ‘ <span class=”showpagePoint”><u>’+thisNum+’</u></span>’;的HTML + = ' <span class="showpagePoint">成效给予评' + thisNum + “ < / U系列” “ /跨度> ” ;
}else{其他) (
if(p==0){如果( p == 0 ) (
if(isLablePage){如果( isLablePage ) (
html = labelHtml+’1</a></span>’;的HTML = labelHtml + '1 “ / 1 ” “ /跨度> ” ;
}else{其他) (
html += ‘<span class=”showpageNum”><a href=”/”>1</a></span>’;的HTML + = ' <span class="showpageNum">的<a href="/">一日“ / 1 ” “ /跨度> ” ;
} )
}else{其他) (
html += ‘<span class=”showpageNum”><a href=”‘+htmlMap[p]+’”>’+ (p+1) +’ </a></span>’;的HTML + = ' <span class="showpageNum">的<a href="'+htmlMap[p]+'"> ' + ( p +1 ) + “ < / 1 ” “ /跨度> ” ;
} )
} )if(eFlag ==0 && p == thisNum){如果( eFlag == 0 &标准普尔== thisNum ) (
downPageHtml = ‘<span class=”showpage”> <a href=”‘+htmlMap[p]+’”>’+ downPageWord +’</a></span>’; downPageHtml = ' <span class="showpage">的<a href="'+htmlMap[p]+'"> ' + downPageWord + “ < / 1 ” “ /跨度> ” ;
eFlag++; eFlag + + ;
} )
}//end if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){ ) / /结束,如果( p “ = ( thisNum - displayPageNum - 1 )及标准普尔” ( thisNum + displayPageNum ) ) (
}//end for(var p =0;p< htmlMap.length;p++){ ) / /结束(叶P值0 ; p “ htmlMap.length , p + + ) (if(thisNum>1){如果( thisNum “ 1 ) (
if(!isLablePage){如果( ! isLablePage ) (
html = ‘<span class=”showpage”><a href=”/”>’+ firstPageWord +’ </a></span>’+upPageHtml+’ ‘+html +’ ‘;的HTML = ' <span class="showpage">的<a href="/"> ' + firstPageWord + “ < / 1 ” “ /跨度> ” + upPageHtml + ' ' +的HTML + ' ' ;
}else{其他) (
html = ”+labelHtml + firstPageWord +’ </a></span>’+upPageHtml+’ ‘+html +’ ‘;的HTML = “ + labelHtml + firstPageWord + ” < / 1 “ ” /跨度> “ + upPageHtml + ' ' +的HTML + ' ' ;
} )
} )html = ‘<div class=”showpageArea”><span style=”font-size:11px;padding: 2px 4px 2px 4px;margin: 2px 2px 2px 2px;color: #000000;border: 1px solid #333; background-color: #FFFFFF;” class=”showpage”>Page ‘+thisNum+’ of ‘+(postNum-1)+’: </span>’+html;的HTML = ' <div class="showpageArea"> “跨度风格= ”字体大小: 11px ;填充: 2px 4px 2px 4px ;保证金: 2px 2px 2px 2px ;颜色: # 000000 ;边界: 1px固体# 333 ;背景颜色: # FFFFFF ; “阶级= ” showpage “ ”页' + thisNum + '的' + ( postNum - 1 ) + ' : “ /跨度> ” +的HTML ;
if(thisNum<(postNum-1)){如果( thisNum “ ( postNum - 1 ) ) (
html += downPageHtml;的HTML + = downPageHtml ;
html += ‘<span class=”showpage”><a href=”‘+htmlMap[htmlMap.length-1]+’”> ‘+endPageWord+’</a></span>’;的HTML + = ' <span class="showpage">的<a href="'+htmlMap[htmlMap.length-1]+'"> ' + endPageWord + “ < / 1 ” “ /跨度> ” ;
} )if(postNum==1) postNum++;如果( postNum == 1 ) postNum + + ;
html += ‘</div>’;的HTML + = “ < /专区> ” ;if(isPage || isFirstPage || isLablePage){如果( isPage | | isFirstPage | | isLablePage ) (
var pageArea = document.getElementsByName(”pageArea”);叶pageArea = document.getElementsByName ( “ pageArea ” ) ;
var blogPager = document.getElementById(”blog-pager”);叶blogPager = document.getElementById ( “博客,传呼机” ) ;if(postNum <= 2){如果( postNum “ = 2 ) (
html =”;的HTML = “ ;
} )for(var p =0;p< pageArea.length;p++){为(变种P值0 ; p “ pageArea.length ; p + + ) (
pageArea[p].innerHTML = html; pageArea [ p ] 。 innerHTML =的HTML ;
} )if(pageArea&&pageArea.length>0){如果( pageArea & pageArea.length & “ 0 ) (
html =”;的HTML = “ ;
} )if(blogPager){如果( blogPager ) (
blogPager.innerHTML = html; blogPager.innerHTML的HTML = ;
} )
} )} )
</script> “ /脚本”<script src=”/feeds/posts/summary?alt=json-in-script&callback=showpageCount&max-results=99999″ type=”text/javascript”></script> <script src="/feeds/posts/summary?alt=json-in-script&callback=showpageCount&max-results=99999" type="text/javascript"> “ /脚本”
- Click Save button.点击保存按钮。
- Drag and drop the newly added HTML/JavaScript gadget to directly right below the Blog Posts element.拖放新增的HTML / JavaScript的工具,直接权利低于博客帖子内容。

- Click on Save button to make the change effective.点击保存按钮,使更改生效。
For user who don’t want to use the Page Element widget or gadget, it’s possible to manually editing the HTML file, although it’s more difficult to do and should only be tried by blogger with technical expertise.对于用户谁不想使用的网页元素部件或小工具,它能够手动编辑HTML文件,但它更困难的事,并只应受到博客的技术专长。
- Login to登录 Blogger的Blogger account Dashboard .到控制台。
- Click on the Layout link for the blog that you want to modify (if you’re viewing the blog and logged in to Blogger or Google Account, just click on Customize on the Next Blog toolbar.点击链接布局的博客,您要修改(如果你看的博客和登录到Blogger或谷歌帐户,只需按一下定制的下一个Blog工具栏。
- Go to Edit HTML tab (there is no need to expand widget templates).转到编辑HTML标签(没有必要扩大窗口小部件模板) 。
- Search for the following line:
]]></b:skin>搜索以下行:]]></b:skin> - Copy the following CSS code and paste or append the code above the line:复制以下CSS代码并粘贴或附在上面的代码行:
.showpageArea {
padding: 0 2px;margin-bottom:10px;margin-top:10px;
}.showpageArea a {
border: 1px solid #505050;
color: #000000;font-weight:normal;
padding: 3px 6px !important;
padding: 1px 4px ;margin:0px 4px;
text-decoration: none;
}.showpageArea a:hover {
font-size:11px;
border: 1px solid #333;
color: #000000;
background-color: #FFFFFF;
}.showpageNum a {
border: 1px solid #505050;
color: #000000;font-weight:normal;
padding: 3px 6px !important;
padding: 1px 4px ;margin:0px 4px;
text-decoration: none;
}.showpageNum a:hover {
font-size:11px;
border: 1px solid #333;
color: #000000;
background-color: #FFFFFF;
}.showpagePoint {
font-size:11px;
padding: 2px 4px 2px 4px;
margin: 2px;
font-weight: bold;
border: 1px solid #333;
color: #fff;
background-color: #000000;
}.showpage a:hover {
font-size:11px;
border: 1px solid #333;
color: #000000;
background-color: #FFFFFF;
}.showpageNum a:link,.showpage a:link {
font-size:11px;
padding: 2px 4px 2px 4px;
margin: 2px;
text-decoration: none;
border: 1px solid #0066cc;
color: #0066cc;
background-color: #FFFFFF;
}.showpageNum a:hover {
font-size:11px;
border: 1px solid #333;
color: #000000;
background-color: #FFFFFF;
} - Next, search for the following line of code in the template’s HTML code:其次,寻找下面的代码行中的模板的代码:
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>Note: The ‘no’ after “showaddelement” can be ‘yes’ for some bloggers.注: '不'后, “ showaddelement ”可'是'对一些博客。
- Add and append the following JavaScript code right after the </b:section> line:新增及附加以下JavaScript代码后, “ / B组:一节”行:
<script type="text/javascript"> <script type="text/javascript">
function showpageCount(json) {功能showpageCount ( json ) (
var thisUrl = location.href; thisUrl叶= location.href ;
var htmlMap = new Array();叶=新htmlMap阵列( ) ;
var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==".blogspot.com/";叶isFirstPage = thisUrl.substring ( thisUrl.length - 14 , thisUrl.length )==". blogspot.com / “ ;
var isLablePage = thisUrl.indexOf("/search/label/")!=-1;叶isLablePage = thisUrl.indexOf ( “ /搜索/标签/")!=- 1 ;
var isPage = thisUrl.indexOf("/search?updated")!=-1;叶isPage = thisUrl.indexOf ( “ /搜索?更新")!=- 1 ;
var thisLable = isLablePage ? thisLable叶= isLablePage ? thisUrl.substr(thisUrl.indexOf("/search/label/")+14,thisUrl.length) : ""; thisUrl.substr ( thisUrl.indexOf ( “ /搜索/标签/ ” ) 14 , thisUrl.length ) : “ ” ;
thisLable = thisLable.indexOf("?")!=-1 ? thisLable = thisLable.indexOf ("?")!=- 1 ? thisLable.substr(0,thisLable.indexOf("?")) : thisLable; thisLable.substr ( 0 , thisLable.indexOf ("?")) : thisLable ;
var thisNum = 1; thisNum叶= 1 ;
var postNum=1;叶postNum = 1 ;
var itemCount = 0;叶itemCount = 0 ;
var fFlag = 0;叶fFlag = 0 ;
var eFlag = 0;叶eFlag = 0 ;
var html= '';无功的HTML = '' ;
var upPageHtml ='';叶upPageHtml = '' ;
var downPageHtml ='';叶downPageHtml = '' ;var pageCount=5;叶pageCount = 5条;
var displayPageNum=3;叶displayPageNum = 3 ;
var firstPageWord = 'First'; firstPageWord叶= '第一' ;
var endPageWord = 'Last';叶endPageWord = '最后' ;
var upPageWord ='Previous';叶upPageWord = '前' ;
var downPageWord ='Next';叶downPageWord = '下一步' ;var labelHtml = '<span class="showpageNum"><a href="/search/label/'+thisLable+'?&max-results='+pageCount+'">';叶labelHtml = ' <span class="showpageNum"> “一href = ” /搜索/标签/ ' + thisLable + ' ?和最大的成果= & # 39 ; + pageCount +'">';
for(var i=0, post; post = json.feed.entry[i]; i++) {为(无功字母i = 0 ,员额;后= json.feed.entry [一]我+ + ) (
var timestamp = post.published.$t.substr(0,10);叶时间戳= post.published 。 t.substr $ ( 0,10 ) ;
var title = post.title.$t;无功标题= post.title 。 $吨;
if(isLablePage){如果( isLablePage ) (
if(title!=''){如果(标题!=''){
if(post.category){如果( post.category ) (
for(var c=0, post_category; post_category = post.category[c]; c++) {为(无功的C = 0 , post_category ; post_category = post.category [中] ;的C + + ) (
if(encodeURIComponent(post_category.term)==thisLable){如果( encodeURIComponent ( post_category.term ) == thisLable ) (
if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){如果( itemCount == 0 | | ( itemCount % pageCount == ( pageCount - 1 ) ) ) (
if(thisUrl.indexOf(timestamp)!=-1 ){如果( thisUrl.indexOf (时间戳) ! =- 1 ) (
thisNum = postNum; thisNum = postNum ;
} )postNum++; postNum + + ;
htmlMap[htmlMap.length] = '/search/label/'+thisLable+'?updated-max='+timestamp+'T00%3A00%3A00%2B08%3A00&max-results='+pageCount; htmlMap [ htmlMap.length ] = ' /搜索/标签/ ' + thisLable + ' ?更新的最大值= ' +时间+ ' T00 % 3A00 % 3A00 % 2B08 % 3A00 &最大成果= ' + pageCount ;
} )
} )
} )
}//end if(post.category){ ) / /结束,如果( post.category ) (itemCount++; itemCount + + ;
} )}else{其他) (
if(title!=''){如果(标题!=''){
if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){如果( itemCount == 0 | | ( itemCount % pageCount == ( pageCount - 1 ) ) ) (
if(thisUrl.indexOf(timestamp)!=-1 ){如果( thisUrl.indexOf (时间戳) ! =- 1 ) (
thisNum = postNum; thisNum = postNum ;
} )if(title!='') postNum++;如果(标题!='') postNum + + ;
htmlMap[htmlMap.length] = '/search?updated-max='+timestamp+'T00%3A00%3A00%2B08%3A00&max-results='+pageCount; htmlMap [ htmlMap.length ] = ' /搜索?更新的最大值= ' +时间+ ' T00 % 3A00 % 3A00 % 2B08 % 3A00 &最大成果= ' + pageCount ;
} )
} )
itemCount++; itemCount + + ;
} )
} )for(var p =0;p< htmlMap.length;p++){为(变种P值0 ; p “ htmlMap.length , p + + ) (
if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){如果( p “ = ( thisNum - displayPageNum - 1 )及标准普尔” ( thisNum + displayPageNum ) ) (
if(fFlag ==0 && p == thisNum-2){如果( fFlag == 0 &标准普尔thisNum == 2 ) (
if(thisNum==2){如果( thisNum == 2 ) (
if(isLablePage){如果( isLablePage ) (
upPageHtml = labelHtml + upPageWord +'</a></span>'; upPageHtml = labelHtml + upPageWord + “ < / 1 ” “ /跨度> ” ;
}else{其他) (
upPageHtml = '<span class="showpage"><a href="/">'+ upPageWord +'</a></span>'; upPageHtml = ' <span class="showpage">的<a href="/"> ' + upPageWord + “ < / 1 ” “ /跨度” ' ;
} )
}else{其他) (
upPageHtml = '<span class="showpage"><a href="'+htmlMap[p]+'">'+ upPageWord +'</a></span>'; upPageHtml = ' <span class="showpage">的<a href="'+htmlMap[p]+'"> ' + + & upPageWord # 39 ; “ / 1 ” “ /跨度> ” ;
} )fFlag++; fFlag + + ;
} )if(p==(thisNum-1)){如果( p == ( thisNum - 1 ) ) (
html += '&nbsp;<span class="showpagePoint"><u>'+thisNum+'</u></span>';的HTML + = ' <span class="showpagePoint">成效给予评' + thisNum + “ < / U系列” “ /跨度> ” ; ;
}else{其他) (
if(p==0){如果( p == 0 ) (
if(isLablePage){如果( isLablePage ) (
html = labelHtml+'1</a></span>';的HTML = labelHtml + '1 “ / 1 ” “ /跨度> ” ;
}else{其他) (
html += '<span class="showpageNum"><a href="/">1</a></span>';的HTML + = ' <span class="showpageNum">的<a href="/">一日“ / 1 ” “ /跨度> ” ;
} )
}else{其他) (
html += '<span class="showpageNum"><a href="'+htmlMap[p]+'">'+ (p+1) +' </a></span>';的HTML + = ' <span class="showpageNum">的<a href="'+htmlMap[p]+'"> ' + ( p +1 ) + “ < / 1 ” “ /跨度> ” ;
} )
} )if(eFlag ==0 && p == thisNum){如果( eFlag == 0 &标准普尔== thisNum ) (
downPageHtml = '<span class="showpage"> <a href="'+htmlMap[p]+'">'+ downPageWord +'</a></span>'; downPageHtml = ' <span class="showpage">的<a href="'+htmlMap[p]+'"> ' + + & downPageWord # 39 ; “ / 1 ” “ /跨度> ” ;
eFlag++; eFlag + + ;
} )
}//end if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){ ) / /结束,如果( p “ = ( thisNum - displayPageNum - 1 )及标准普尔” ( thisNum + displayPageNum ) ) (
}//end for(var p =0;p< htmlMap.length;p++){ ) / /结束(变种P值0 ; p “ htmlMap.length , p + + ) (if(thisNum>1){如果( thisNum “ 1 ) (
if(!isLablePage){如果( ! isLablePage ) (
html = '<span class="showpage"><a href="/">'+ firstPageWord +' </a></span>'+upPageHtml+' '+html +' ';的HTML = ' <span class="showpage">的<a href="/"> ' + firstPageWord + “ < / 1 ” “ /跨度” ' + upPageHtml + ' ' +的HTML + ' ' ;
}else{其他) (
html = ''+labelHtml + firstPageWord +' </a></span>'+upPageHtml+' '+html +' ';的HTML = '' + labelHtml + firstPageWord + “ < / 1 ” “ /跨度> ” + upPageHtml + ' ' +的HTML + ' ' ;
} )
} )html = '<div class="showpageArea"><span style="font-size:11px;padding: 2px 4px 2px 4px;margin: 2px 2px 2px 2px;color: #000000;border: 1px solid #333; background-color: #FFFFFF;" class="showpage">Page '+thisNum+' of '+(postNum-1)+': </span>'+html;的HTML = ' <div class="showpageArea"> “跨度风格= ”字体大小: 11px ;填充: 2px 4px 2px 4px ;保证金: 2px 2px 2px 2px ;颜色: # 000000 ;边界: 1px固体# 333 ;背景颜色: # FFFFFF ; “阶级= ” showpage “ ”页' + thisNum + '的' + ( postNum - 1 ) + ' ; : “ /跨度> ” +的HTML ;
if(thisNum<(postNum-1)){如果( thisNum “ ( postNum - 1 ) ) (
html += downPageHtml;的HTML + = downPageHtml ;
html += '<span class="showpage"><a href="'+htmlMap[htmlMap.length-1]+'"> '+endPageWord+'</a></span>';的HTML + = ' <span class="showpage">的<a href="'+htmlMap[htmlMap.length-1]+'"> ' , + endPageWord + “ < / 1 ” “ /跨度> ” ;
} )if(postNum==1) postNum++;如果( postNum == 1 ) postNum + + ;
html += '</div>';的HTML + = “ < /专区> ” ;if(isPage || isFirstPage || isLablePage){如果( isPage | | isFirstPage | | isLablePage ) (
var pageArea = document.getElementsByName("pageArea");叶pageArea = document.getElementsByName ( “ pageArea ” ) ;
var blogPager = document.getElementById("blog-pager");叶blogPager = document.getElementById ( “博客,传呼机” ) ;if(postNum <= 2){如果( postNum “ = 2 ) (
html ='';的HTML = '' ;
} )for(var p =0;p< pageArea.length;p++){为(叶P值0 ; p “ pageArea.length ; p + + ) (
pageArea[p].innerHTML = html; pageArea [ p ] 。 innerHTML =的HTML ;
} )if(pageArea&&pageArea.length>0){如果( pageArea & & pageArea.length “ 0 ) (
html ='';的HTML = '' ;
} )if(blogPager){如果( blogPager ) (
blogPager.innerHTML = html; blogPager.innerHTML的HTML = ;
} )
} )} )
</script> “ /脚本”<script src="/feeds/posts/summary?alt=json-in-script&callback=showpageCount&max-results=99999" type="text/javascript"></script> <script src="/feeds/posts/summary?alt=json-in-script&callback=showpageCount&max-results=99999" type="text/javascript"> “ /脚本”
- Click on Preview button to ensure that no code error been found.点击预览按钮 ,以确保没有代码错误被发现。 No effect on the navigation hack can be seen though.不影响航行黑客可以看出了。
- Click on Save Template to save the change.点击保存模板保存更改。
Customization and Modification 定制和修改
- For user who is not using blogspot.com domain (using self-hosted domain name), modify the .blogspot.com and 14 (13 characters of domain name + 1) in the line of var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==".blogspot.com/"; accordingly.对于用户谁不是使用blogspot.com域(采用自主办的网域名称) , 修改 。 blogspot.com和第14条( 13个字符的域名+ 1 )中的线叶isFirstPage = thisUrl.substring ( thisUrl.length -14 , thisUrl.length )==". blogspot.com / “ ;相应。
- The value in the line of var pageCount =5; determines the number of posts to be shown on each page.在价值线的变种pageCount = 5 ;确定的职位数目显示在每个网页上。
- The value in the line of var displayPageNum = 3; defines the number of page links in the navigation bar to be displayed (eg 1 - 2 - 3).在价值线的变种displayPageNum = 3 ;界定了一些网页链接在导航栏显示(如1 -2 - 3) 。
- User who knows CSS and Java Script can customize the code to their likings.用户谁知道CSS和Java脚本可以自定义代码的色彩。
Source 1来源1 and和 Source 2来源二
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明:这是一台机器翻译网页这是“原样”提供,无保修。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原文的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at共享和贡献或取得技术支持和帮助 My Digital Life Forums 我的数字生活论坛 . 。
Related Articles相关文章
- Workaround to Add Custom Channels into Blogger AdSense Page Element Widget解决方法添加自定义渠道到Blogger AdSense的网页元素部件
- Blogger (at BlogSpot) with Category Labels and Drag-and-Drop Template Editing Out of Beta Blogger的(在BlogSpot的)与类别标签和拖放模板编辑完成测试
- Remove Microsoft Word Manual Formatting or Copied Formatting from External Source删除微软Word手册格式或者复制格式化从外部来源
- Trick to Add AdSense, AdBrite and Other JavaScript Ad Code Directly to Blogger HTML Template伎俩将AdSense新增, AdBrite和其他的JavaScript广告代码直接到Blogger的HTML模板
- New Blogger with Category (Labels) and Instant Publishing Features plus New Templates新的Blogger与类别(标签)和即时发布功能,以及新范本
- View Locked Orkut Album Hack查看锁定的Orkut专辑哈克
- Manual Setting on White Balance手动设置白平衡
- Manual and Clean Uninstall Oracle for Windows手册和干净的卸载甲骨文为Windows
- Check Future Page Rank Across Google Servers检查未来的网页排名在谷歌服务器
- How to Wrap AdSense Ads Around and Inline Beside Blogger Post Content如何总结各地AdSense广告和内置旁边Blogger帖子内容


























October 19th, 2008 10:14二零零八年10月19日10:14
Everything OK.一切都确定。 But while trying this found some problems.但是,在尝试这一发现了一些问题。 For example, when I click on ‘next’ page, some times it shows the same page, especially after 6th or 7th page.例如,当我点击'下一步'页,有时它显示相同的网页,特别是在第六或第七页。 I think it is because of the script used.我想这是因为用于该脚本。 It is not as smooth as wordpress navigation - Jkwebtalks这是不是顺利WordPress的导航-J kwebtalks
October 23rd, 2008 09:43 2008年10月23号09:43
my blogs is still in classic blogger, could this treat i used to my blog?我的Blog仍然是在经典的博客,可这个治疗我用我的博客?
And how to showing the page number on wordpress, the page number plugin just only support up to 2.5 version.以及如何显示页码的WordPress的,页码的插件只是最多只支持到2.5版本。 is there any idea?是否有任何想法? or just waiting for plugin the new version release?或只是在等待插件新版本发布?
thanks!谢谢!
November 13th, 2008 18:10二〇 〇八年11月13日18:10
not working …….没有工作... ... 。
coz I did the same as u written above .正版游戏我没有相同的如u书面以上。
but no page numbering could be shown .但没有编号的页面可以显示。
November 13th, 2008 18:37二〇 〇八年11月13日18:37
I’ve done now ………我现在要做... ... ...
page’s number are shown in my blog网页的人数列在我的博客
but How to arrange pages in my blog ?但如何安排的网页在我的博客?
November 15th, 2008 02:52 2008年11月一十五号二点五十二分
not work on my blogspot!没有工作,我的BlogSpot ! may I wrong place the code?我错了地方的代码?
November 15th, 2008 06:34 2008年11月一十五号6时34分
it’s work now on my Free cell phone theme它的工作现在我免费手机主题 ! !
but sometime, there,s an error like this 但有时,有氏的错误这样
“No posts match your query.” “任何职位符合您查询。 ”
is there any solution! 是否有任何解决方案!
November 21st, 2008 04:23 08年十一月21日4时23
This doesnt work at all for me.这doesn't工作,为我所有。 Nothing changes at all.没有变化的。
November 22nd, 2008 05:49 2008年十一月22日5点49分
Its not working for me, I copied the code above and I am using the new blogger.它不工作对我来说,我复制以上代码和我使用新的Blogger 。 Could yoou please help me on this.可yoou请救救我这一点。
Ravi拉维
November 23rd, 2008 19:21 2008年11月23日19时21
It’sa Leora Ka Bal solution.这是一个平衡Leora卡解决方案。