This Recent Comments gizmo for Blogger can show the foremost recent comments on your blog's sidebar, showing a piece of the last comments together with the title of the post wherever the comment was created. The comments are gathered in down order with the most recent comments at the highest and therefore the older ones at all-time low.
The appliance is coded in JavaScript and titled with CSS however there hasn't been extra an excessive amount of, so it may match the colour theme of your Blogger guide.
Parameters to be configured:
a. range of comments - total range of comments to display;
b. range of words per comment excerpt - the primary "n'' words of the comment are listed.
c. Posts on that a comment has been created - you'll be able to either hide the post titles or show them;
d. Date on that the comment has been published - either show or hide it;
If you want to add a Recent comments widget please follow all steps:
How To Add Recent Comments Widget on Blogger
1. Go to to your Blogger Dashboard, select your blog > go to "Layout" click the "Add a Gadget" link:2. From the pop-up window, scroll down, click on the "HTML/JavaScript" option:
3. Just copy and paste the below code in the HTML/JavaScript box:
<script type="text/javascript">
var a_rc = 5;
var m_rc = false;
var n_rc = true;
var o_rc = 100;
function showrecentcomments(e){for(var r=0;r<a_rc;r++){var t,n=e.feed.entry[r];if(r==e.feed.entry.length)break;for(var i=0;i<n.link.length;i++)if("alternate"==n.link[i].rel){t=n.link[i].href;break}t=t.replace("#","#");var a=t.split("#");a=a[0];var c=a.split("/");c=c[5],c=c.split(".html"),c=c[0];var s=c.replace(/-/g," ");s=s.link(a);var o=n.published.$t,l=(o.substring(0,4),o.substring(5,7)),u=o.substring(8,10),m=new Array;if(m[1]="Jan",m[2]="Feb",m[3]="Mar",m[4]="Apr",m[5]="May",m[6]="Jun",m[7]="Jul",m[8]="Aug",m[9]="Sep",m[10]="Oct",m[11]="Nov",m[12]="Dec","content"in n)var d=n.content.$t;else if("summary"in n)var d=n.summary.$t;else var d="";var v=/<\S[^>]*>/g;if(d=d.replace(v,""),document.write('<div class="rcw-comments">'),1==m_rc&&document.write("On "+m[parseInt(l,10)]+" "+u+" "),document.write('<span class="author-rc"><a href="'+t+'">'+n.author[0].name.$t+"</a></span> commented"),1==n_rc&&document.write(" on "+s),0==o_rc)document.write("</div>");else if(document.write(": "),d.length<o_rc)document.write("<i>“"),document.write(d),document.write("”</i></div>");else{document.write("<i>“"),d=d.substring(0,o_rc);var w=d.lastIndexOf(" ");d=d.substring(0,w),document.write(d+"…”</i></div>"),document.write("")}}}
</script><script src=http://pcdry.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments></script><div style="font-size: 10px; float: right;">Get this <a href="http://helplogger.blogspot.com/2012/03/recent-comments-widget-for-blogger.html">Recent Comments Widget</a></div>
<style type="text/css">
.rcw-comments a {text-transform: capitalize;}
.rcw-comments {border-bottom: 1px dotted;padding: 7px 0;}
</style>
4. Replace http://pcdry.com with your address .
Other settings:
-You can change the number of comments that are being displayed, replace the "5" value from a_rc=5;
- Change the date on which the comment has been made, change the "false" text from m_rc=false to "true";
- You can hide the post titles, change the "true" text from n_rc=true to "false";
- You can show more or less comment characters, change the "100" value from o_rc=100
Step 5. Click the "Save" and enjoy
No comments:
Write التعليقات