English French German Spain Italian Dutch

Russian Portuguese Japanese Korean Arabic Chinese Simplified
by : BTF
English French German Spain Italian Dutch

Russian Portuguese Japanese Korean Arabic Chinese Simplified
by : BTF
English French German Spain Italian Dutch

Russian Portuguese Japanese Korean Arabic Chinese Simplified
by : BTF
English French German Spain Italian Dutch

Russian Portuguese Japanese Korean Arabic Chinese Simplified
by : BTF

Minggu, 28 Juni 2009

Cara membuat nomor halaman posting pada blogspot

Postingan membuat nomor halaman posting pada blogspot ini sama tidak ya seperti menomori dokumen di MS Word? Mari kita bahas. Setiap kali kita menulis posting baru pada blogspot, maka posting terbaru akan muncul di atas atau di depan posting yang lama secara otomatis (meskipun sebenarnya kita bisa mengganti urutan posting dengan cara mengganti waktu pembuatan dari posting tersebut.) Kita juga bisa mengatur jumlah postingan yang akan mucul per halaman pada blogspot. Cara mengatur jumlah posting per halaman pada blogspot pernah disinggung di panduan menggunakan blogspot yang bisa pembaca download dari blog ini. Untuk mengaturnya silahkan buka tab menu "Pengaturan" pada dasbor blogspot Anda, kemudian pilih sub tab menu "Format". Silahkan atur jumlah posting per halaman pada bagian "Tampilkan".

Nah, untuk melihat postingan yang lama, pada template blogspot sudah tersedia link dibagian bawah posting yang bertuliskan biasanya "Posting Lama" dan link "Posting Lebih Baru" jika ingin kembali pada halaman postingan yang lebih baru.

Yang membuat sedikit repot adalah ketika kita ingin membuka postingan yang jauh lebih lama. Dengan kondisi seperti itu, kita harus membuka satu persatu halaman-halaman postingan blogspot untuk sampai pada postingan lama yang ingin kita tuju. Namun, ada cara untuk mengatasinya, yaitu dengan membuat link tiap halaman postingan, sehingga kita bisa melompat ke halaman yang lebih lama atau lebih baru tanpa melewati halaman-halaman diantaranya. Kita akan membuat nomor halaman posting pada blogspot. Nomor-nomor tersebutlah sebagai link untuk menuju halaman yang dituju. Langkah-langkahnya adalah sebagai berikut:
  1. Login terlebih dahulu pada akun blogspot Anda
  2. Klik link menu Tata Letak, kemudian pilih sub tab menu Edit HTML
  3. Backup terlebih dahulu template pembaca. Hal ini bertujuan agar pembaca bisa mengembalikan ke kondisi semula jika terjadi kesalahan pengeditan. Klik tulisan yang bertuliskan Download Template Lengkap
  4. Jangan beri centang pada kotak kecil yang ada disamping tulisan Expand Template Widget
  5. Cari kode ]]></b:skin> pada template tersebut
  6. Copy paste struktur CSS berikut tepat diatas kode ]]></b:skin>

/* Page Navigation */
.blog-pager {text-align: center; margin-top: 10px; font-size: 0.75em; font-weight: bold;}
.showpageArea a {text-decoration:underline;padding: 2px 6px 2px 6px;color: #333;background: #fffff4;margin: 2px;}
.showpagePoint {padding: 2px 6px 2px 6px;color: #FFF;background: #a0c800;border: 1px solid #ccc;margin: 2px;} /*Current page*/
.showpageOf {padding: 2px 6px 2px 6px; color: #333;background: #fffff4;border: 1px solid #ccc;margin: 2px;} /* Page (1), Page(2) ... */
.showpageNum a {text-decoration:none;padding: 2px 6px 2px 6px;color: #0066cc;background: #fffff4;border: 1px solid #ccc;margin: 2px;}
.showpageNum a:hover {border: 1px solid #aaa;background-color:#ccc;color: #ff9600;}
.showpageNum a:link {text-decoration:none;color:#333;}
.showpage a {text-decoration:none;padding: 2px 6px 2px 6px;color: #0066cc;background: #FFF;border: 1px solid #ccc;margin: 2px;} /* Next, Prev...*/
.showpage a:hover {padding: 2px 6px 2px 6px;color: #ff9600;background-color:#ccc;border: 1px solid #aaa;margin: 2px;}
.showpage a:link {text-decoration:none;color:#333;}



7. Cari lagi struktur seperti berikut pada template pembaca

&amp;amp;lt;b:section class='main' id='main' showaddelement='no'&amp;amp;gt;
&amp;amp;lt;b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/&amp;amp;gt;
&amp;amp;lt;/b:section&amp;amp;gt;


8. Kemudian copy paste struktur berikut tepat di bawah struktur yang Anda temukan pada langkah 7

&amp;amp;amp;lt;script type=&amp;amp;amp;quot;text/javascript&amp;amp;amp;quot;&amp;amp;amp;gt;

function showpageCount(json) {
var thisUrl = location.href;
var htmlMap = new Array();
var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==&amp;amp;amp;quot;.blogspot.com/&amp;amp;amp;quot;;
var isLablePage = thisUrl.indexOf(&amp;amp;amp;quot;/search/label/&amp;amp;amp;quot;)!=-1;
var isPage = thisUrl.indexOf(&amp;amp;amp;quot;/search?updated&amp;amp;amp;quot;)!=-1;
var thisLable = isLablePage ? thisUrl.substr(thisUrl.indexOf(&amp;amp;amp;quot;/search/label/&amp;amp;amp;quot;)+14,thisUrl.length) : &amp;amp;amp;quot;&amp;amp;amp;quot;;
thisLable = thisLable.indexOf(&amp;amp;amp;quot;?&amp;amp;amp;quot;)!=-1 ? thisLable.substr(0,thisLable.indexOf(&amp;amp;amp;quot;?&amp;amp;amp;quot;)) : thisLable;
var thisNum = 1;
var postNum=1;
var itemCount = 0;
var fFlag = 0;
var eFlag = 0;
var html= &amp;amp;amp;#39;&amp;amp;amp;#39;;
var upPageHtml =&amp;amp;amp;#39;&amp;amp;amp;#39;;
var downPageHtml =&amp;amp;amp;#39;&amp;amp;amp;#39;;


var pageCount=5;
var displayPageNum=3;
var firstPageWord = &amp;amp;amp;#39;First&amp;amp;amp;#39;;
var endPageWord = &amp;amp;amp;#39;Last&amp;amp;amp;#39;;
var upPageWord =&amp;amp;amp;#39;Previous&amp;amp;amp;#39;;
var downPageWord =&amp;amp;amp;#39;Next&amp;amp;amp;#39;;



var labelHtml = &amp;amp;amp;#39;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpageNum&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;a href=&amp;amp;amp;quot;/search/label/&amp;amp;amp;#39;+thisLable+&amp;amp;amp;#39;?&amp;amp;amp;amp;max-results=&amp;amp;amp;#39;+pageCount+&amp;amp;amp;#39;&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;#39;;

for(var i=0, post; post = json.feed.entry[i]; i++) {
var timestamp = post.published.$t.substr(0,10);
var title = post.title.$t;
if(isLablePage){
if(title!=&amp;amp;amp;#39;&amp;amp;amp;#39;){
if(post.category){
for(var c=0, post_category; post_category = post.category[c]; c++) {
if(encodeURIComponent(post_category.term)==thisLable){
if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){
if(thisUrl.indexOf(timestamp)!=-1 ){
thisNum = postNum;
}

postNum++;
htmlMap[htmlMap.length] = &amp;amp;amp;#39;/search/label/&amp;amp;amp;#39;+thisLable+&amp;amp;amp;#39;?updated-max=&amp;amp;amp;#39;+timestamp+&amp;amp;amp;#39;T00%3A00%3A00%2B08%3A00&amp;amp;amp;amp;max-results=&amp;amp;amp;#39;+pageCount;
}
}
}
}//end if(post.category){

itemCount++;
}

}else{
if(title!=&amp;amp;amp;#39;&amp;amp;amp;#39;){
if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){
if(thisUrl.indexOf(timestamp)!=-1 ){
thisNum = postNum;
}

if(title!=&amp;amp;amp;#39;&amp;amp;amp;#39;) postNum++;
htmlMap[htmlMap.length] = &amp;amp;amp;#39;/search?updated-max=&amp;amp;amp;#39;+timestamp+&amp;amp;amp;#39;T00%3A00%3A00%2B08%3A00&amp;amp;amp;amp;max-results=&amp;amp;amp;#39;+pageCount;
}
}
itemCount++;
}
}

for(var p =0;p&amp;amp;amp;lt; htmlMap.length;p++){
if(p&amp;amp;amp;gt;=(thisNum-displayPageNum-1) &amp;amp;amp;amp;&amp;amp;amp;amp; p&amp;amp;amp;lt;(thisNum+displayPageNum)){
if(fFlag ==0 &amp;amp;amp;amp;&amp;amp;amp;amp; p == thisNum-2){
if(thisNum==2){
if(isLablePage){
upPageHtml = labelHtml + upPageWord +&amp;amp;amp;#39;&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
}else{
upPageHtml = &amp;amp;amp;#39;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpage&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;a href=&amp;amp;amp;quot;/&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;#39;+ upPageWord +&amp;amp;amp;#39;&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
}
}else{
upPageHtml = &amp;amp;amp;#39;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpage&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;a href=&amp;amp;amp;quot;&amp;amp;amp;#39;+htmlMap[p]+&amp;amp;amp;#39;&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;#39;+ upPageWord +&amp;amp;amp;#39;&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
}

fFlag++;
}

if(p==(thisNum-1)){
html += &amp;amp;amp;#39;&amp;amp;amp;amp;nbsp;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpagePoint&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;u&amp;amp;amp;gt;&amp;amp;amp;#39;+thisNum+&amp;amp;amp;#39;&amp;amp;amp;lt;/u&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
}else{
if(p==0){
if(isLablePage){
html = labelHtml+&amp;amp;amp;#39;1&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
}else{
html += &amp;amp;amp;#39;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpageNum&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;a href=&amp;amp;amp;quot;/&amp;amp;amp;quot;&amp;amp;amp;gt;1&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
}
}else{
html += &amp;amp;amp;#39;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpageNum&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;a href=&amp;amp;amp;quot;&amp;amp;amp;#39;+htmlMap[p]+&amp;amp;amp;#39;&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;#39;+ (p+1) +&amp;amp;amp;#39; &amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
}
}

if(eFlag ==0 &amp;amp;amp;amp;&amp;amp;amp;amp; p == thisNum){
downPageHtml = &amp;amp;amp;#39;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpage&amp;amp;amp;quot;&amp;amp;amp;gt; &amp;amp;amp;lt;a href=&amp;amp;amp;quot;&amp;amp;amp;#39;+htmlMap[p]+&amp;amp;amp;#39;&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;#39;+ downPageWord +&amp;amp;amp;#39;&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
eFlag++;
}
}//end if(p&amp;amp;amp;gt;=(thisNum-displayPageNum-1) &amp;amp;amp;amp;&amp;amp;amp;amp; p&amp;amp;amp;lt;(thisNum+displayPageNum)){
}//end for(var p =0;p&amp;amp;amp;lt; htmlMap.length;p++){

if(thisNum&amp;amp;amp;gt;1){
if(!isLablePage){
html = &amp;amp;amp;#39;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpage&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;a href=&amp;amp;amp;quot;/&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;#39;+ firstPageWord +&amp;amp;amp;#39; &amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;+upPageHtml+&amp;amp;amp;#39; &amp;amp;amp;#39;+html +&amp;amp;amp;#39; &amp;amp;amp;#39;;
}else{
html = &amp;amp;amp;#39;&amp;amp;amp;#39;+labelHtml + firstPageWord +&amp;amp;amp;#39; &amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;+upPageHtml+&amp;amp;amp;#39; &amp;amp;amp;#39;+html +&amp;amp;amp;#39; &amp;amp;amp;#39;;
}
}

html = &amp;amp;amp;#39;&amp;amp;amp;lt;div class=&amp;amp;amp;quot;showpageArea&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;span style=&amp;amp;amp;quot;font-size:11px;padding: 2px 4px 2px 4px;margin: 2px 2px 2px 2px;color: #000000;border: 1px solid #333; background-color: #FFFFFF;&amp;amp;amp;quot; class=&amp;amp;amp;quot;showpage&amp;amp;amp;quot;&amp;amp;amp;gt;Page &amp;amp;amp;#39;+thisNum+&amp;amp;amp;#39; of &amp;amp;amp;#39;+(postNum-1)+&amp;amp;amp;#39;: &amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;+html;

if(thisNum&amp;amp;amp;lt;(postNum-1)){
html += downPageHtml;
html += &amp;amp;amp;#39;&amp;amp;amp;lt;span class=&amp;amp;amp;quot;showpage&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;a href=&amp;amp;amp;quot;&amp;amp;amp;#39;+htmlMap[htmlMap.length-1]+&amp;amp;amp;#39;&amp;amp;amp;quot;&amp;amp;amp;gt; &amp;amp;amp;#39;+endPageWord+&amp;amp;amp;#39;&amp;amp;amp;lt;/a&amp;amp;amp;gt;&amp;amp;amp;lt;/span&amp;amp;amp;gt;&amp;amp;amp;#39;;
}

if(postNum==1) postNum++;
html += &amp;amp;amp;#39;&amp;amp;amp;lt;/div&amp;amp;amp;gt;&amp;amp;amp;#39;;

if(isPage || isFirstPage || isLablePage){
var pageArea = document.getElementsByName(&amp;amp;amp;quot;pageArea&amp;amp;amp;quot;);
var blogPager = document.getElementById(&amp;amp;amp;quot;blog-pager&amp;amp;amp;quot;);

if(postNum &amp;amp;amp;lt;= 2){
html =&amp;amp;amp;#39;&amp;amp;amp;#39;;
}

for(var p =0;p&amp;amp;amp;lt; pageArea.length;p++){
pageArea[p].innerHTML = html;
}

if(pageArea&amp;amp;amp;amp;&amp;amp;amp;amp;pageArea.length&amp;amp;amp;gt;0){
html =&amp;amp;amp;#39;&amp;amp;amp;#39;;
}

if(blogPager){
blogPager.innerHTML = html;
}
}

}
&amp;amp;amp;lt;/script&amp;amp;amp;gt;

&amp;amp;amp;lt;script src=&amp;amp;amp;quot;/feeds/posts/summary?alt=json-in-script&amp;amp;amp;amp;callback=showpageCount&amp;amp;amp;amp;max-results=99999&amp;amp;amp;quot; type=&amp;amp;amp;quot;text/javascript&amp;amp;amp;quot;&amp;amp;amp;gt;&amp;amp;amp;lt;/script&amp;amp;amp;gt;


  • Klik tombol menu SIMPAN TEMPLATE
  • Contoh pembuatan nomor halaman posting tersebut bisa pembaca lihat pada bagian bawah halaman blog saya ini.


  • Postingan Terkait Lainnya :


    Widget by zamzam

    0 komentar:

    :10 :11 :12 :13
    :14 :15 :16 :17
    :18 :19 :20 :21
    :22 :23 :24 :25
    :26 :27 :28 :29
    :30 :31 :32 :33
    :34 :35 :36 :37
    :38 :39 :40 :41
    :42 :43 :44 :45

    Posting Komentar

     

    Pengikut

    My Blog List

    SMPN 16 Bekasi on Facebook
    Widgets by: Zamzam

    Dunia Teknologi & Dunia Blog Copyright © 2009 Black Nero is Designed by Ipietoon Sponsored by Online Business Journal