Only Allowed to Copy Certain Content in Post Blog

Develop content for a blog or website is essential, but some bloggers do not understand this and they are trying to copy the contents of the other pages and post on their site. This article I will guide you to disable the copy, they can not copying article content and just can to copy the content in the frame of your code. This trick is very interesting and useful for those specializing in tricks blog page or sharing anything.

Advantage of this trick:

  • Anti copy and scan article content.
  • Allow only one copy in certain areas in the article.
  • There are Javascript and css code for your choice.

Anti copy and scanning article content

The way 1: Using JavaScript.

This way have big limit that when user turn off javascript of browser or using the browser do not run javascripts so it will not active.

Step1: Login to Layout
Step 2: Select Template and select Edit HTML
Step 3: Paste below code before tag </head> or after tag <head>

<script type='text/javascript'> if (typeof document.onselectstart!=&quot;undefined&quot;) { document.onselectstart=new Function (&quot;return false&quot;); } else{ document.onmousedown=new Function (&quot;return false&quot;); document.onmouseup=new Function (&quot;return true&quot;); } </script>

The way 2: Using CSS CODE

Step1: Login to Layout
Step 2: Select Template and select Edit HTML
Step 3: Insert this code before tag ]]></b:skin>

<!--Disable Highlighting--> <style type='text/css'> .post{ -webkit-user-select: none; /* Webkit */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* IE 10 */ /* Currently not supported in Opera but will be soon */ -o-user-select: none; user-select: none; } pre,code{ -webkit-user-select: text; /* Webkit */ -moz-user-select: text; /* Firefox */ -ms-user-select: text; /* IE 10 */ /* Currently not supported in Opera but will be soon */ -o-user-select: text; user-select: text; } </style>

Save again! Checking the result.

The way give user copy a part in the post

The code above was made your post to be disabled by right mouse and scanning article content. So, to user can copy any part in your post, you only use below code:

<pre> The code allowed to copy </pre>
or
<code> The code allowed to copy </code>

Note: You can edit the box again to more beautiful.

Comments

Popular posts from this blog

Customer Service Resume Samples

Top 10 Freelancing Sites List | Updated

5 Best Alternatives to Google Adsense