ব্লগস্পটে প্রত্যেক এডমিন এর পোষ্টের সংখ্যা দেখান আলাদা পেইজে

Show Author Post Counter in Static Page on Blogger - ব্লগস্পট সাইটে যাদের একের অধিক লেখক (Author) আছেন তাদের কে কতটি পোষ্ট আপনার ব্লগে করেছে তা একটি পেইজের মাধ্যেমে ভিজিটরদের দেখাতে পারবেন।

মনে করুন রহিম আপনার ব্লগের লেখক। সে আপনার ব্লগে ৪০ টি পোষ্ট করেছে। অপরদিকে করিম ও আপনার ব্লগের লেখক। সে আপনার ব্লগে পোষ্ট করেছে ১০টি। এখন আপনি চাচ্ছেন যে আপনার ব্লগের ভিজিটররা দেখুক যে কে কতটি পোষ্ট করেছে। এটি আপনি আপনার ব্লগে একটি পেইজ এর মাধ্যমে দেখাতে পারবেন।

ডেমো

আপনি যদি মনে মনে এতদিন ধরে এটি খুজে থাকেন তাহলে আজকেই সেটা খুজার অবসান ঘটূক। তাহলে চলুন কাজ শুরু করে দেই।
প্রথমে আপনার ব্লগার ড্যাশ বোর্ডে ঢুকে একটি নতুন পেইজ তৈরী করুন এবং এই পেইজের HTML Section এ নিচের কোডটুকু কপি করে পেষ্ট করে দিন। এবং পেইজটি সেভ করে দিন।
</div>
<div><span class="token tag"><span class="token punctuation"><</span>div <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span>'container'</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span>'centered'</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span>'text/javascript'</span><span class="token punctuation">></span></span> //<span class="token cdata"><![CDATA[ var maxUserNameLength=15; var txtAuthorLine="[image] <h5> [user] </h5>has published <b> [count] </b> [post]"; var sizeAvatar=150; var cropAvatar=true; var urlNoAvatar="http://lh4.googleusercontent.com/-069mnq7DV_g/TvgRrBI_JaI/AAAAAAAAAic/Iot55vywnYw/s"+sizeAvatar+"/avatar_blue_m_96.png"; function replaceAuthorVars(l,k,p){if(!k||!k.author){return l }var r=k.author; var o="";if(r.uri&&r.uri.$t!=""){o=r.uri.$t }var n=urlNoAvatar; if(r.gd$image&&r.gd$image.src){n=r.gd$image.src }if(n=="http://img2.blogblog.com/img/b16-rounded.gif"&&urlNoAvatar!=""){n=urlNoAvatar }var t="s"+sizeAvatar; n=n.replace(/\/s\d\d+-c\//,"/"+t+"-c/"); if(cropAvatar){t+="-c" }n=n.replace(/\/s\d\d+(-c){0,1}\//,"/"+t+"/"); var m=r.name.$t; var q='<img class="author-avatar" height="'+sizeAvatar+'" width="'+sizeAvatar+'" title="'+m+'" src="'+n+'" />'; if(o!=""){q=""+q+"" }if(maxUserNameLength>3&&m.length>maxUserNameLength){m=m.substr(0,maxUserNameLength-3)+"..." }var s=m;if(o!=""){s=""+s+"" }l=l.replace("[user]",s); l=l.replace("[image]",q); l=l.replace("[#]",p); l=l.replace("[count]",k.count); if(k.count!=1){l=l.replace("[post]","posts") }else{l=l.replace("[post]","post") }return l}var blauthors={}; var blndxbase=1; function showAuthors(i){for(var p=0; p<i.feed.entry.length; p++){var m=i.feed.entry[p]; var o="";if(m.author[0].uri&&m.author[0].uri.$t!=""){o=m.author[0].uri.$t }var n=m.author[0].name.$t; if(blauthors[n]){blauthors[n].count++ }else{var q=new Object(); q.author=m.author[0]; q.count=1;blauthors[n]=q }}if(i.feed.entry.length==500){blndxbase+=500; document.write('<script type="text/javascript" src="http://'+window.location.hostname+"/feeds/posts/default?redirect=false&max-results=500&start-index="+blndxbase+'&alt=json-in-script&callback=showAuthors"><\/script>'); return}var r=[]; for(var l in blauthors){r.push([l,blauthors[l]]) }r.sort(function(a,b){if(b[1].count-a[1].count){return b[1].count-a[1].count }return(a[1].author.name.$t.toLowerCase()<b[1].author.name.$t.toLowerCase())?-1:1 });document.write('<div class="blog-author">'); for(var p=0; p<r.length; p++){var k=r[p][1]; document.write('<div class="author-line">'); document.write(replaceAuthorVars(txtAuthorLine,k,p+1)); document.write("</div>") }document.write("</div>") }document.write('<script type="text/javascript" src="http://'+window.location.hostname+'/feeds/posts/default?redirect=false&max-results=500&alt=json-in-script&callback=showAuthors"><\/script>'); //]]></span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span> <span class="token style"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>style</span> <span class="token attr-name">scoped</span><span class="token attr-value"><span class="token punctuation">=</span>""</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span>"text/css"</span><span class="token punctuation">></span></span> <span class="token selector">.container</span><span class="token punctuation">{</span><span class="token property">width</span><span class="token punctuation">:</span>96%<span class="token punctuation">}</span> <span class="token selector">.centered</span><span class="token punctuation">{</span><span class="token property">text-align</span><span class="token punctuation">:</span>center<span class="token punctuation">;</span><span class="token property">font-size</span><span class="token punctuation">:</span>90%<span class="token punctuation">;</span><span class="token property">margin</span><span class="token punctuation">:</span>0 auto<span class="token punctuation">;</span><span class="token property">padding</span><span class="token punctuation">:</span>10px 0 40px 0<span class="token punctuation">;</span><span class="token property">width</span><span class="token punctuation">:</span>100%<span class="token punctuation">;</span><span class="token property">position</span><span class="token punctuation">:</span>relative<span class="token punctuation">}</span> <span class="token selector">.author-line </span><span class="token punctuation">{</span><span class="token property">padding</span><span class="token punctuation">:</span>20px<span class="token punctuation">;</span><span class="token property">width</span><span class="token punctuation">:</span>150px<span class="token punctuation">;</span><span class="token property">height</span><span class="token punctuation">:</span>auto<span class="token punctuation">;</span><span class="token property">margin</span><span class="token punctuation">:</span>20px<span class="token punctuation">;</span><span class="token property">text-align</span><span class="token punctuation">:</span>center<span class="token punctuation">;</span><span class="token property">display</span><span class="token punctuation">:</span>inline-block<span class="token punctuation">;</span><span class="token property">background</span><span class="token punctuation">:</span>#f9f9f9<span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span>#444<span class="token punctuation">;</span><span class="token property">opacity</span><span class="token punctuation">:</span>0.9<span class="token punctuation">;</span><span class="token property">transition</span><span class="token punctuation">:</span>all 0.6s<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">.author-line:hover </span><span class="token punctuation">{</span><span class="token property">box-shadow</span><span class="token punctuation">:</span>0 0 10px rgba(0,0,0,0.2)<span class="token punctuation">;</span><span class="token property">background</span><span class="token punctuation">:</span>#fff<span class="token punctuation">;</span><span class="token property">opacity</span><span class="token punctuation">:</span>1<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">.author-avatar </span><span class="token punctuation">{</span><span class="token property">vertical-align</span><span class="token punctuation">:</span>middle<span class="token punctuation">;</span><span class="token property">margin-bottom</span><span class="token punctuation">:</span>10px<span class="token punctuation">;</span><span class="token property">border-radius</span><span class="token punctuation">:</span>3px<span class="token punctuation">;</span><span class="token property">box-shadow</span><span class="token punctuation">:</span>0px 0px 5px 0px rgba(0,0,0,0.1)<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">.author-line h5</span><span class="token punctuation">{</span><span class="token property">color</span><span class="token punctuation">:</span>#fff<span class="token punctuation">;</span><span class="token property">margin</span><span class="token punctuation">:</span>20px auto<span class="token punctuation">;</span><span class="token property">padding</span><span class="token punctuation">:</span>6px 12px<span class="token punctuation">;</span><span class="token property">background</span><span class="token punctuation">:</span>#7798db<span class="token punctuation">;</span><span class="token property">border-radius</span><span class="token punctuation">:</span>3px<span class="token punctuation">;</span><span class="token property">transition</span><span class="token punctuation">:</span>all 0.5s<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">.author-line h5:hover</span><span class="token punctuation">{</span><span class="token property">background</span><span class="token punctuation">:</span>#6381c0<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">#sidebar-wrapper </span><span class="token punctuation">{</span><span class="token property">display</span><span class="token punctuation">:</span>none<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">#post-wrapper </span><span class="token punctuation">{</span><span class="token property">width</span><span class="token punctuation">:</span>100%<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">.post-inner </span><span class="token punctuation">{</span><span class="token property">padding</span><span class="token punctuation">:</span>0<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">h3.post-title a, h2.post-title a, h1.post-title a, h2.post-title, h1.post-title </span><span class="token punctuation">{</span><span class="token property">font-weight</span><span class="token punctuation">:</span>700<span class="token punctuation">;</span><span class="token property">font-size</span><span class="token punctuation">:</span>2rem<span class="token punctuation">;</span><span class="token property">color</span><span class="token punctuation">:</span>#999<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token selector">.post-body p,.post-body code </span><span class="token punctuation">{</span><span class="token property">font-size</span><span class="token punctuation">:</span>1.3rem<span class="token punctuation">;</span><span class="token property">font-weight</span><span class="token punctuation">:</span>700<span class="token punctuation">;</span><span class="token punctuation">}</span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>style</span><span class="token punctuation">></span></span></span></div>
<div>
কোন সমস্যা হলে টিউনমেন্টে জানাবেন অথবা আমি আছি ফেইসবুকে অথবা যোগদিন বাংলাদেশের সবচেয়ে বড় ব্লগার গ্রুফ Blogspot Blogger's Forum Bangladesh ফেইসবুক গ্রুপে।
সৌজন্যেঃ MS Design

Level 0

আমি মোহাম্মাদ সুবেল। বিশ্বের সর্ববৃহৎ বিজ্ঞান ও প্রযুক্তির সৌশল নেটওয়ার্ক - টেকটিউনস এ আমি 12 বছর 6 মাস যাবৎ যুক্ত আছি। টেকটিউনস আমি এ পর্যন্ত 34 টি টিউন ও 140 টি টিউমেন্ট করেছি। টেকটিউনসে আমার 0 ফলোয়ার আছে এবং আমি টেকটিউনসে 0 টিউনারকে ফলো করি।

আমি জানি এটা সত্যিই। তাই সত্যিই বলছি এটা সত্যিই।


টিউনস


আরও টিউনস


টিউনারের আরও টিউনস


টিউমেন্টস

ভাইয়া কাজ হয় না

vai kaj hoynah keno