Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

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

How can I integrate social content locker in blogger blogs? We see in numbers of WordPress blogs and websites,
But in blooger.com blogs you see no plugin option

does anybody has another way or something like this? I Want visitor to like, tweet or g+ before reading my posts.

thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...