social content locker for blogger.com blogs? is it possible

痞子三分冷 提交于 2019-11-29 04:42:01

I found this working script for this what you need to do is first backup you template.
then edit HTML >search <head> tag and put this code after <head>

<script src='http://code.jquery.com/jquery-1.10.2.min.js' type='text/javascript'/>

After that search </head> tag and put below code before this tag

<link href='https://sites.google.com/site/menightfury/home/social-locker/public/sociallocker_v1.6.0.css' rel='stylesheet'/>
<script src='https://sites.google.com/site/menightfury/home/social-locker/public/sociallockermin_v1.6.0.js' type='text/javascript'/>
<script type='text/javascript'>
  //<![CDATA[
jQuery(document).ready(function ($) {
  $('#default-usage .to-lock').sociallocker({

    buttons: {order:["facebook-like","twitter-tweet","google-plus"]},

    twitter: {url:"https://www.facebook.com/www.mostsharedposts"},
    facebook: {url:"https://www.facebook.com/www.mostsharedposts"},
    google: {url:"https://plus.google.com/u/0/b/110589424466302901501/110589424466302901501"},

    text: {
      header: "Like us To Unlock This Content",
      message: "This content is locked. Like us on Twitter, Facebook or Google plus to unlock it."
    },

    locker: {close: false, timer: 0,},
    theme: "secrets"
  });
});
  //]]>
</script>

this is how to hide your code in post editor
go to post edit HTML and add this code

<article id="default-usage">
<div class="to-lock" style="display:none;">
Hello i am the hidden content
</div>
</article>

I implemented this in my blog check demo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!