Se afișează postările cu eticheta Blogger.com. Afișați toate postările
Se afișează postările cu eticheta Blogger.com. Afișați toate postările
Cum se pun poze in Blogger? Ghid pentru incepatori

Cum se pun poze in Blogger? Ghid pentru incepatori

Numarul de comentarii si postari in Blogger. Cod javascript care arata cate comentarii si postari are blogul tau

Tot ce trebuie sa faci pentru a afisa numarul total de comentarii primite si numarul de postari (posturi publicate) in cadrul blogului tau furnizat de Google, Blogger este sa adaugi in editorul de elemente grafice urmatoarele instructiuni javascript.

Dupa ce le-ati adaugat intr-un widget trebuie sa modificati adresa http://numelebloguluitau.ro cu cea corecta a blogului pe care ruleaza.


<script style="text/javascript">
function showpostcount(json) {
document.write('<b>Blog</b>: ' + parseInt(json.feed.openSearch$totalResults.$t,10) + ' postari active<br>');
}</script>

<script src="http://numelebloguluitau.ro/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script>

<script style="text/javascript">
function showcommentcount(json) {
document.write('' + parseInt(json.feed.openSearch$totalResults.$t,10) + ' comentarii sub moderare<br>');
}</script>

<script src="http://numelebloguluitau.ro/feeds/comments/default?alt=json-in-script&callback=showcommentcount"></script>


Succes!

Numarul de comentarii si postari in Blogger. Cod javascript care arata cate comentarii si postari are blogul tau

Blogger: Cum adaugi in Blogspot, postari similare sub postari. Vezi cod javascript pentru postari similare

Daca esti posesorul unui blog hostuit pe Blogger (Blogspot) si doresti sub postarea curenta sa afisezi si alte link-uri similare ale postarii curente, din aceeasi categorie (tag) trebuie sa copiezi codul de mai jos si sa-l inserezi in pagina de editare al template-ului curent.

Tot ce aveti de facut este sa paste-uiti codul in sectiunea unde doriti sa apara link-urile similare structurate.

Inainte de a incepe, va rog sa va salvati local copia template-ului curent!




<b:if cond='data:blog.pageType == "item"'>
<div class='similiar'>


<div class='widget-content'>
<h3>Similar posts</h3>
<div id='data2007'/><br/><br/>
<div id='hoctro'>
<br/>
</div>
<script type='text/javascript'>

var homeUrl3 = &quot;<data:blog.homepageUrl/>&quot;;
var maxNumberOfPostsPerLabel = 4;
var maxNumberOfLabels = 10;

maxNumberOfPostsPerLabel = 100;
maxNumberOfLabels = 3;


function listEntries10(json) {
var ul = document.createElement(&#39;ul&#39;);
var maxPosts = (json.feed.entry.length &lt;= maxNumberOfPostsPerLabel) ?
json.feed.entry.length : maxNumberOfPostsPerLabel;
for (var i = 0; i &lt; maxPosts; i++) {
var entry = json.feed.entry[i];
var alturl;

for (var k = 0; k &lt; entry.link.length; k++) {
if (entry.link[k].rel == &#39;alternate&#39;) {
alturl = entry.link[k].href;
break;
}
}
var li = document.createElement(&#39;li&#39;);
var a = document.createElement(&#39;a&#39;);
a.href = alturl;

if(a.href!=location.href) {
var txt = document.createTextNode(entry.title.$t);
a.appendChild(txt);
li.appendChild(a);
ul.appendChild(li);
}
}
for (var l = 0; l &lt; json.feed.link.length; l++) {
if (json.feed.link[l].rel == &#39;alternate&#39;) {
var raw = json.feed.link[l].href;
var label = raw.substr(homeUrl3.length+13);
var k;
for (k=0; k&lt;20; k++) label = label.replace(&quot;%20&quot;, &quot; &quot;);
var txt = document.createTextNode(label);
var h = document.createElement(&#39;b&#39;);
h.appendChild(txt);
var div1 = document.createElement(&#39;div&#39;);
div1.appendChild(h);
div1.appendChild(ul);
document.getElementById(&#39;data2007&#39;).appendChild(div1);
}
}
}
function search10(query, label) {

var script = document.createElement(&#39;script&#39;);
script.setAttribute(&#39;src&#39;, query + &#39;feeds/posts/default/-/&#39;
+ label +
&#39;?alt=json-in-script&amp;callback=listEntries10&#39;);
script.setAttribute(&#39;type&#39;, &#39;text/javascript&#39;);
document.documentElement.firstChild.appendChild(script);
}

var labelArray = new Array();
var numLabel = 0;

<b:loop values='data:posts' var='post'>
<b:loop values='data:post.labels' var='label'>
textLabel = &quot;<data:label.name/>&quot;;

var test = 0;
for (var i = 0; i &lt; labelArray.length; i++)
if (labelArray[i] == textLabel) test = 1;
if (test == 0) {
labelArray.push(textLabel);
var maxLabels = (labelArray.length &lt;= maxNumberOfLabels) ?
labelArray.length : maxNumberOfLabels;
if (numLabel &lt; maxLabels) {
search10(homeUrl3, textLabel);
numLabel++;
}
}
</b:loop>
</b:loop>
</script>
</div>

</div>
</b:if>





Succes!

Blogger: Cum adaugi in Blogspot, postari similare sub postari. Vezi cod javascript pentru postari similare

Widget: Adaugare numaratoari de pagini in Blogger ca in Wordpress

Pentru a adauga paginarea in blogul sustinut de Blogger (Blogspot) trebuie mai intai sa va salvati pe local tema curenta cu toate inregistrarile (widgets, coduri javascript, modulele personalizate. Procedura salveaza fisierul in format XML.

Dupa ce ati efectuat aceasta procedura, cautati in codul sursa al templateului Blogger urmatoarea linie de cod:

]]></b:skin>


apoi in cadrul acestei sectiuni adaugati sub linia amintita urmatoarele instructiuni de cod:


.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;
}



Dupa ce ati adaugat aceste instructiuni, va rog sa salvati din nou template-ul pentru a se inmagazina (salva) modificarile efectuate in pagina template-ului editat de catre Dumnevoastra.

O noua etapa de urmat - cautati urmatoarea secventa de instructiuni javascript:

<b:section class=’main’ id=’main’ showaddelement=’yes’>
<b:widget id=’Blog1′ locked=’true’ title=’Blog Posts’ type=’Blog’/>
</b:section>



apoi dupa instructiunea </b:section> adaugati:



<script type='text/javascript'>

var home_page_url = location.href;


var pageCount=10;
var displayPageNum=6;
var upPageWord ='Previous';
var downPageWord ='Next';


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+'&amp;max-results='+pageCount;
}
}
itemCount++;

}

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

fFlag++;
}

if(p==(thisNum-1)){
html += '&lt;span class=&quot;showpagePoint&quot;&gt;'+thisNum+'&lt;/span&gt;';
}else{
if(p==0){
html += '&lt;span class=&quot;showpageNum&quot;&gt;&lt;a href=&quot;/&quot;&gt;1&lt;/a&gt;&lt;/span&gt;';

}else{
html += '&lt;span class=&quot;showpageNum&quot;&gt;&lt;a href=&quot;'+htmlMap[p]+'&quot;&gt;'+ (p+1) +'&lt;/a&gt;&lt;/span&gt;';
}
}

if(eFlag ==0 &amp;&amp; p == thisNum){
downPageHtml = '&lt;span class=&quot;showpage&quot;&gt; &lt;a href=&quot;'+htmlMap[p]+'&quot;&gt;'+ downPageWord +'&lt;/a&gt;&lt;/span&gt;';
eFlag++;
}
}
}

if(thisNum&gt;1){
html = ''+upPageHtml+' '+html +' ';
}

html = '&lt;div class=&quot;showpageArea&quot;&gt;&lt;span style=&quot;COLOR: #000;&quot; class=&quot;showpageOf&quot;&gt; Pages ('+(postNum-1)+')&lt;/span&gt;'+html;

if(thisNum&lt;(postNum-1)){
html += downPageHtml;
}

if(postNum==1) postNum++;
html += '&lt;/div&gt;';


var pageArea = document.getElementsByName(&quot;pageArea&quot;);
var blogPager = document.getElementById(&quot;blog-pager&quot;);

if(postNum &lt;= 2){
html ='';
}

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

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

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


}


function showpageCount2(json) {

var thisUrl = home_page_url;
var htmlMap = new Array();
var isLablePage = thisUrl.indexOf(&quot;/search/label/&quot;)!=-1;
var thisLable = isLablePage ? thisUrl.substr(thisUrl.indexOf(&quot;/search/label/&quot;)+14,thisUrl.length) : &quot;&quot;;
thisLable = thisLable.indexOf(&quot;?&quot;)!=-1 ? thisLable.substr(0,thisLable.indexOf(&quot;?&quot;)) : thisLable;
var thisNum = 1;
var postNum=1;
var itemCount = 0;
var fFlag = 0;
var eFlag = 0;
var html= '';
var upPageHtml ='';
var downPageHtml ='';

 

var labelHtml = '&lt;span class=&quot;showpageNum&quot;&gt;&lt;a href=&quot;/search/label/'+thisLable+'?&amp;max-results='+pageCount+'&quot;&gt;';
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+'&amp;max-results='+pageCount;

}
}
itemCount++;
}

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

fFlag++;
}

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

if(eFlag ==0 &amp;&amp; p == thisNum){
downPageHtml = '&lt;span class=&quot;showpage&quot;&gt; &lt;a href=&quot;'+htmlMap[p]+'&quot;&gt;'+ downPageWord +'&lt;/a&gt;&lt;/span&gt;';
eFlag++;
}
}
}

if(thisNum&gt;1){
if(!isLablePage){
html = ''+upPageHtml+' '+html +' ';
}else{
html = ''+upPageHtml+' '+html +' ';
}
}

html = '&lt;div class=&quot;showpageArea&quot;&gt;&lt;span style=&quot;COLOR: #000;&quot; class=&quot;showpageOf&quot;&gt; Pages ('+(postNum-1)+')&lt;/span&gt;'+html;

if(thisNum&lt;(postNum-1)){
html += downPageHtml;
}

if(postNum==1) postNum++;
html += '&lt;/div&gt;';

var pageArea = document.getElementsByName(&quot;pageArea&quot;);
var blogPager = document.getElementById(&quot;blog-pager&quot;);

if(postNum &lt;= 2){
html ='';
}

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

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

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


}


</script>

<script type='text/javascript'>

var thisUrl = home_page_url;
if (thisUrl.indexOf(&quot;/search/label/&quot;)!=-1){
if (thisUrl.indexOf(&quot;?updated-max&quot;)!=-1){
var lblname1 = thisUrl.substring(thisUrl.indexOf(&quot;/search/label/&quot;)+14,thisUrl.indexOf(&quot;?updated-max&quot;));
}else{
var lblname1 = thisUrl.substring(thisUrl.indexOf(&quot;/search/label/&quot;)+14,thisUrl.indexOf(&quot;?&amp;max&quot;));
}
}

var home_page = &quot;/&quot;;
if (thisUrl.indexOf(&quot;?q=&quot;)==-1 &amp;&amp; thisUrl.indexOf(&quot;.html&quot;)==-1){
if (thisUrl.indexOf(&quot;/search/label/&quot;)==-1){
document.write('&lt;script src=&quot;'+home_page+'feeds/posts/summary?alt=json-in-script&amp;callback=showpageCount&amp;max-results=99999&quot; &gt;&lt;\/script&gt;')
}else{document.write('&lt;script src=&quot;'+home_page+'feeds/posts/full/-/'+lblname1+'?alt=json-in-script&amp;callback=showpageCount2&amp;max-results=99999&quot; &gt;&lt;\/script&gt;')
}
}
</script>



Va rog insistent, salvati din nou template-ul modificat!

Pentru a modifica si customiza template-ul curent, va recomand urmatoarele setari de finete in cadrul instructiunilor javascript adaugate! Lista de comenzi pentru paginare, numerotare si afisare:

var pageCount=10;

var displayPageNum=6;


Succes!

Widget: Adaugare numaratori de pagini in Blogger ca in Wordpress

Professional Blogger Templates

Din nou, va pun la dispozitie o colectie utila de template-uri speciale pentru platforma Blogger (Blogger.com) / blogspot.com, in format XML, usor instalabile si usor configurabile.

Pentru a le vizualiza folositi Preview si Download pentru a le aduce local pe computerul dumneavoastra.

The Daily Inspired by Woork



Dreamwork Redux (Converted by JackBook)



Simplex WorldNews Blogger Template

Preview | Download

Emperors Blogger Template

Preview | Download

BloggerMag Blogger Template




Rockwell Blogger Template

Preview | Download

Promagazine Black Blogger Template

Preview | Download

Professional Blogger Templates

Blogger Templates: Teme pentru Blogger

Aveti la indemana, cele mai usor instalabile si customizabile teme gratuite pentru Blogger.com (Blogspot) in format XML.

Bloggerpress
bloggerpress




Copper Dust
copper-dust


Hybrid Gallery
hybrid-gallery


Irresistable
irresistable


Massive Attack
massive-attack


Curtain
curtain


Burn Out Bright
burn-out-bright


Gallery
gallery


Cold Blue
cool-blue



Hybrid News
hybrid-news


Blues
blues


Christmas V2.0
christmas1


Daily Inspired
daily-inspired
DEMO || DOWNLOAD


Driftwood Magazine
driftwood-mag


Gotham Nights Dark
gotham-nights


Illacrimo
illacrimo


Mahinahon
mahinahon


Magazeen
magaeen


Modularity Lite
modularity-lite


Natural Gloom
natural-gloom
DEMO || DOWNLOAD


Nexus 5
nexus-5


Not a Monster
not-a-monster


ProPress
propress


News One
newsone


Showcase Light
showcase-light


Simplicity
simplicity-v2


Simplo
simplo


Skyline
skyline


Smash My Typo
smash-my-typo


Tequilas Flamejantes - Dark
tequilas-dark
DEMO || DOWNLOAD


Tequilas Flamejantes - Light
tequilas-light
DEMO || DOWNLOAD


Typography
typography


Typoork
typoork


Vibrant
vibrant


Woork Style
woorkstyle


WP Premium
wp-premium


sGallery Grunge
sgallery


2Plus
2Plus


Emire
emire


Mad Magazine
mad-magazine


Masunurin
masunurin


Mocha Choco
mocha-choca


Motion Style
motion style


MSN Inspirat
msn-inspirat


Pixious
pixious


Scrappy
Scrappy


Cellar Heat Light
cellar-heat
DEMO || DOWNLOAD


Gazette Edition
gazette edition
DEMO || DOWNLOAD

Blogger Templates: Teme pentru Blogger