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

Recent

Welcome to TinyPortal. Please login or sign up.

May 25, 2024, 02:43:55 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,197
  • Total Topics: 21,221
  • Online today: 144
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online

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.

Smoky

thanks guys lol.. i just wanted to play with it.. if someone wants to kype my lil images its ok.. i know the good ones will be watermarked anyway so.. but this is a kewl script.. thanks again!!  :D

Rafferty

#91
QuoteTry it this way.

No Errors but the listed groups cannot copy, no one can

tick

This should do it.  I tested it this time :)

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>';

Rafferty

No success, no errors but now everyone can right click/copy

tick

#94
I checked this logged and unlogged and it worked fine for me.  Are you sure you have the right groups numbers in the array?





edit:  I am not a coder so I am just trying things as you would do.  If it is indeed not working right maybe someone would step in and save us.  :)

IchBin

How did you get your member group ID numbers Raf? If you'd like I can take a look at it for you. PM the info if you'd like.

Rafferty

Absolutely, I use the same groups in the SMF Mod MCLegendII 1.1 which works fine.

The original anti thief snippet also works fine alone but when I add the

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

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


It messes up.

I appreciate your help tyvm

JPDeni

What sort of block are you using? If you're using IchBin's code, you need to use a php block.


FERNSIDEâ„¢

#99
Try this mate

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

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

ADD ALL OF THE CODE HERE


Hope it works :)

EDIT:   Ooooppss sorry, my baad.
I just saw that this was posted earlier  lol
I think he is getting the post count member groups, and the member groups mixed.
Im not sure how he, or you have this set, but my regular members(post count, not staff) fall under their own group. So have their own number.
Yet if I add the post count membergroups number(say the admin only made 5 posts, and falls in this bracket), then those within this bracket, would be barred!!

If you can understand what I mean, then plz translate lol
Im tired and this may not have come out right :P

Ive attached an image from smf.
Is this comment ok?  If not, I'll remove it.
Thought I'd better ask.