September 28, 2010

Numrat e faqeve (wp-pagenavi)


Ky widget është i shumë pritur, ju mund ta keni parë në shum blogje që përdorin wordpress por shumë rallë nëpër blogjet e Blogger.com, ky widget është i ngjashëm më pluginin e wordpress i cili quhet wp-pagenavi.


1. Shko te Blogger.com
2. Shko tek Settings>Formatting dhe shkruaj nje numer sesa poste deshiron te dalin ne ballinë.

3. Kliko tek Design>Edit HTML dhe kliko Expand Widget Templates.
4. Kërko kodin (CTRL+F):
</body>
dhe mbi të vendos këtë kod:
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<script type='text/javascript'>
var pageCount=5;
var displayPageNum=5;
var upPageWord ='Previous';
var downPageWord ='Next';
</script>

<script type='text/javascript'>

//<![CDATA[

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" style="padding:10px 10px 10px 10px;"><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 home_page_url=location.href;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){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>
</b:if>
</b:if>
5. Kërko kodin (CRTL+F):
'data:label.url'
dhe zevendesoje me këtë:


'data:label.url + &quot;?&amp;max-results=5&quot;'
6. Ka shumë stile të faqeve, por ne do t'i prezantojmë vetëm disa nga to.

Stili 1, Default:


7. Kërko kodin (CTRL+F):
]]></b:skin>
dhe mbi të shtoje këtë:
.showpageArea a {
text-decoration:underline;
background: #ffffff;
padding: 10px 10px 10px 10px;

}
.showpageNum a {
text-decoration:none;
border: 1px solid #cccccc;
border-top: 1px solid #cccccc;
margin:0 3px;
padding:3px;
}
.showpageNum a:hover {
border: 1px solid #cccccc;
background-color:#cccccc;
}
.showpagePoint {
color:#333;
text-decoration:none;
border: 1px solid #cccccc;
background: #cccccc;
margin:0 3px;
padding:3px;
}
.showpageOf {
text-decoration:none;
padding:3px;
margin: 0 3px 0 0;
}
.showpage a {
text-decoration:none;
border: 1px solid #cccccc;
padding:3px;
}
.showpage a:hover {
text-decoration:none;
}
.showpageNum a:link,.showpage a:link {
text-decoration:none;
color:#333333;
}
Stili 2:

Kërko kodin (CTRL+F):
]]></b:skin>
dhe mbi të shtoje këtë:
.showpageArea {
  font-family:verdana,arial,helvetica;
  color: #000;
  font-size:11px; 
  margin:10px;
  }
  
.showpageArea a {
  color: #000;
  text-shadow:0 1px 2px #fff;
    font-weight: 700;
  }
  
.showpageNum a {
  padding: 3px 8px;
  margin:0 4px;
  text-decoration: none;
  border:1px solid #999;
  -webkit-border-radius:3px;-moz-border-radius:3px;
  background: #ddd url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie_x0U2EIxp6KqQeEUDIQ1uBHHjVQF8C8XL2832K-h6QUqmdShwroqv1H05fHTsBkRbCtYTkHnLZD2LqtBadvKvwTA6J8twkvT2Dtfwq63Urkm7qR9PvEHTMuLNemDYzkJKB1qc2Sjge0/s1600/wp1.jpg) 0 -50px repeat-x;
  }
  
.showpageNum a:hover {
  border:1px solid #888;
  background: #ccc url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie_x0U2EIxp6KqQeEUDIQ1uBHHjVQF8C8XL2832K-h6QUqmdShwroqv1H05fHTsBkRbCtYTkHnLZD2LqtBadvKvwTA6J8twkvT2Dtfwq63Urkm7qR9PvEHTMuLNemDYzkJKB1qc2Sjge0/s1600/wp1.jpg) 0 -25px repeat-x;
  }

.showpageOf{
  margin:0 8px 0 0;
  }

.showpagePoint {
  color:#fff;
  text-shadow:0 1px 2px #333;
  padding: 3px 8px;
  margin: 2px;
  font-weight: 700;
  -webkit-border-radius:3px;-moz-border-radius:3px;
  border:1px solid #999;
  background: #666 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie_x0U2EIxp6KqQeEUDIQ1uBHHjVQF8C8XL2832K-h6QUqmdShwroqv1H05fHTsBkRbCtYTkHnLZD2LqtBadvKvwTA6J8twkvT2Dtfwq63Urkm7qR9PvEHTMuLNemDYzkJKB1qc2Sjge0/s1600/wp1.jpg) 0 0 repeat-x;
  text-decoration: none;
  }
Stili 3:

Kërko kodin (CTRL+F):
]]></b:skin>
dhe mbi të shtoje këtë:
.showpageArea {
  font-family:verdana,arial,helvetica;
  color: #000;
  font-size:11px; 
  margin:10px;
  }
  
.showpageArea a {
  color: #000;
  text-shadow:0 1px 2px #fff;
    font-weight: 700;
  }
  
.showpageNum a {
  padding: 3px 8px;
  margin:0 4px;
  text-decoration: none;
  border:1px solid #919106;
  -webkit-border-radius:3px;-moz-border-radius:3px;
  background: #ddd url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTg9cJfxg7hFPvWHvaWSdxmtE3ORCyfCg3b_9LJdgBCySnG5mPQNZWQ8o8wd8IOeqgVLI-oVn2bK2F_wEM2elMxkvFM1lh10FhtEc8JDxhyphenhyphenJqzVFlo6T9A2YZZel_iYfHLtOf-ajyNQIY/s1600/wp2.jpg) 0 -50px repeat-x;
  }
  
.showpageNum a:hover {
  border:1px solid #aeae0a;
  background: #ccc url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTg9cJfxg7hFPvWHvaWSdxmtE3ORCyfCg3b_9LJdgBCySnG5mPQNZWQ8o8wd8IOeqgVLI-oVn2bK2F_wEM2elMxkvFM1lh10FhtEc8JDxhyphenhyphenJqzVFlo6T9A2YZZel_iYfHLtOf-ajyNQIY/s1600/wp2.jpg) 0 -25px repeat-x;
  }

.showpageOf{
  margin:0 8px 0 0;
  }

.showpagePoint {
  color:#fff;
  text-shadow:0 1px 2px #333;
  padding: 3px 8px;
  margin: 2px;
  font-weight: 700;
  -webkit-border-radius:3px;-moz-border-radius:3px;
  border:1px solid #919106;
  background: #666 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTg9cJfxg7hFPvWHvaWSdxmtE3ORCyfCg3b_9LJdgBCySnG5mPQNZWQ8o8wd8IOeqgVLI-oVn2bK2F_wEM2elMxkvFM1lh10FhtEc8JDxhyphenhyphenJqzVFlo6T9A2YZZel_iYfHLtOf-ajyNQIY/s1600/wp2.jpg) 0 0 repeat-x;
  text-decoration: none;
  }
Stili 4:

Kërko kodin (CTRL+F):
]]></b:skin>
dhe mbi të shtoje këtë:
.showpageArea {
  font-family:verdana,arial,helvetica;
  color: #000;
  font-size:11px; 
  margin:10px;
  }
  
.showpageArea a {
  color: #fff;
  }
  
.showpageNum a {
  padding: 3px 8px;
  margin:0 4px;
  text-decoration: none;
  background: #363636 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhOIfqQd5E_WGHXZyd7zClBAyrl4ZRMdKvxc0P8hFR9hfs3pN-dJNZ-qs7dJ0Qi8uOWIY5Fz28dMK2AYIghdI6UP3znjV4GoCb1mItiMQm7Oo4IxBzSOJUUPY68d_H3ejfS5iD6u1AZMc/s1600/wp3.jpg) 0 -25px repeat-x;
  }
  
.showpageNum a:hover {
  background: #044697 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhOIfqQd5E_WGHXZyd7zClBAyrl4ZRMdKvxc0P8hFR9hfs3pN-dJNZ-qs7dJ0Qi8uOWIY5Fz28dMK2AYIghdI6UP3znjV4GoCb1mItiMQm7Oo4IxBzSOJUUPY68d_H3ejfS5iD6u1AZMc/s1600/wp3.jpg) 0 -50px repeat-x;
  }

.showpagePoint {
  color:#fff;
  padding: 3px 8px;
  margin: 2px;
  font-weight: 700;
  background: #e30000 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhOIfqQd5E_WGHXZyd7zClBAyrl4ZRMdKvxc0P8hFR9hfs3pN-dJNZ-qs7dJ0Qi8uOWIY5Fz28dMK2AYIghdI6UP3znjV4GoCb1mItiMQm7Oo4IxBzSOJUUPY68d_H3ejfS5iD6u1AZMc/s1600/wp3.jpg) 0 0 repeat-x;
  text-decoration: none;
  }

.showpageOf{
  margin:0 8px 0 0;
  }
Stili 5:

Kërko kodin (CTRL+F):
]]></b:skin>
dhe mbi të shtoje këtë:
.showpageArea {
  font-family:verdana,arial,helvetica;
  color: #000;
  font-size:11px; 
  margin:10px;
  }
  
.showpageArea a {
  color: #fff;
  }
  
.showpageNum a {
  padding: 3px 4px;
  margin:0 4px;
  text-decoration: none;
  border-top:2px solid #000;
  border-left:1px solid #000;
  border-right:1px solid #000;
  border-bottom:1px solid #000;
  background: #666 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3yXtXZBAfCrPlD1MtQ4s3_Plhzffyj4J-4Hg3RUGN99jNIHSTxznOycIYkUcK6ZTnsmR-uqoFB-MRq61h18MWrXtFFv9Vi04vV6PrDJ6qUEwWXHWCr346fLaTiuyi6t60sM68mbz7CaI/s1600/wp4.jpg) 0 -25px repeat-x;
  }
  
.showpageNum a:hover {
  border-top:2px solid #999;
  border-left:1px solid #999;
  border-right:1px solid #999;
  border-bottom:1px solid #999;
  background: #999 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3yXtXZBAfCrPlD1MtQ4s3_Plhzffyj4J-4Hg3RUGN99jNIHSTxznOycIYkUcK6ZTnsmR-uqoFB-MRq61h18MWrXtFFv9Vi04vV6PrDJ6qUEwWXHWCr346fLaTiuyi6t60sM68mbz7CaI/s1600/wp4.jpg) 0 -50px repeat-x;
  }

.showpagePoint {
  color:#fff;
  padding: 3px 8px;
  margin: 2px;
  font-weight: 700;
  border-top:2px solid #000;
  border-left:1px solid #000;
  border-right:1px solid #000;
  border-bottom:1px solid #000;
  background: #000 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3yXtXZBAfCrPlD1MtQ4s3_Plhzffyj4J-4Hg3RUGN99jNIHSTxznOycIYkUcK6ZTnsmR-uqoFB-MRq61h18MWrXtFFv9Vi04vV6PrDJ6qUEwWXHWCr346fLaTiuyi6t60sM68mbz7CaI/s1600/wp4.jpg) 0 0 repeat-x;
  text-decoration: none;
  }

.showpageOf{
  margin:0 8px 0 0;
  }
Stili 6:

Kërko kodin (CTRL+F):
]]></b:skin>
dhe mbi të shtoje këtë:
.showpageArea {
  font-family:verdana,arial,helvetica;
  color: #000;
  font-size:11px; 
  margin:10px;
  }
  
.showpageArea a {
  color: #fff;
  }
  
.showpageNum a {
  padding: 3px 8px;
  margin:0 4px;
  text-decoration: none;
  background: #333 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSF-fEM67bSgLqmcxLY8xtQO_jBtc4tvcs-8TrJ8XbIg4zdaUAd_ew-m12u4lwQNqOuz7IB8_484iQ8NoszF5ZV7pqqCyYxUJwnUdFE_S0oFMHUyG_rVtF-nhqodtN_YCVgUvzKwaXRG4/s1600/wp5.jpg) 0 -50px repeat-x;
  }
  
.showpageNum a:hover {
  background: #666 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSF-fEM67bSgLqmcxLY8xtQO_jBtc4tvcs-8TrJ8XbIg4zdaUAd_ew-m12u4lwQNqOuz7IB8_484iQ8NoszF5ZV7pqqCyYxUJwnUdFE_S0oFMHUyG_rVtF-nhqodtN_YCVgUvzKwaXRG4/s1600/wp5.jpg) 0 -25px repeat-x;
  }

.showpagePoint {
  color:#fff;
  padding: 3px 8px;
  margin: 2px;
  font-weight: 700;
  background: #06a2b9 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSF-fEM67bSgLqmcxLY8xtQO_jBtc4tvcs-8TrJ8XbIg4zdaUAd_ew-m12u4lwQNqOuz7IB8_484iQ8NoszF5ZV7pqqCyYxUJwnUdFE_S0oFMHUyG_rVtF-nhqodtN_YCVgUvzKwaXRG4/s1600/wp5.jpg) 0 0 repeat-x;
  text-decoration: none;
  }

.showpageOf{
  margin:0 8px 0 0;
  }
Stili 7:

Kërko kodin (CTRL+F):
]]></b:skin>
dhe mbi të shtoje këtë:
.showpageArea {
  font-family:verdana,arial,helvetica;
  color: #fff;
  font-size:11px; 
  margin:10px;
  padding:8px 20px;
  background: #333;
  }
  
.showpageArea a {
  color: #fff;
  }
  
.showpageNum a {
  padding: 3px 8px;
  margin:0 4px;
  text-decoration: none;
  background: #666;
  }
  
.showpageNum a:hover {
  background: #888;
  }

.showpagePoint {
  color:#fff;
  padding: 3px 8px;
  margin: 2px;
  font-weight: 700;
  background: #da6100;
  text-decoration: none;
  }

.showpageOf{
  margin:0 8px 0 0;
  }

Mos harroni ju duhet te zgjidhni vetem njërin nga 7 stilet me lart dhe ta vendosni mbi kodin ]]></b:skin>
Abonohuni në Blogger Albania përmes RSS feed për të marrë të gjitha të rejat në e-mailin tuaj, ose na ndiqni në Twitter.
Emri: E-mail:

4 komente:

al said... at June 15, 2011 at 11:44 AM

flm shum po funksionojka 100%
kam zgjedhur stilin e 6 nice

Dardan said... at June 15, 2011 at 11:47 AM

Arton, mund ta shoh faqen tende dhe cfare permbajtje ka.

al said... at June 16, 2011 at 7:46 AM

po vlla mund ta shohesh esht per fene islame
http://islamic-av.blogspot.com
me trego per mendimin tend dhe si ta rregulloj me mir

Dardan said... at June 16, 2011 at 8:07 AM

mir qenka, suksese, Allahu te ndihmoft

Post a Comment

Nëse keni ndonjë pyetje, ju lutemi që të siguroheni që pyetjen ta formuloni sa më qartë në mënyrë që ne ta kuptojmë dhe të ju kthejmë përgjigje të plotë. Mos reklamoni në komente, gjithashtu mos fyeni, shani etj. Sepse të gjitha komentet moderohen nga ne e pastaj publikohen në portal.