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

Recent

Welcome to TinyPortal. Please login or sign up.

June 26, 2024, 10:35:39 AM

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

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.

Dragooon

Oh... I only saw the first para :P

pass25

Hi,

And i put that before or afther this ?


Quote<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>

thanks!

Dragooon

Use
if ($context['user']['id'] == 13 || $context['user']['id'] == 20 || $context['user']['id'] == 28)
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>';

Make sure to replace the IDs
This is untested

pass25

Hi,

I tried to put like you say! The script works but the permissions dont!

It apears in all windows
Quote"if ($context['user']['id'] == 13 || $context['user']['id'] == 20 || $context['user']['id'] == 28)
echo '<head>"


IchBin

Show your code that you are using please.

pass25

hi,

I put this one!

Quote from: Dragooon on November 13, 2007, 03:14:10 PM
Use
if ($context['user']['id'] == 13 || $context['user']['id'] == 20 || $context['user']['id'] == 28)
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>';

Make sure to replace the IDs
This is untested

IchBin

Well I don't know what you are doing wrong. Copying and pasting that into a block for me works just fine. Are you using a php block type?

pass25

Hi,

No, i was using as script block! That seems to be the problem!

But in the first post, says
QuoteInstall:

Create a SCRIPT block (a side block preferrably one which is visible in all sections of your site)

In a PHP block type it works fine, thanks!

globalreman

Thanks!  I just tried it, and it works! I know its not foolproof, but its really nice! -Thanks -Aaron  ;D

FERNSIDEâ„¢

LOL..

This is sure to get a few of my users ticked off!!   LOL    I love it!! >:D

Is there a way for this to work throughout the whole site??

I have this in the forum, but to use it for every thread/topic/post etc, I'd have to create a block for each one yeah??     If so, anyway around this so it covers the whole site??
Would be a great laugh..  LOL

I realise its limited, and will not completely stop people copying things.
But mate..   The laugh we'll have when people start posting about it will be priceless!!!  LOL

Thanks in advance  :)