Sunday, January 11, 2015

Recent Post Widget with Thumbnails (+Hover Effect) for Blogger.

No comments:
Recent Post Widget for BloggerRecent post widget is a blogger widget which displays latest posts from your blog. Along with random post widget, related post widget and popular post widget, it makes a perfect combination for maximum exposure of you content to the audience.

The background image in the left figure gives you a idea of what the widget looks like after installing this widget into your blog.

For further modifications and designs, check out customization part at the last of this post.

How to Install Random Post Widget in Sidebar?


Step1. Login to Blogger Dashboard, Go to “Layout” and then click “Add a Gadget” in sidebar area.
Add-a-Gadget
Step 2. Select “HTML/JavaScript” in the list of widgets:
HTML-Javascript
Step 3:  In “Title” text area, enter “Recent Posts” and paste the following code in “Content” text area:
<style type='text/css'> .recent_thumb {float: left; margin: 0 12px 2px 0; border: 1px solid #8ABB8A; width: 72px; height: 72px; border-radius: 5px;} .recent_thumb:hover {opacity:0.6;} .recent_posts_with_thumbs {float: left;} ul.recent_posts_with_thumbs {padding: 0 0 0 0em; margin: 0; line-height: 1.2; list-style: none;} .recent_posts_with_thumbs li {padding: .7em 0; min-height:75px; list-style: none; font-size: 13px;} .recent_posts_with_thumbs a {text-decoration:none;}</style>

<script style='text/javascript'>
var numposts = 5;
var showpostthumbnails = true;
var displaymore = false;
var displayseparator = false;
var showcommentnum = false;
var showpostdate = false;
var showpostsummary = false;
var numchars = 100;
</script>

<script style='text/javascript'>
function showrecentpostswiththumbs(json){document.write('<div class="recent_posts_with_thumbs">');for(var i=0;i<numposts;i++){var entry=json.feed.entry[i];var posttitle=entry.title.$t;var posturl;if(i==json.feed.entry.length)break;for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='replies'&&entry.link[k].type=='text/html'){var commenttext=entry.link[k].title;var commenturl=entry.link[k].href;}
if(entry.link[k].rel=='alternate'){posturl=entry.link[k].href;break;}}var thumburl;try{thumburl=entry.media$thumbnail.url;}catch(error)
{s=entry.content.$t;a=s.indexOf("<img");b=s.indexOf("src=\"",a);c=s.indexOf("\"",b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")){thumburl=d;}else thumburl='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAA9CBPsqzjBZsLi7tsCYjrPNR0ixtUdUVlpDz8YJlSWg4U5O_TK07txZgjREp4FEBWwlNOm6LphQXH6gwaC7RB5uBWHgkKPfj-_daMC4Zp8c710SjO6cLq5_bdyEcQTs9RZIllqvHfvw/s1600/no_thumb.png';}
var postdate=entry.published.$t;var cdyear=postdate.substring(0,4);var cdmonth=postdate.substring(5,7);var cdday=postdate.substring(8,10);var monthnames=new Array();monthnames[1]="Jan";monthnames[2]="Feb";monthnames[3]="Mar";monthnames[4]="Apr";monthnames[5]="May";monthnames[6]="Jun";monthnames[7]="Jul";monthnames[8]="Aug";monthnames[9]="Sep";monthnames[10]="Oct";monthnames[11]="Nov";monthnames[12]="Dec";document.write('<li>');if(showpostthumbnails==true)
document.write('<img class="recent_thumb" src="'+thumburl+'"/>');document.write('<a href="'+posturl+'" target ="_top">'+posttitle+'</a><br>');if("content"in entry){var postcontent=entry.content.$t;}
else
if("summary"in entry){var postcontent=entry.summary.$t;}
else var postcontent="";var re=/<\S[^>]*>/g;postcontent=postcontent.replace(re,"");if(showpostsummary==true){if(postcontent.length<numchars){document.write('<i>');document.write(postcontent);document.write('</i>');}
else{document.write('<i>');postcontent=postcontent.substring(0,numchars);var quoteEnd=postcontent.lastIndexOf(" ");postcontent=postcontent.substring(0,quoteEnd);document.write(postcontent+'...');document.write('</i>');}}
var towrite='';var flag=0;document.write('<br><strong>');if(showpostdate==true){towrite=towrite+monthnames[parseInt(cdmonth,10)]+'-'+cdday+' - '+cdyear;flag=1;}
if(showcommentnum==true)
{if(flag==1){towrite=towrite+' | ';}
if(commenttext=='1 Comments')commenttext='1 Comment';if(commenttext=='0 Comments')commenttext='No Comments';commenttext='<a href="'+commenturl+'" target ="_top">'+commenttext+'</a>';towrite=towrite+commenttext;flag=1;;}
if(displaymore==true)
{if(flag==1)towrite=towrite+' | ';towrite=towrite+'<a href="'+posturl+'" class="url" target ="_top">More -></a>';flag=1;;}
document.write(towrite);document.write('</strong></li>');if(displayseparator==true)
if(i!=(numposts-1))
document.write('<hr size=0.5>');}document.write('</div>');}
</script>
<script src='/feeds/posts/default?orderby=published&alt=json-in-script&callback=showrecentpostswiththumbs'></script><div style='float:right; font-size:10px; vertical-align: bottom; float: right;'><a href='http://blogger-hatchery.blogspot.com/2014/12/nrelate-alternatives-related-post.html' target='_blank'>Get this widget</a></div>

Step 4. Click on “Save” to save the changes.

Step 5. Now you have done. The recent posts widget will appear in sidebar of your website.

Customization of Recent Post Widget:

The recent post widget can be customized in the following ways:
  1. Yellow highlighted code: Change number value from 5 to any other value equals to number of posts to Recent Post Widget with thumbnails + Post Date +Comment Enabled be shown in the widget.
  2. Orange highlighted code: Change value from “true” to “false” to not to display thumbnails with posts.
  3. Maroon highlighted code: Change value from “false” to “true” to not to display separator below posts.
  4. Green highlighted code: Replace “false” with “true” to show number of comments below posts titles in the widget.
  5. Red highlighted code: Replace “false” with “true” to display post publishing date in the widget.
  6. Purple highlighted code:  Replace “false” with “true” to display post summary below post titles in the widget. “numchars” value can be changed from 100 to any other value to suit the need of number of characters in the post summary.
The figure on the above right shows a snapshot of recent post widget with Comments, Date of publication, Separator and "More" enabled.

Note: For those who looking for similar design of Recent post widget and Popular post widget, install our popular post widget (with same design as given in this post) given here:

Popular Post Widget for blogger.

Subscribe us for more similar designs sets for both the widgets.
I am sure that this posts have helped you. You should share and subscribe for further updates and new themes for the widget.
In case of any inquiry, please use comment box.
Read More »

Popular Post Widget with Thumbnails and Hover Effect for Blogger.

1 comment:
Popular Post Widget for BloggertPopular Post Widget displays most visited posts from a blog in descending order.

It along with a combination of random post widget, recent post widget and related post widget makes a very good platform for maximum exposure of content of a blog to the audience.

It is damn easy to Install this widget in blogger template.


This popular post widget looks like as in figure given below (the heading design of this widget is the default heading design for widgets in sidebar in your blogger template)
Popular Post Widget SnapshotThis is matching design for bloggers who installed our recent post widget. We always releases matching designs for both widgets to keep looks of your blog consistent and uniform. So you are advised to subscribe us to get new theme for the widgets which then require minimum efforts for implementations.

Here is procedure to install popular post widget…

How to Install Random Post Widget in Sidebar?

Step1. Login to Blogger Dashboard, Go to “Layout” and then click “Add a Gadget” in sidebar area.

Add-a-Gadget
Step 2. Select “Popular Post” for the given widgets:

Popular Posts
Step 3. Configure the widget. Check the box against “image thumbnail”. Keep the checkbox against “snippet” empty. Snippet provide post summary below post titles.

Configure Popular Posts
Step 4.  Save the widget. Now go to “Template”>>”Edit Template”. Click anywhere in template area and press “Ctrl+F” to open search box. Search for the following code:
]]></b:skin>
Step 5. Paste the following code just above the previous code:
.widget-content {
    margin-top:10px;
}
.PopularPosts .widget-content ul {
    padding: 0 0 0 0em;
    margin: 0;
    line-height: 1.2;
    list-style: none;
    font-size: 13px;
}
.PopularPosts .item-thumbnail {
    float: left;
    margin: 0 12px 2px 0;
    border: 1px solid #8ABB8A;
    width: 72px;
    height: 72px;
    border-radius: 5px;
}
.PopularPosts .item-thumbnail a:hover {
    opacity: 0.6;
}

Customization:

  • Change the thumbnail dimensions by changing width and height in the yellow highlighted code.
Hoping that this post have helped you to implement this widget in your blog. Subscribe us to get more themes for the same widget.
For any inquiry, please use comment box.
Read More »

Sunday, January 4, 2015

Best Link Shorteners to Earn Money from Links.

No comments:
best link shortenersLink shorteners are the best ways to earn money form outbound links. Moreover, these ad networks provide entry and exit script which results into better CPM then any other sole CPM (Banner) ad networks. Entry script shows an interstitial ad page before visiting your website which increase your revenue.

Exit script is the best point of these ad networks. Exit script shows an interstitial ad page when visiting your website through browser’s back button, from an outbound link of your website. This results into maximum profit form your traffic.
Read More »

Thursday, January 1, 2015

Random Post Widget with Thumbnail & Hover Effect for Blogger Sidebar.

No comments:
Random Post Widget SidebarRandom Posts widget give maximum exposure of your content to your audience. Other content exposing widgets such as Related Posts Widget, Popular Posts Widget and Recent Posts widget expose your content according to a specified rule only.

For example, popular post widget displays posts depending upon number of page-views received by them. Page views for different posts remains in same descending order during a time period unless another posts get higher views.

For a regular visitor, this may be boring to see same content in sidebar of your blog during every visit.
Random Posts widget overcomes these limitations.

So, It is highly advised to install this widget along with other content exposing widgets to get a complementary effect between widgets to expose content up to maximum possible level.

How to Install Random Post Widget in Sidebar?

Step1. Login to Blogger Dashboard, Go to “Layout” and then click “Add a Gadget”.
Add a Gadget
Step 2. Select “HTML/JavaScript”:HTML-Javascript
Step 3:  In “Title” text area, enter “Random Posts” and paste the following code in “Content” text area:

<style>
.random-posts {
   width: 300px;
   text-align: left;
   font-size: 13px;
}
.random-posts a img {
  position: relative;
  border-radius: 5px;
  float: left;
  margin-right: 10px;
  margin-bottom: 1.5px;
  display: inline;
  border: 2px ridge #FDFFFE;
  height: 60px;
  width: 80px;
}
.random-posts img:hover{
  opacity: 0.6;
}
.random-posts li { 
  display: block;
  min-width: 260px;
  height: inherit;
  border: 1px solid #EEEEEE;
  margin: 5px 0px;
  padding: 7px;
  overflow: hidden;
  border-radius: 5px;
  background: #EDEDED;
}
.random-posts div {
  height: inherit;
  overflow: hidden;
}
.random-posts li:hover {background: #61E520;}
</style>
<div class='random-posts'>
<script type='text/javaScript'>
var rdp_numposts=3;
var rdp_snippet_length=0;
var rdp_info='yes';
var rdp_comment='Comments';
var rdp_disable='Comments Disabled';
var rdp_current=[];var rdp_total_posts=0;var rdp_current=new Array(rdp_numposts);function totalposts(json){rdp_total_posts=json.feed.openSearch$totalResults.$t}document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&max-results=0&callback=totalposts\"><\/script>');function getvalue(){for(var i=0;i<rdp_numposts;i++){var found=false;var rndValue=get_random();for(var j=0;j<rdp_current.length;j++){if(rdp_current[j]==rndValue){found=true;break}};if(found){i--}else{rdp_current[i]=rndValue}}};function get_random(){var ranNum=1+Math.round(Math.random()*(rdp_total_posts-1));return ranNum};
</script>
<script type='text/javaScript'>  
function random_posts(json){for(var i=0;i<rdp_numposts;i++){var entry=json.feed.entry[i];var rdp_posttitle=entry.title.$t;if('content'in entry){var rdp_get_snippet=entry.content.$t}else{if('summary'in entry){var rdp_get_snippet=entry.summary.$t}else{var rdp_get_snippet="";}};rdp_get_snippet=rdp_get_snippet.replace(/<[^>]*>/g,"");if(rdp_get_snippet.length<rdp_snippet_length){var rdp_snippet=rdp_get_snippet}else{rdp_get_snippet=rdp_get_snippet.substring(0,rdp_snippet_length);var space=rdp_get_snippet.lastIndexOf(" ");rdp_snippet=rdp_get_snippet.substring(0,space)+"&#133;";};for(var j=0;j<entry.link.length;j++){if('thr$total'in entry){var rdp_commentsNum=entry.thr$total.$t+' '+rdp_comment}else{rdp_commentsNum=rdp_disable};if(entry.link[j].rel=='alternate'){var rdp_posturl=entry.link[j].href;var rdp_postdate=entry.published.$t;if('media$thumbnail'in entry){var rdp_thumb=entry.media$thumbnail.url}else{rdp_thumb="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAA9CBPsqzjBZsLi7tsCYjrPNR0ixtUdUVlpDz8YJlSWg4U5O_TK07txZgjREp4FEBWwlNOm6LphQXH6gwaC7RB5uBWHgkKPfj-_daMC4Zp8c710SjO6cLq5_bdyEcQTs9RZIllqvHfvw/s1600/no_thumb.png"}}};document.write('<li style="list-style: none;">');document.write('<a href="'+rdp_posturl+'" rel="nofollow"><img alt="'+rdp_posttitle+'" src="'+rdp_thumb+'"/></a>');document.write('<div><a href="'+rdp_posturl+'" rel="nofollow" title="'+rdp_snippet+'">'+rdp_posttitle+'</a></div>');if(rdp_info=='yes'){document.write('<span><div  class="rp-info">'+rdp_postdate.substring(8,10)+'/'+rdp_postdate.substring(5,7)+'/'+rdp_postdate.substring(0,4)+' - '+rdp_commentsNum)+'</div></span>'};document.write('<br/><div class="rp-snippet">'+rdp_snippet+'</div><div style="clear:both"></div></li>')}};getvalue();for(var i=0;i<rdp_numposts;i++){document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&start-index='+rdp_current[i]+'&max-results=1&callback=random_posts\"><\/script>')};
</script><div style='float:right; font-size:10px; vertical-align: bottom; float: right;'><a href='http://blogger-hatchery.blogspot.com/2015/01/random-post-widget-with-thumbnail-hover.html' target='_blank'>Get this widget</a></div>
</div>

Note: The code given above are not suitable for installing widget below posts. For installing this widget below posts, use code given here: How to install random posts widget below posts?
Random Posts widget for sidebar

Step 4. Click on “Save” to save the changes.

Step 5. Now you have done. The random posts widget (snapshot given in right image) will appear in sidebar of your website.

Customization:

  1. Change no. of posts to be appearing in widget by changing value in yellow highlighted code (rdp_numposts=3) in Step 3. 
  2. Change value in red highlighted code (rdp_snippet_length=0;) from 0 to 100 for displaying a post summary below post links.
  3. Change value in orange highlighted code (rdp_info='yes') from “yes” to “no” to disable date and comments below post links.        
  4. Change the code highlighted in green color to change background of widget. Change second code to change background color during mouse hover.

I am sure that this posts have helped you. You should share and subscribe for further updates and new themes for the widget.

In case of any inquiry, please use comment box.
Read More »

Random Post Widget for Blogger with Thumbnail+Hover Effect and its Customization.

No comments:
random posts widgetRandom post widget in combination with Related posts widget gives maximum exposure of your content to your audience.
Currently available Related posts widget displays the posts covered under same label as the current post’s label. So other useful content under different labels remain unexposed.
But random post widget (snapshot given in image given below) displays posts randomly from entire list of blog posts unrelated to their labels, but this may leads to poor matching of articles. Thus any one of the two widget is not very helpful to take your audience to maximum content.

A complementary combination of both widgets is very helpful in maximum exposure of your content. Related posts widget can be installed with procedure given here: How to install Related posts widget at Blogger.com?

And, here is procedure to install the random post widget into your blog:

How to Install Random Post Widget at Blogger.com?

Step1. Make a backup of your current template. This will help you get previous look if something wrong takes place with implementation. If you don’t know how to make backup of blogger template, you can use this “Template>> Backup/Restore”. Random post widget.png

Step 2. After login to Blogger Dashboard, Go to “Template” and then click “Edit Html”.

Note: The code given below are not suitable for installing widget in sidebar. For installing this widget in sidebar, use code given here: How to install random posts widget in sidebar?

Step 3: Click anywhere inside the template code area, then press CTRL + F keys to open search box. Search for following code:
<div class='post-footer'>

You can select another div code where you want to appear the random post widget to appear as per requirement. By choosing the above code, the widget will appear just below your post.

Step 4. Just below the above code, paste the following code:
<b:if cond='data:blog.pageType != &quot;index&quot;'>
<div style='margin-top:20px;'>
<h2>Random Posts</h2>
<div class='random-posts'>
<script type='text/javaScript'>
var rdp_numposts=6;
var rdp_snippet_length=0;
var rdp_info=&#39;no&#39;;
var rdp_comment=&#39;Comments&#39;;
var rdp_disable=&#39;Comments Disabled&#39;;
var rdp_current=[];var rdp_total_posts=0;var rdp_current=new Array(rdp_numposts);function totalposts(json){rdp_total_posts=json.feed.openSearch$totalResults.$t}document.write(&#39;&lt;script type=\&quot;text/javascript\&quot; src=\&quot;/feeds/posts/default?alt=json-in-script&amp;max-results=0&amp;callback=totalposts\&quot;&gt;&lt;\/script&gt;&#39;);function getvalue(){for(var i=0;i&lt;rdp_numposts;i++){var found=false;var rndValue=get_random();for(var j=0;j&lt;rdp_current.length;j++){if(rdp_current[j]==rndValue){found=true;break}};if(found){i--}else{rdp_current[i]=rndValue}}};function get_random(){var ranNum=1+Math.round(Math.random()*(rdp_total_posts-1));return ranNum};
</script>
&lt;script type=&#39;text/javaScript&#39;&gt;  
function random_posts(json){for(var i=0;i&lt;rdp_numposts;i++){var entry=json.feed.entry[i];var rdp_posttitle=entry.title.$t;if(&#39;content&#39;in entry){var rdp_get_snippet=entry.content.$t}else{if(&#39;summary&#39;in entry){var rdp_get_snippet=entry.summary.$t}else{var rdp_get_snippet=&quot;&quot;;}};rdp_get_snippet=rdp_get_snippet.replace(/&lt;[^&gt;]*&gt;/g,&quot;&quot;);if(rdp_get_snippet.length&lt;rdp_snippet_length){var rdp_snippet=rdp_get_snippet}else{rdp_get_snippet=rdp_get_snippet.substring(0,rdp_snippet_length);var space=rdp_get_snippet.lastIndexOf(&quot; &quot;);rdp_snippet=rdp_get_snippet.substring(0,space)+&quot;&amp;#133;&quot;;};for(var j=0;j&lt;entry.link.length;j++){if(&#39;thr$total&#39;in entry){var rdp_commentsNum=entry.thr$total.$t+&#39; &#39;+rdp_comment}else{rdp_commentsNum=rdp_disable};if(entry.link[j].rel==&#39;alternate&#39;){var rdp_posturl=entry.link[j].href;var rdp_postdate=entry.published.$t;if(&#39;media$thumbnail&#39;in entry){var rdp_thumb=entry.media$thumbnail.url}else{rdp_thumb=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyYv9FHKGElAL3V4vq_-D6daRjj_rTT5ur5ivDouBKRYxgtuZu7qbTzfkZ_tQRdyWjplms3gJNVVzdCkd0qlEWgSNlM56Rbgl9-99k6_2474OnoJrCoctKtEthjB5Z26xJJegPL5tSWVU/s1600/no_thumb.png&quot;}}};document.write(&#39;&lt;li&gt;&#39;);document.write(&#39;&lt;a href=&quot;&#39;+rdp_posturl+&#39;&quot; rel=&quot;nofollow&quot;&gt;&lt;img alt=&quot;&#39;+rdp_posttitle+&#39;&quot; src=&quot;&#39;+rdp_thumb+&#39;&quot;/&gt;&lt;/a&gt;&#39;);document.write(&#39;&lt;div&gt;&lt;a href=&quot;&#39;+rdp_posturl+&#39;&quot; rel=&quot;nofollow&quot; title=&quot;&#39;+rdp_snippet+&#39;&quot;&gt;&#39;+rdp_posttitle+&#39;&lt;/a&gt;&lt;/div&gt;&#39;);if(rdp_info==&#39;yes&#39;){document.write(&#39;&lt;span&gt;&lt;div  class=&quot;rp-info&quot;&gt;&#39;+rdp_postdate.substring(8,10)+&#39;/&#39;+rdp_postdate.substring(5,7)+&#39;/&#39;+rdp_postdate.substring(0,4)+&#39; - &#39;+rdp_commentsNum)+&#39;&lt;/div&gt;&lt;/span&gt;&#39;};document.write(&#39;&lt;br/&gt;&lt;div class=&quot;rp-snippet&quot;&gt;&#39;+rdp_snippet+&#39;&lt;/div&gt;&lt;div style=&quot;clear:both&quot;&gt;&lt;/div&gt;&lt;/li&gt;&#39;)}};getvalue();for(var i=0;i&lt;rdp_numposts;i++){document.write(&#39;&lt;script type=\&quot;text/javascript\&quot; src=\&quot;/feeds/posts/default?alt=json-in-script&amp;start-index=&#39;+rdp_current[i]+&#39;&amp;max-results=1&amp;callback=random_posts\&quot;&gt;&lt;\/script&gt;&#39;)};
&lt;/script&gt;
</div><div style='float:right; font-size:10px; vertical-align: bottom; float: right;'><a href='http://blogger-hatchery.blogspot.com/2015/01/random-post-widget-for-blogger-with.html' target='_blank'>Get this widget</a></div></div></b:if>

Step 5. Now comes the styling (css) part. Search the following code:
]]></b:skin>

and paste following code just above previous code:
.random-posts a img {
  position: relative;
  border-radius: 10px;
  float: left;
  margin-right: 10px;
  margin-bottom: 1.5px;
  display: inline;
  border: 2px ridge #FDFFFE;
}
.random-posts img:hover{opacity: 0.6;}
.rp-snippet {
  display:none;
}
.random-posts li { 
  display: inline-block;
  width: 200px;
  height: 77px;
  border: 1px solid #CEC3C3;
  margin-top: 5px;
  margin-right: 5px;
  margin-left: 5px;
  margin-bottom: 5px;
  padding: 7px;
  overflow: hidden; background: #efefef;
  border-radius: 10px;
}

.random-posts li:hover {background: #D0D0D0; color:#fff; }
.random-posts ul {
  margin: 0;
  line-height: 1.2;
  text-align: center;
  list-style-type: none;
  padding: 0px;
  display: inline-block;
  width: 225px;
}
.random-posts div {
  height: 75px;
  overflow: hidden;
}

Step 6. Now you have done. The random posts widget will appear in your website.

Customization:

  1. Change no. of posts to be appearing in widget by changing value in yellow highlighted code in Step 4. 
  2. Change the code highlighted in green color to change background of widget. Change second code to change background color during mouse hover.
  3. Change margins in Red highlighted codes to change width of posts and margin between two random posts to fit all the random posts (in present case 6) in the widget in fill in entire width of your website.

I am sure that this posts have helped you. You should share and subscribe for further updates and new themes for the widget.

In case of any inquiry, please use comment box.
Read More »

Monday, December 29, 2014

nRelate Alternatives: Related Post Widget for Blogger with Hover Effect.

No comments:
nRelate AlternativenRelate is one of the popular Related Post Widget used by bloggers. I was also using it on some of my blogs. But recently, it was announced that it will stop serving recommendations on December 31, 2014. All nRelate services including their customer facing dashboards will be terminated, and we have sign up for an alternative discovery platform by the end of December.

So keeping this in mind, I’ve prepared another code for related articles widget. It is very much clean and very easy to use. No scripts hosted on third party servers is used, so it will lasts forever without any hiccup.
Related Post Widget


The lookup of this widget is  somewhat like nRelate’s “Default” theme style as shown snapshot in the right figure.

In future, I’ll  provide you more theme as like provided by nRelate. So keep in touch for further updates.



How to Install Related Post Widget at Blogger.com?

Step 1. First of all, remove nRelate code for related post posts, if have not done so.

Step2. Make a backup of your current template. This will help you get previous look if something wrong takes place with implementation. If you don’t know how to make backup of blogger template, you can use this “Template>> Backup/Restore”.

Step 3. After login to Blogger Dashboard, Go to “Template” and then click “Edit Html”. Click anywhere inside the template code area, then press CTRL + F keys to open search box. Search for following code:
</head>

Step 4. Just above closing head tag, paste the following code:
<!-- Related post widget script starts -->

<script type='text/javascript'>
var defaultnoimage=&quot;http:https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZmkJDpQ4gL8igtGV3EZdfQcWoQUwvhRnJ7cj8HvI8O3R5aQLUGHARkjqVeMzJ18pK6oEsOkGVDVfGCtARGvYGKn1Ecg5aV8S8U3ScthWEalHZd7gNlWNSnbgeDkdi1UoqAgpWItmyTQY/s400/noimage.png&quot;;
var maxresults=5;
var splittercolor=&quot;#fff&quot;;
var relatedpoststitle=&quot;Related Posts&quot;;
</script>

&lt;script type=&#39;text/javascript&#39;&gt;
var relatedTitles=new Array();var relatedTitlesNum=0;var relatedUrls=new Array();var thumburl=new Array();function related_results_labels_thumbs(json){for(var i=0;i&lt;json.feed.entry.length;i++){var entry=json.feed.entry[i];relatedTitles[relatedTitlesNum]=entry.title.$t;try{thumburl[relatedTitlesNum]=entry.media$thumbnail.url}catch(error){s=entry.content.$t;a=s.indexOf(&quot;&lt;img&quot;);b=s.indexOf(&quot;src=\&quot;&quot;,a);c=s.indexOf(&quot;\&quot;&quot;,b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&amp;&amp;(b!=-1)&amp;&amp;(c!=-1)&amp;&amp;(d!=&quot;&quot;)){thumburl[relatedTitlesNum]=d}else{if(typeof(defaultnoimage)!==&#39;undefined&#39;){thumburl[relatedTitlesNum]=defaultnoimage}else{thumburl[relatedTitlesNum]=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZmkJDpQ4gL8igtGV3EZdfQcWoQUwvhRnJ7cj8HvI8O3R5aQLUGHARkjqVeMzJ18pK6oEsOkGVDVfGCtARGvYGKn1Ecg5aV8S8U3ScthWEalHZd7gNlWNSnbgeDkdi1UoqAgpWItmyTQY/s400/noimage.png&quot;}}}if(relatedTitles[relatedTitlesNum].length&gt;65){relatedTitles[relatedTitlesNum]=relatedTitles[relatedTitlesNum].substring(0,65)+&quot;...&quot;}for(var k=0;k&lt;entry.link.length;k++){if(entry.link[k].rel==&#39;alternate&#39;){relatedUrls[relatedTitlesNum]=entry.link[k].href;relatedTitlesNum++}}}}function removeRelatedDuplicates_thumbs(){var tmp=new Array(0);var tmp2=new Array(0);var tmp3=new Array(0);for(var i=0;i&lt;relatedUrls.length;i++){if(!contains_thumbs(tmp,relatedUrls[i])){tmp.length+=1;tmp[tmp.length-1]=relatedUrls[i];tmp2.length+=1;tmp3.length+=1;tmp2[tmp2.length-1]=relatedTitles[i];tmp3[tmp3.length-1]=thumburl[i]}}relatedTitles=tmp2;relatedUrls=tmp;thumburl=tmp3}function contains_thumbs(a,e){for(var j=0;j&lt;a.length;j++){if(a[j]==e){return true}}return false}function printRelatedLabels_thumbs(current){var splitbarcolor;if(typeof(splittercolor)!==&#39;undefined&#39;){splitbarcolor=splittercolor}else{splitbarcolor=&quot;#d4eaf2&quot;}for(var i=0;i&lt;relatedUrls.length;i++){if((relatedUrls[i]==current)||(!relatedTitles[i])){relatedUrls.splice(i,1);relatedTitles.splice(i,1);thumburl.splice(i,1);i--}}var r=Math.floor((relatedTitles.length-1)*Math.random());var i=0;if(relatedTitles.length&gt;0){document.write(&#39;&lt;h2&gt;&#39;+relatedpoststitle+&#39;&lt;/h2&gt;&#39;)}document.write(&#39;&lt;div style=&quot;clear: both;&quot;/&gt;&#39;);while(i&lt;relatedTitles.length&amp;&amp;i&lt;20&amp;&amp;i&lt;maxresults){document.write(&#39;&lt;div&gt;&lt;a style=&quot;display:inline-block;float:left&quot;&#39;);if(i!=0)document.write(&#39;&#39;+splitbarcolor+&#39;;&quot;&#39;);else document.write(&#39;&quot;&#39;);document.write(&#39; href=&quot;&#39;+relatedUrls[r]+&#39;&quot;&gt;&lt;img style=&quot;&quot; src=&quot;&#39;+thumburl[r]+&#39;&quot;/&gt;&lt;br/&gt;&lt;div style=&quot;&quot;&gt;&#39;+relatedTitles[r]+&#39;&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;&#39;);i++;if(r&lt;relatedTitles.length-1){r++}else{r=0}}document.write(&#39;&lt;/div&gt;&#39;);relatedUrls.splice(0,relatedUrls.length);thumburl.splice(0,thumburl.length);relatedTitles.splice(0,relatedTitles.length)}
&lt;/script&gt;

<!-- Related post widget script ends –>

  • In the above code, you can change number of related articles by changing value “maxresults=5;” as per your requirement.

  • To change heading of the widget, replace code highlighted in Marroon color such as with “You might be interested in”, “You may also like”, “Recommended Articles”, etc.

Step 5. Paste the following code, where you want to appear the related articles widget:
<!-- Related Posts with Thumbnails Code Start-->
<div class='related-posts'>
 <b:loop values='data:post.labels' var='label'>
   <b:if cond='data:label.isLast != &quot;true&quot;'>
   </b:if>
     <script expr:src='&quot;/feeds/posts/summary/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels_thumbs&amp;max-results=5&quot;' type='text/javascript'/>
  </b:loop>
     <script type='text/javascript'>
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs(&quot;<data:post.url/>&quot;);
     </script>
</div><div style="font-size: 10px; vertical-align: bottom; float: right"><a href="http://blogger-hatchery.blogspot.com/2014/12/nrelate-alternatives-related-post.html" target="_blank">Get this widget</a></div>
<!-- Related Posts with Thumbnails Code End—>

For example, search for the following code:
<div class='post-footer'>

and paste just above this code. You may find this code multiple times in template, but you should stick to last one. If this code doesn’t work, then try with other same codes above one by one.

Step 6. Now comes the styling part. Search the following code:
]]></b:skin>

and paste following code just above previous code:
.related-posts {
  float:center;
  text-transform:none;
  height:100%;
  min-height:100%;
  margin-top:15px;
  padding-left:5px;
}
.related-posts a img {
  width: 110px;
  height: 110px;
  padding: 2px; border-radius: 5px;
  border: 1px solid #CFCFCF!important;
}
.related-posts a {
  padding: 10px;
  font-size: 13px;
  border: 1px solid #EEEEEE;
  border-radius: 5px;
  overflow: hidden;
  margin-left: 4px;
  margin-right: 4px;
  margin-top: 5px;
  margin-bottom: 5px;
  width: 115px;
  background: #ffffff;
  min-height: 210px;
  font-family: sans-serif;
  font-weight: 700;
  line-height: 140%;
  text-align: left;
}
.related-posts a:hover {
  background: #44B329;
  color: #fff;
  border: 1px solid #44B329;
}
.related-posts div {
  line-height: normal;
  display:inline-block;
}

Step 7. Now you have done. The related posts widget will appear in your website.

Customization:

  1. Change thumbnail dimensions by changing value in green highlighted code in Step 6. But with this, you must also change width: 115px;  in the same step to “your thumbnail width + 5 px” to match the changes.

  2. Change the code highlighted in red color to change background of widget.

  3. Change margins in Yellow highlighted codes to change margin between two related posts to fit all the related posts (in present case 6) in the widget in fill in entire width of your website.

I am sure that this posts have helped you. You should share and subscribe for further updates and new themes for the widget. 
In case of any inquiry please use comment box.
Read More »

Saturday, October 25, 2014

List Randomizer

List Randomizer  tool can randomize a whole list of Words, Lines, Numbers, etc. with single click.

For Example:

If you start with.... You will get.…
Apple Dog
Ball Elephant
Cat Apple
Dog Ball
Elephant Cat











... or some other randomized list.

Instructions for Randomizing Lists:

1. Enter your list items in the field below, each item on a separate line.
Items can be names, numbers, addresses, etc. 
Don't randomize an extremely large list. Split it into many one to randomize it. 
Please don't enter anything confidential.

Paste lines in the text-field below. Click Randomize List button.



Remove leading blank spaces


Randomized List:



Disclaimer: You are using Online List Randomizer Tool entirely at your own risk.
Read More »