Lock a block of text
To lock a block of text just name the function with jQuery object which you want to lock
ShareToAccess.lock($('.hide_this'));
Did you get stuck between your own minds and opinions?
It's time to do something!
Write your own thoughts and opinions, share them and get the followers on social networks!
Methods of unlocking
We offer 3 methods to unlock content
Default method ( example). Share link ➜ Show invite to click the link in social network ➜ Click the link ➜ Return to the site and get the content.
-
Locked text will be visible immediatelly after user returns to the page. This is very easy for user but there is no guarantee that he really shared the link.
ShareToAccess.lock($('.hide_this'),{ mode : 'fast' });
-
Locked text will be visible only after user clicks on the shared link but there is no automatic message after he closes the share dialog.
ShareToAccess.lock($('.hide_this'),{ mode : 'slow' });
Yesterday I visited an interesting Reykjavik and beautiful Barcelona.
Today I'm in well-known Athens and in a couple of second I'm planning to visit an ancient Petra. You must be wondering how. It's very simple. I just open my internet browser, google some place where I want to be in that moment and whoala! I'm there!
You can always change the default notice text by adding parameter notice in options.
ShareToAccess.lock($('.hide_this'),{
notice: 'My notice'
});
Lock images, video, audio and any HTML content you like
It is necessary to wrap images and videos into div. You can always change the appearance and text of the locker.
ShareToAccess.lock($('.hide_that')).lock($('.lock_image'),{
header : 'Text before buttons',
footer: 'Text after buttons',
buttons: {
facebook : 1,
twitter : 1,
google : 0,
tumblr : 0,
pinterest : 0,
vkontakte : 0,
odnoklassniki : 0
},
css: {
color: 'red',
background: 'navy'
}
});
Second locked block
You can lock as many blocks on the page as you like without any intersection problems. You can use .lock function in chain.
ShareToAccess.lock($('.hide_that')).lock($('.hide_somethig_else'));
Addblock detector
ShareToAccess.lock($('.addblocked'),{
header : 'Addblock has detected on your site',
footer : 'To unlock the content please stop it and reload page',
buttons : {
addblock : 1
}
});
Block locked with sharethis.com and other popular share button plugins
You can use any share plugin to lock your blocks. The main and important condition is that it is necessary to allow system to add unlocker code in back link. To do this do not use automatic url provided by share plugin but replace it by {{url}} literal. The best way is to do it by adding parameter to it`s html activator.
ShareToAccess.lock($('.hide_share_this'), {
buttons: "<span class='st_sharethis_large' displayText='ShareThis' st_url='{{url}}'></span>",
footer: 'Don`t forget to click shared link in your news feed! (you can write any custom text here)'
})
Block locked with addthis.com
ShareToAccess.lock($('.hide_add_this'), {
header: 'You can use addthis.com sharer or any other, please add {{url}} mark to data-url so system can add unlock code (it is important)',
buttons: '<div class="addthis_sharing_toolbox" data-url="{{url}}"></div>'
});