TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

June 17, 2024, 07:27:51 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,254
  • Total Topics: 21,225
  • Online today: 149
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 147
  • Total: 147

Anti-Theft Block

Started by akulion, September 25, 2006, 11:55:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

You can put the code in your index.template.php (in the <head> section) manually and it will be on all pages.

ACE420

This is nice tired of peps stealing links and posts   >:( this works grate  ;D

tick

This is a neat deterrent.  But very easy to get around if someone has some basic knowledge.   

Smoky

#83
trying it out right now!! thanks tons and tons!!!  :P :D

ok i tried it  :2funny: but now i cant highlight any text if i wanted to  :o :2funny:

FERNSIDEâ„¢

LOL

Im pretty sure there is a permissions code somewhere in this thread.
Just have a quick skim through :)
If there isnt...     Sorry :D   lol

If I needed to copy n paste something, I used ctrl + c(to copy) and ctrl + V to paste.  If you edit the post/block etc, you can highlight what you need.
There are other means to do this, but this way seems to be the easiest :)

Had a great laugh with this.

tick

All you have to do is disable javascript in your browser window and you can right click on it. :P

Rafferty

Well, heres my problem: I have had the anti theif script working fine for a long time now in a script block.

When I add Ichbin's addition
Quoteglobal $context, $user_info;
$groups = array(5,7);

if ($context['user']['is_guest] || array_intersect($groups, $user_info['groups']))
echo ' your stuff here';

Change the box to PHP, I get the following error:
QuoteParse error: syntax error, unexpected T_STRING, expecting ']' in /home/www/xxxxxxxx.org/forum/Sources/Load.php(1859) : eval()'d code(35) : eval()'d code on line 4

tick

Post the full code you are using in the [ code ]  [ /code ] brackets.  Without the spaces. 

Rafferty

global $context, $user_info;
$groups = array(1,2,11,19);

if ($context['user']['is_guest] || array_intersect($groups, $user_info['groups']))
echo '<head>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<script type="text/javascript">

/***********************************************
* Disable select-text script- Ã,© Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</script></head>
<body>
<script language=JavaScript>
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
</body>';

tick

Try it this way.

global $context, $user_info;
$groups = array(1,2,11,19);

if ($context['user']['is_guest'] || array_intersect($groups, $user_info['groups']))
echo '<head>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<script type="text/javascript">

/***********************************************
* Disable select-text script- Ã,© Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</script></head>
<body>
<script language=JavaScript>
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
</body>';