How To Add Together A Part To Unlock Download Link Inward Blogger

How to Add a Share to Unlock Download Link inward Blogger How to Add a Share to Unlock Download Link inward Blogger
In the past, nosotros receive got already shown yous how to exercise a social content locker inward Blogger. Content lockers plays a meaning role inward non solely increasing your social traffic but likewise helps inward improving your pretense on social networks. Recently, ane of our users asked us well-nigh how to add together a portion to unlock download link inward blogger? In short, amongst these content lockers you're forcing your users to portion your content to larn the downloading link of a for sure file. In this article, nosotros volition exhibit yous how to exercise a portion to unlock download link inward Blogger.

What is Share to Unlock Download Link?

Mostly people prefers to receive got "Share to unlock content" plugins because bulk of users merely reads your content too leaves your site without sharing it on their social accounts. 
With content lockers or portion to unlock plugins, yous forcefulness or enquire your users to portion your content on social networking sites similar Facebook, Twitter or Google+ to larn access to the amount content or a particular downloading link.

You tin cheque the demo if this widget here.

Step#1: Install Share to Unlock Download Link

The real root matter yous demand to exercise is to take a backup of your Blogger template, merely to survive on condom side if anything goes wrong. To install Share to unlock download link plugin inward your Blogger site, delight follow the below instructions correctly: 

  1. Go to Blogger >> Template >> Edit HTML.
  2. Make for sure that your template has a updated version of jquery.min.js file, We demand your version to survive 1.10.2 or greator. If your template does non receive got this file thus search for <head> too merely below it glue the next code: (Note: Make for sure at that topographic point is solely one jquery.min.js file because having multiple jquery files amongst elbow grease it non to run).

    <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' type='text/javascript'/>

  3. Now inward the template codes, search for </body> tag too merely higher upward it glue the next JavaScript code:

    <script type='text/javascript'>
    //<![CDATA[
    /* Facebook */
    (function(d, s, id){
         var js, fjs = d.getElementsByTagName(s)[0];
         if (d.getElementById(id)) {return;}
         js = d.createElement(s); js.id = id;
         js.src = "//connect.facebook.net/en_US/all.js";
         fjs.parentNode.insertBefore(js, fjs);
     }(document, 'script', 'facebook-jssdk'));
    window.fbAsyncInit = function() {
        // init the FB JS SDK
        FB.init({
          condition     : true,                            
          xfbml      : truthful                              
        });
        FB.Event.subscribe('edge.create', function(href, widget) {
            $.event.trigger({
                type: "pageShared",
                url: href
            });
        });
    };
    /* Twitter */
      window.twttr = (function (d,s,id) {
      var t, js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
      js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs);
      provide window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
    }(document, "script", "twitter-wjs"));
    twttr.ready(function (twttr) {
        twttr.events.bind('tweet', constituent (event) {
            $.event.trigger({
                type: "pageShared",
                url: event.target.baseURI
            });
        });
    });
    /* Google Plus */
    (function() {
        var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
        po.src = 'https://apis.google.com/js/plusone.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
    constituent plusOned(obj){
        console.log(obj);
        $.event.trigger({
            type: "pageShared",
            url: obj.href
        });
    }

    /* Listen for the pageShared resultant */
    $(document).on('pageShared',function(e){
        if(e.url == window.location.href){
            $(".secret").show();
            $(".secret-share").hide();
        }
    });
    //]]>
    </script>

    <style>
    .secret {
    text-align:center;
    display:none
    }

    .secret-share {
        padding: 20px;
        text-align: center;
        border: 3px enterprise #ddd;
        background: #f8f8f8;
    }

    a.download-btn {
        text-transform: uppercase;
        font-size: 22px;
        background: #7b7b7b;
        padding: 10px 20px;
        display: inline-block;
        border: 1px enterprise #000000;
        text-decoration: none;
        color: #fff;
    }

    .secret-share .fb-like {
    margin-top: 0;
    top: -7px;
    position: relative;}

    .secret-share .twitter-share-button {
        margin-right: 25px;
    }

    </style>
  4. Now ane time yous receive got pasted the codes correctly, press "Save Template" button. After doing this, yous receive got successfully installed the portion to unlock download clitoris plugin inward your Blogger template.

Step 2: Add Share to Unlock Download Link inward Posts:

To exhibit portion to unlock download clitoris inward your posts, follow the below instructions correctly:
  1. Go to Blogger >> Add a New Post.
  2. Now inward the blogger ship editor, revert to the HTML tab too glue the next code inward the HTML code editor:
<div class="secret">
<a class="download-btn" href="#">Download</a></div>

<div class="secret-share">
<p>Share via Facebook / Twitter / Google Plus to meet Link Download</p>
<span class="fb-like" data-layout="button_count" data-send="false" data-show-faces="false" data-width="90" expr:data-href="data:post.url" style="margin-right: 25px;"></span><a class="twitter-share-button" data-count="horizontal" data-related="" data-via="mybloggerlab" expr:data-text="data:post.title" expr:data-url="data:post.url" href="http://twitter.com/share">Tweet</a><span class="g-plusone" data-callback="plusOned" data-count="true" data-size="medium" expr:data-href="data:post.url"></span></div>

Replace  # amongst  your downloading link. If yous receive got to a greater extent than or less coding noesis yous tin customize it fifty-fifty farther equally per your needs.

Once everything is done, Publish your ship too you're done. Now the download link volition solely seem when users volition either portion your content on Facebook, Google+ or Twitter.

If yous similar this plugin thus delight allow us know what are your thoughts well-nigh it inward the comment department below.

Comments