Skip to main content

Social Sharing icons under all posts

The following article will help you get a social sharing widget under each blog post as I have in my blog.

It consists of four parts of template Editing :-
  1. Adding CSS.
  2. Adding XML.
First Backup your template.

Adding CSS
  • Goto Dashboard > Template > Customise > Advanced > Add CSS
  • Paste the following code in the appearing box,
    .sharebutton{
    padding:10px;
    background-color:transparent;
    border-radius:5px;
    box-shadow:0px 0px 3px rgba(0,0,0,0.3);
    border-top:5px solid black;
    }
    .share, .share:hover{
    cursor:pointer;
    padding:5px 10px;
    box-shadow:0px 0px 3px rgba(0,0,0,0.3);
    color:black;
    text-decoration:none;
    }
    .link_share{
    width:100%;padding-bottom:3px;border:3px solid transparent;;border-radius:2px;
     -webkit-transition-duration: 1s;
      -moz-transition-duration: 1s;
      -o-transition-duration: 1s;
      -ms-transition-duration: 1s;
      -goog-ms-transition-duration: 1s;
      transition-duration: 1s;
    }
    .link_share:focus{
    border-bottom:3px solid black;
     -webkit-transition-duration: 1s;
      -moz-transition-duration: 1s;
      -o-transition-duration: 1s;
      -ms-transition-duration: 1s;
      -goog-ms-transition-duration: 1s;
      transition-duration: 1s;
    }
Adding XML
  • Press Ctrl + F and Find <b:if cond='data:post.hasJumpLink'>
  • The code around it will look like,
    <b:if cond='data:post.hasJumpLink'>
    <div class='jump-link'>
    <a expr:href='data:post.url' expr:title='data:post.title'><data:post.jumpText/></a>
    </div>
    </b:if>
  • Right after that place the below code,
    <p class='sharebutton'><b>Share this post</b><br/><br/>

    <span class='post-icons'>
    <a expr:href='&quot;http://www.facebook.com/sharer.php?u=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank' title='Add To Facebook'><img alt='Add To Facebook' border='0' class='icon-action' height='36' src='http://3.bp.blogspot.com/_vLeiVavkV_M/SnleIlLdGwI/AAAAAAAABd8/RfHnWIGGMEY/s200/facebook.png' width='36'/></a>
    <a expr:href='&quot;https://twitter.com/intent/tweet?button_hashtag=howtoblog&amp;text=&quot; + data:post.url' target='_blank' title='Tweet this'><img border='0' class='icon-action' height='36' src='https://lh4.googleusercontent.com/-ucOlsxvAWoE/UCDHPcOSvDI/AAAAAAAAAC4/CK71lyjuWPw/s512/Twitter%2520Icon.png' width='36'/></a>
    <br/><br/>
    <krish style='width:100%;font-weight:bold;font-style:italic;'>Share Link : <input class='link_share' expr:value='data:post.url' onfocus='this.select()' type='text'/></krish>
    </span>

    <font size='2'>Click <a href='http://howtoblog.krishnainfotron.com/2012/08/social-book-marking-buttons-in-all.html'>here</a> for <b>Social sharing icons V2</b>.</font>
    </p><br/>
After completing these, click on "Save Template" and view your blog. You should see the social sharing icons appearing on the template. 
See related posts:

Comments

Feeds for you

How to secure your Google account and Blogger blog?

As a part of contributions to NCSAM, I am writing this article down on what all should we be aware of with respect to Google's security aspect and how to make sure your blog stays yours forever.
What is NCSAM? It's National Cyber Security Awareness Month which is observed during the month of October every year in America.

However, we all know cyber security is a world topic and is not limited to just the USA. So let me give some tips with respect to keeping the Google account safe and Blogger blogs safe from hackers.

As I secure my account, I hope you people catch up too.

In this blog post, I am going to tell about the following,
Securing your Google account.Securing your Blogger blog. Securing your Google account Since Blogger is also part of your Google account, let's first see what all we need to do to keep our Google account safe. Don't share your password to anyone.Keep changing your password every 60 - 90 days.Make sure your password is strong enough. Have at leas…

Blogger HTTPS for custom domain and Cloudflare

In BHF, there was a recent issue related to cloudflare where the browser screams the site is a phishing site. So I thought of writing up how does a service like cloudflare affect your blogger blog.

What is Cloudflare?

Well we have that written all over Wikipedia. Let's go on with why Blogger users look for Cloudflare.
Anciently Blogger users used cloudflare for one simple reason. HTTPS for custom domains.

So what happens when you introduce cloudflare into your domain?
DNS Redirect.
Your custom domain will be configured with the proxy info provided by cloudflare and when the request is hit, DNS redirect happens.
DNS redirect is bad for the site's health. A number of reasons, but the most important is that some browsers, when it detects a DNS redirection, it thinks that it is a phishing site.

What is a DNS redirect?

I am trying to explain this in easy terms. I'll try not to be too technical. When a custom domain URL is hit, usually the domain requests go to Name servers from w…

Blogger in Draft says "Try the new Blogger!"

It's been long time that I wrote something here. Interestingly there seems to be a new update in Blogger in Draft (https://draft.blogger.com).