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.ワードプレスは、番号のページを表示するページのナビゲーションリンクをカスタマイズするためのプラグインをサポートしていますブログとは異なり、よりユーザーフレンドリー、 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ブロガー 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のブログを表示しているとか、 Googleアカウントにログインすると、次のブログツールバーのカスタマイズをクリックします。
- 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 # 505050 ;
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 1 :ホバー(
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 # 505050 ;
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 1 :ホバー(
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;色: #すなわち、 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 1 :リンク、 。 showpage :リンク(
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 1 :ホバー(
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; VarのthisUrl = location.href ;
var htmlMap = new Array(); VarのhtmlMap =新しいアレイ( ) ;
var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==”.blogspot.com/”; VarのisFirstPage = thisUrl.substring ( thisUrl.length - 14 、 thisUrl.length )==". blogspot.com / " ;
var isLablePage = thisUrl.indexOf(”/search/label/”)!=-1; VarのisLablePage = thisUrl.indexOf ( " /検索/ラベル/")!=- 1 ;
var isPage = thisUrl.indexOf(”/search?updated”)!=-1; VarのisPage = thisUrl.indexOf ( " /検索?更新")!=- 1 ;
var thisLable = isLablePage ? Varの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; VarのthisNum = 1 ;
var postNum=1; VarのpostNum = 1 ;
var itemCount = 0; VarのitemCount = 0 ;
var fFlag = 0; = 0 fFlag Varの;
var eFlag = 0; = 0 eFlag Varの;
var html= ”; VarのHTML形式= " ;
var upPageHtml =”; VarのupPageHtml = " ;
var downPageHtml =”; VarのdownPageHtml = " ;var pageCount=5; VarのpageCount = 5 ;
var displayPageNum=3; VarのdisplayPageNum = 3 ;
var firstPageWord = ‘First’; VarのfirstPageWord = '最初' ;
var endPageWord = ‘Last’; VarのendPageWord = '最終更新;
var upPageWord =’Previous’; VarのupPageWord = ' '前;
var downPageWord =’Next’; VarのdownPageWord = '次;var labelHtml = ‘<span class=”showpageNum”><a href=”/search/label/’+thisLable+’?&max-results=’+pageCount+’”>’; VarのlabelHtml = 'の<span class="showpageNum">の<a href="/search/label/'+thisLable+'?&max-results='+pageCount+'"> ' ;
for(var i=0, post; post = json.feed.entry[i]; i++) { ( Varの私= 0 、郵便;記事= json.feed.entryに[ I ] ;私+ + ) (
var timestamp = post.published.$t.substr(0,10); Varのタイムスタンプ= post.published 。 $ t.substr ( 0,10 ) ;
var title = post.title.$t; Varのタイトル= post.title 。 $トン;
if(isLablePage){ ( isLablePage ) (
if(title!=”){場合(タイトル!="){
if(post.category){ ( post.category ) (
for(var c=0, post_category; post_category = post.category[c]; c++) { ( Varのウ= 0 、 post_category ; post_category = post.category [ C言語] ;のC + + ) (
if(encodeURIComponent(post_category.term)==thisLable){場合( ( ) == thisLable ) post_category.term encodeURIComponent (
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{する) 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++){ = 0 ;ページビュー< htmlMap.length ( Varのp ; p + + ) (
if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){もし( pは> = ( thisNum - displayPageNum - 1 ) & & Pは< ( thisNum + displayPageNum ) ) (
if(fFlag ==0 && p == thisNum-2){もし( ) == 0 & & == thisNum対潜哨戒機fFlag (
if(thisNum==2){ ( thisNum == 2 ) (
if(isLablePage){ ( isLablePage ) (
upPageHtml = labelHtml + upPageWord +’</a></span>’; upPageHtml = labelHtml + upPageWord + ' < / a >を< / span >の' ;
}else{する) else (
upPageHtml = ‘<span class=”showpage”><a href=”/”>’+ upPageWord +’</a></span>’; upPageHtml = 'の<span class="showpage">の<a href="/">ヘルプ' + upPageWord + ' < / a >を< / span >の' ;
} )
}else{する) else (
upPageHtml = ‘<span class=”showpage”><a href=”‘+htmlMap[p]+’”>’+ upPageWord +’</a></span>’; upPageHtml = 'の<span class="showpage">の<a href="'+htmlMap[p]+'"> ' + upPageWord + ' < / a >を< / span >の' ;
} )fFlag++; fFlag + + ;
} )if(p==(thisNum-1)){もし( pは== ( thisNum - 1 ) ) (
html += ‘ <span class=”showpagePoint”><u>’+thisNum+’</u></span>’; HTML形式+ = 'の<span class="showpagePoint">の<u> ' + thisNum + ' < / u >の< / span >の' ;
}else{する) else (
if(p==0){場合(画== 0 ) (
if(isLablePage){ ( isLablePage ) (
html = labelHtml+’1</a></span>’; HTML形式= labelHtml + '1 < / a >を< / span >の' ;
}else{する) else (
html += ‘<span class=”showpageNum”><a href=”/”>1</a></span>’; HTML形式+ = 'の<span class="showpageNum">の<a href="/">ヘルプ1 < / a >を< / span >の' ;
} )
}else{する) else (
html += ‘<span class=”showpageNum”><a href=”‘+htmlMap[p]+’”>’+ (p+1) +’ </a></span>’; HTML形式+ = 'の<span class="showpageNum">の<a href="'+htmlMap[p]+'"> ' + ( pは+1 ) + ' < / a >を< / span >の' ;
} )
} )if(eFlag ==0 && p == thisNum){場合( == 0 & & PはeFlag == thisNum ) (
downPageHtml = ‘<span class=”showpage”> <a href=”‘+htmlMap[p]+’”>’+ downPageWord +’</a></span>’; downPageHtml = 'の<span class="showpage">の<a href="'+htmlMap[p]+'"> ' + downPageWord + ' < / a >を< / span >の' ;
eFlag++; eFlag + + ;
} )
}//end if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){ ) / /終了する場合( > = ( thisNum - displayPageNum - 1 ) & & Pは< ( thisNum + displayPageNum ) )でp (
}//end for(var p =0;p< htmlMap.length;p++){ = 0 ;ページビュー< htmlMap.length ( Varのp ; 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 + ' < / a >を< / span >の' + upPageHtml + ' ' + HTML形式+ ' ' ;
}else{する) else (
html = ”+labelHtml + firstPageWord +’ </a></span>’+upPageHtml+’ ‘+html +’ ‘; HTML形式= " + labelHtml + firstPageWord + ' < / a >を< / span >の' + 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 ) + ' : < / span >の' + 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 + ' < / a >を< / span >の' ;
} )if(postNum==1) postNum++; ( postNum == 1 ) postNum + + ;
html += ‘</div>’; HTML形式+ = ' < / divを> ' ;if(isPage || isFirstPage || isLablePage){場合( isPage | | isFirstPage | | isLablePage ) (
var pageArea = document.getElementsByName(”pageArea”); VarのpageArea = document.getElementsByName ( " pageArea " ) ;
var blogPager = document.getElementById(”blog-pager”); VarのblogPager = document.getElementById ( " -ポケットベル" )のブログ;if(postNum <= 2){場合( postNum < = 2 ) (
html =”; HTML形式= " ;
} )for(var p =0;p< pageArea.length;p++){ = 0 ;ページビュー< pageArea.length ( Varのp ; 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ブロガー 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のブログを表示しているとか、 Googleアカウントにログインすると、次のブログツールバーのカスタマイズをクリックします。
- 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:次に、テンプレートのHTMLコード内のコードの次の行を検索:
<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:を追加し、 < / Bの:セクション>行:の後に、次のJavaScriptコードの権利を追加
<script type="text/javascript"> <script type="text/javascript">
function showpageCount(json) {関数showpageCount ( json ) (
var thisUrl = location.href; VarのthisUrl = location.href ;
var htmlMap = new Array(); VarのhtmlMap =新しいアレイ( ) ;
var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==".blogspot.com/"; VarのisFirstPage = thisUrl.substring ( thisUrl.length - 14 、 thisUrl.length )==". blogspot.com / " ;
var isLablePage = thisUrl.indexOf("/search/label/")!=-1; VarのisLablePage = thisUrl.indexOf ( " /検索/ラベル/")!=- 1 ;
var isPage = thisUrl.indexOf("/search?updated")!=-1; VarのisPage = thisUrl.indexOf ( " /検索?更新")!=- 1 ;
var thisLable = isLablePage ? Varの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; VarのthisNum = 1 ;
var postNum=1; VarのpostNum = 1 ;
var itemCount = 0; VarのitemCount = 0 ;
var fFlag = 0; = 0 fFlag Varの;
var eFlag = 0; = 0 eFlag Varの;
var html= ''; VarのHTML形式= '' ;
var upPageHtml =''; VarのupPageHtml = '' ;
var downPageHtml =''; VarのdownPageHtml = '' ;var pageCount=5; VarのpageCount = 5 ;
var displayPageNum=3; VarのdisplayPageNum = 3 ;
var firstPageWord = 'First'; VarのfirstPageWord = '最初' ;
var endPageWord = 'Last'; VarのendPageWord = '最終更新;
var upPageWord ='Previous'; VarのupPageWord = ' '前;
var downPageWord ='Next'; VarのdownPageWord = '次;var labelHtml = '<span class="showpageNum"><a href="/search/label/'+thisLable+'?&max-results='+pageCount+'">'; VarのlabelHtml = 'の<span class="showpageNum">の< a href = " /検索/ラベル/ ' + thisLable + ' ? &最大の成果= & # 39 ; + pageCount +'">';
for(var i=0, post; post = json.feed.entry[i]; i++) { ( Varの私= 0 、郵便;記事= json.feed.entryに[ I ] ;私+ + ) (
var timestamp = post.published.$t.substr(0,10); Varのタイムスタンプ= post.published 。 $ t.substr ( 0,10 ) ;
var title = post.title.$t; Varのタイトル= post.title 。 $トン;
if(isLablePage){ ( isLablePage ) (
if(title!=''){場合(タイトル!=''){
if(post.category){ ( post.category ) (
for(var c=0, post_category; post_category = post.category[c]; c++) { ( Varのウ= 0 、 post_category ; post_category = post.category [ C言語] ;のC + + ) (
if(encodeURIComponent(post_category.term)==thisLable){場合( ( ) == thisLable ) post_category.term encodeURIComponent (
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{する) 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++){ = 0 ;ページビュー< htmlMap.length ( Varのp ; p + + ) (
if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){もし( pは> = ( thisNum - displayPageNum - 1 ) & & Pは< ( thisNum + displayPageNum ) ) (
if(fFlag ==0 && p == thisNum-2){もし( ) == 0 & & == thisNum対潜哨戒機fFlag (
if(thisNum==2){ ( thisNum == 2 ) (
if(isLablePage){ ( isLablePage ) (
upPageHtml = labelHtml + upPageWord +'</a></span>'; upPageHtml = labelHtml + upPageWord + ' < / a >を< / span >の' ;
}else{する) else (
upPageHtml = '<span class="showpage"><a href="/">'+ upPageWord +'</a></span>'; upPageHtml = 'の<span class="showpage">の<a href="/">ヘルプ' + upPageWord + ' < / a >を< / span >の' ;
} )
}else{する) else (
upPageHtml = '<span class="showpage"><a href="'+htmlMap[p]+'">'+ upPageWord +'</a></span>'; upPageHtml = 'の<span class="showpage">の<a href="'+htmlMap[p]+'"> ' + upPageWord + & # 39 ; < / a >を< / span >の' ;
} )fFlag++; fFlag + + ;
} )if(p==(thisNum-1)){もし( pは== ( thisNum - 1 ) ) (
html += '&nbsp;<span class="showpagePoint"><u>'+thisNum+'</u></span>'; HTML形式+ = 'の<span class="showpagePoint">の<u> ' + thisNum + ' < / u >の< / span >の' ; ;
}else{する) else (
if(p==0){場合(画== 0 ) (
if(isLablePage){ ( isLablePage ) (
html = labelHtml+'1</a></span>'; HTML形式= labelHtml + '1 < / a >を< / span >の' ;
}else{する) else (
html += '<span class="showpageNum"><a href="/">1</a></span>'; HTML形式+ = 'の<span class="showpageNum">の<a href="/">ヘルプ1 < / a >を< / span >の' ;
} )
}else{する) else (
html += '<span class="showpageNum"><a href="'+htmlMap[p]+'">'+ (p+1) +' </a></span>'; HTML形式+ = 'の<span class="showpageNum">の<a href="'+htmlMap[p]+'"> ' + (画+1 ) + ' < / a >を< / span >の' ;
} )
} )if(eFlag ==0 && p == thisNum){場合( == 0 & & PはeFlag == thisNum ) (
downPageHtml = '<span class="showpage"> <a href="'+htmlMap[p]+'">'+ downPageWord +'</a></span>'; downPageHtml = 'の<span class="showpage">の<a href="'+htmlMap[p]+'"> ' + downPageWord + & # 39 ; < / a >を< / span >の' ;
eFlag++; eFlag + + ;
} )
}//end if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){ ) / /終了する場合( > = ( thisNum - displayPageNum - 1 ) & & Pは< ( thisNum + displayPageNum ) )でP (
}//end for(var p =0;p< htmlMap.length;p++){ = 0 ;ページビュー< htmlMap.length ( Varのp ; 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 + ' < / a >を< / span >の' + upPageHtml + ' ' + HTML形式+ ' ' ;
}else{する) else (
html = ''+labelHtml + firstPageWord +' </a></span>'+upPageHtml+' '+html +' '; HTML形式= '' + labelHtml + firstPageWord + ' < / a >を< / span >の' + 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 ) + ' ; : < / span >の' + 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 + ' < / a >を< / span >の' ;
} )if(postNum==1) postNum++; ( postNum == 1 ) postNum + + ;
html += '</div>'; HTML形式+ = ' < / divを> ' ;if(isPage || isFirstPage || isLablePage){場合( isPage | | isFirstPage | | isLablePage ) (
var pageArea = document.getElementsByName("pageArea"); VarのpageArea = document.getElementsByName ( " pageArea " ) ;
var blogPager = document.getElementById("blog-pager"); VarのblogPager = document.getElementById ( " -ポケットベル" )のブログ;if(postNum <= 2){場合( postNum < = 2 ) (
html =''; HTML形式= '' ;
} )for(var p =0;p< pageArea.length;p++){ = 0 ;ページビュー< pageArea.length ( Varのp ; 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. ( thisUrl.length blogspot.comドメインを使用してユーザの場合は(自己を使用して、ドメイン名ホスト) 、およびドメイン名+ 1 ) VarのisFirstPageの行に= thisUrl.substringの14 ( 13 文字が。 blogspot.com変更されていません-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. Varの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). = 3 ;のナビゲーションバーにページのリンクの数を定義していますVarのdisplayPageNumの行の値(例えば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ソース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ブロガーのBlogSpot ( )でカテゴリラベルをドラッグアンドドロップアウトベータ版のテンプレートを編集する
- Remove Microsoft Word Manual Formatting or Copied Formatting from External Source Microsoft Wordの取扱説明書の書式を削除またはコピーの書式を設定する外部からのソース
- Trick to Add AdSense, AdBrite and Other JavaScript Ad Code Directly to Blogger HTML TemplateトリックBloggerのHTMLテンプレートへのAdSense 、 AdBriteは、その他のJavaScriptの広告コードを直接追加する
- 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 Oracleのマニュアルで清潔なアンインストールWindows用
- Check Future Page Rank Across Google Serversチェック将来のページランク、 Googleのサーバー上のデータ
- How to Wrap AdSense Ads Around and Inline Beside Blogger Post Content横にあるインラインBlogger投稿コンテンツとはどのように巻き付けるAdSenseの広告に


























October 19th, 2008 10:14 10月19日、 2008年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.たとえば、 'をクリックしたときに、次のページ、 6または7ページ、特に後には、同じページが表示されますいくつかの回。 I think it is because of the script used.私は、スクリプトのために使用されていると思う。 It is not as smooth as wordpress navigation - Jkwebtalksまた、ワードプレスのナビゲーションのように滑らかなものではない-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?クラシックなブロガーはまだ私のブログは、この私のブログに使用される治療可能性があるか?
And how to showing the page number on wordpress, the page number plugin just only support up to 2.5 version.方法は、ページ数だけ2.5のプラグインのバージョンまでサポートしていますワードプレスのページ番号を表示します。 is there any idea?何か考えですか? or just waiting for plugin the new version release?または単にプラグイン用の新しいバージョンのリリースを待つか?
thanks!ありがとう!
November 13th, 2008 18:10 2008年11月13日18:10
not working …….動作していない... ... 。
coz I did the same as u written above .私は上記と同じu詳細書かでしたcoz 。
but no page numbering could be shown .ページ番号が表示される可能性がある。
November 13th, 2008 18:37 2008年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 11月15日、 2008年02:52
not work on my blogspot!私のBlogの上で動作しない! may I wrong place the code?私は間違っては、コードを挿入することがありますか?
November 15th, 2008 06:34 11月15日、 2008年06: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 2008年11月21日04:23
This doesnt work at all for me.私にとってこの仕事をすべてdoesn't 。 Nothing changes at all.何も変更がすべて。
November 22nd, 2008 05:49 2008年11月22日05: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バルカー。