Sick of people stealing your images? :tickedoff:
Tired of having your forum posts and content copied? :'(
Well then this is for you....
Demo (http://path-to-peace.net/misc/anti_theif.html)
It will cause a hinderance for people to right click or copy images or text from your page. Making it a whole lot more difficult for them to steal stuff.
Install:
Create a SCRIPT block (a side block preferrably one which is visible in all sections of your site)
Insert this code into it:
<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>
Activate and enjoy.
Aku
Team Edit: To correct spelling in title.
Nice one
Hooray, Dynamic Drive finally made it work with FF
wow they even made the space bar release command inop as welll really good job
there is another bit of code im looking for
i saw it on a page recently
it disables viewing of page source in the persons browser
If i find it ill add it here :up:
Very cool, thx! ;)
If you get the "no viewing source" one going, make sure that whoever uses it disables it if they have problems on their site and ask for help. Viewing the source is the first step in troubleshooting for me.
no luck yet finding even any info about that one lol
very nice mod! :up:
This is a very cool block! Thanks!
Oooh i like this......
Yea pretty good script.. dosent stop you from viewing the source :P
yea i wasnt able to find the "stop source code" code
but still atleast this will slow the theif down lol
one major problem with these kind of scripts. It also keep you from highlighting/copying text.
I guess it would be good for articles, keep people from stealing copyrighted content as well.
yea that can be pretty annoying for webmasters especially who may need to right click or copy cetain text
but then again everything has a price i guess
I have a firefox extension that can turn javascript off on the tab. I also run the no script extension that doesn't allow scripts to run on a site unless I allow it. I love having a browser that is so customizable. :)
yea firefox is the best
especially considering the last IE bug that allowed 1000's of peoples compters to get hacked...it was on BBC today
this works pretty good but you can still however hover over some images and the windows box shows up in the top left of the image and you can save, print, send the image through email, and open my images folder......
Quote
this works pretty good but you can still however hover over some images and the windows box shows up in the top left of the image and you can save, print, send the image through email, and open my images folder......
ive modified the script in the main post (post #1) to prevent the image tool bar from popin up
try it and lemme know
QuoteUsers may NOT, however, redistribute or repost/ resell for download any DHTML script found on Dynamic Drive. Redistribution is defined as re-offering our scripts for download in any fashion, whether on a competing web site, an application that generates code snippets, or a CD-ROM collection of CSS/JavaScript codes etc. Some examples of what is acceptable and what is not are:
* Acceptable:
-Use our DHTML scripts on any personal or commercial web site to aid in its functionality/ usability.
-As a web designer, use our DHTML scripts in your paid projects for your client web sites.
-As a software developer, use our DHTML scripts within a application/ program as part of its interface, such as a CSS menu being used as the program's navigation interface. The program itself can be distributable.
In all cases above, the credit notice within the script must remain intact and unaltered.
* Not Acceptable:
-Put our DHTML scripts on another script library or webmaster type site for others to download.
-Use our DHTML scripts in any type of service or application whereby our codes are part of the product offerings themselves.
-Put our DHTML scripts in any other types of medium for direct redistribution, such as a CD-ROM that consists of, but not limited to, webmaster codes and web graphics.
Oh dear... you've broken the terms of use.
read the last part in "acceptable" I am guessing that applies to us as software developers:
Quote
As a software developer, use our DHTML scripts within a application/ program as part of its interface, such as a CSS menu being used as the program's navigation interface. The program itself can be distributable.
In all cases above, the credit notice within the script must remain intact and unaltered.
After all we arent claiming their scripts as our own and all copyrights are left intact and distributed as part of block code snippets under which case as it says: The program itself can be distributable.
Quote from: akulion on September 28, 2006, 02:45:08 AM
Quote
this works pretty good but you can still however hover over some images and the windows box shows up in the top left of the image and you can save, print, send the image through email, and open my images folder......
ive modified the script in the main post (post #1) to prevent the image tool bar from popin up
try it and lemme know
Yes that works....thanks.
I gave this up, it's impossible to prevent people from copying your images/textfiles, for instance I have this little button on my browser 'enable right click', and what you see in your browser is also stored on you hard disk.
What I did is : some rewrite rules to prevent hot linking, images in a low quality so they are only good for internet use, an index file in every directory so you can't see a listing with your browser.. that kind of stuff.
:2funny: the determined theif will always get to u
believe me...ive had a few
Hahaha, yes that is true
I must thank you for this! I had javascript running on each page to disable the right click and was dreading how to move it to my new TP/SMF ran site.
Made a new block in the center. turned off title and stuff.... and I only have it active in articles that I don't want images copies or Hyperlinked from.
I know this doesn't stop them completely... but it does slow them down.. ctrl + print screen open in a new window.. it's a pain. crop image... have done this for tutorials for programs and it's a pain.. grabbing it from the source to hyperlink is also a pain to go through the code to look for the art you want to link to so you don't have to host it. It's just a big pain.. but if someone really wants something off your site they will get it. This stops the lazy people.
Thanks again for sharing this!
welcome :up:
I have no problem getting anything I want off the demo in the first post :o. I use Maxthon Browser mostly ;). How many people still use just IE :down:. Have that enable right click button,but don't need it to C+Paste the text. :(
yea the script is more of a "deterrant" as opposed to a fool proof setup
There is always a way around everything lol
works like a charm!!!!
I doubt anyone will be stealing any of my stuff anyway---you, on the otherhand,got some real good stuff to steal.
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.free-animations.co.uk%2Fpeople_uniform%2Fimages%2Funiform_10.gif&hash=5645c765502bb711af2c0b21006c13ddab40e9dd)
well ive already been robbed several times lol
Yup thats true >:(
And this is an excellent mod just what we need - some people are just too lazy to make their own things and thats what gets to me :tickedoff: especially after so much hard work goes into it
That is cool but I think i found a weakness. You know for Firefox the plugin NO SCRIPT, its actually a good script. Blocks Java Scripts on Sites I surf, until I allow it. Some sites really do have shitty things in JAVA there.
So, I got to your example page and I could save it all, until I allowed the JAVA script on your Site. So, I guess thats easy to avoid then. Or do you have a solution for that ?
WarBirD
Quote from: Aku on October 20, 2006, 11:44:01 PM
yea the script is more of a "deterrant" as opposed to a fool proof setup
There is always a way around everything lol
thats the bottom line really lol
definately a deterrant. Peeps will just google and find the trick to get around it if they don't already know. But for the lazy, it works great!
you do know that it is very very very easy to "steal" the text or the picture by looking at the source code of the page???
I mean, nice script, but I find it useless!
After all once I put something online I know there is a very good chance that someone will copy it!
My opinion :)
By looking at the sourse code wont allowe you to download it, the code are just text, not the image itself, you might have the path, but still cant download the image ;)
i'm pretty sure it easy to download the image once you have it's path
http://path-to-peace.com/60.gif ;)
(right click on it, and save it! or wget/flashget it!)
PS: I already had that image... :P
Actually, its easier than many people realize. By viewing the image, you in fact already have it! It's in your browser cache, and you can simply copy it from there to any directory with any filename you like.
There are in fact, a number of utilities that allow you to view your browser of choice's (IE, FF, Mozilla, Opera, etc) cache in a multiformat viewer/editor.
I installed this mod but it does not seem to be a good idea
why because the copy and paste option inside posting is also desable
some people might copy some thing and want to pase it here and send it
but the forum is locked. I am using some thing similary in phpbb but as I can put it inside templete only the forum is effected and not the posting
any way we can over come that?
Thats the reason we dont use it our selfs :2funny:
yes it is really funy ;D
:2funny: I remember when I first used this on my forum..there was a riot people couldnt copy and paste lol
'File > Save page' and you have most of the site and all images in a folder. :( Would be good if this and the source could be turned off.
Just make the script in a block NOT visible in the forums.
Thank you for the script!!!!!!!
Greetings!
Would it be possible to add something like
if user is guest - activate, else do nothing
I like the idea in general, but I need the right klick to keep my own page up to date
You'd have to make it a phpbox type.
if ($context['user']['is_guest'])
{
echo '<all code goes in between these two apostrophe's>';
}
Greetings!
Now itââ,¬â,,¢s official! You share your knowledge with the most stupid person on this planet.
I copied your php, have a look at the frontpage. Nothing happens.
Of course, itââ,¬â,,¢s php, so switch from scriptbox to php box. Nothing happens.
Next try, creating a thief.html with all the code in it and try include http: etc ââ,¬â€œ nothing.
Well and? I do all the testing as admin and forgot to log out. Brilliant ianus really!
Your code is working of course. Thanks a lot for it.
thank you for this, I needed s.th. like this for my site
Quote from: korea on December 12, 2006, 09:44:43 PM
I installed this mod but it does not seem to be a good idea
why because the copy and paste option inside posting is also desable
some people might copy some thing and want to pase it here and send it
but the forum is locked. I am using some thing similary in phpbb but as I can put it inside templete only the forum is effected and not the posting
any way we can over come that?
Hi all, from one very NON technical person...is there a way to enable paste but disable copy ...because as mentioned in the above post....although this stops copying, it also stops the vast majority of our users pasting things they want to bring IN to the forum!
Thank you in anticipation.
ctrl + c = copy, ctrl + v = paste. :)
I've never seen such a script. You'd have better luck searching at script sites for such things.
Thank you IchBin.... :)
Quote from: IchBinâ,,¢ on February 27, 2007, 05:35:35 PM
You'd have to make it a phpbox type.
if ($context['user']['is_guest'])
{
echo '<all code goes in between these two apostrophe's>';
}
What if I don't want guest or regular members stealing the code but admins can use the feature?
Try this:
global $context;
if ($context['user']['is_guest'] && !$context['user']['is_admin'])
echo 'all the code in between here';
This works good... However I would like to block everyone but admins and a few select member groups.
Because what you have there is only blocking a guest
Hi,
Where can i create those parameters? Im new in smf, and i dont now here can i put that code!
If someone can explain to me, i apreciate!
Thank!
Create what parameters? Please be specific pass25.
To add additional groups you'll need to define an array.
global $context, $user_info;
$groups = array(5,7);
if ($context['user']['is_guest'] || array_intersect($groups, $user_info['groups']))
echo ' your stuff here';
5 and 7 are the group ID's that this will show for. So whichever group ID you don't want it to work on, don't add the number to the array.
Hi,
Sorry, i dont now where to put 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>
and this:
Quoteglobal $context, $user_info;
$groups = array(5,7);
if ($context['user']['is_guest] || array_intersect($groups, $user_info['groups']))
echo ' your stuff here';
In which file do i add those codes? (Example index.themplate.php,...)
Thanks
Please read the first post. It tells you specifically where to put the code. The second code is what you would use to only display it for certain membergroups. You put the first piece of code where I typed "your stuff here". Since we are adding PHP to this, you'll need to put it all in a phpbox.
Here is the error message that I get now
Parse error: parse error, unexpected T_STRING, expecting ']' in /home/content/B/i/l/BillBarberJr/html/wetworks/Sources/Load.php(1749) : eval()'d code(35) : eval()'d code on line 4
Use it in a Script box not PHP Box.
That wouldn't work as I'm wanting to use php to restrict access to certain member groups and allow access for certain member groups.
For instance:
I want to restrict everyone but admins and one other membergroup from having the ability to copy and paste or right click...
But thanks for your help anyways...
Hi,
Sorry! But i am new in this stuff, and some things i dont now here to put them!
Tank´s, now is working fine!
Hi,
What do you meen with "your stuff here"?
Quoteglobal $context, $user_info;
$groups = array(5,7);
if ($context['user']['is_guest] || array_intersect($groups, $user_info['groups']))
echo ' your stuff here';
Thanks
Well, if you want something to show for guest, and the selected user groups, you put whatever code you want where it says "your stuff here" :). In other words, put all your javascript code in between the single quotes.
Hi,
Is there a way to define wich users can or not be afected by the script?
Some can be normaly in the forum, and some canot use the right buton in the mouse to copy or paste?
Because the forum is new, and i only have 36 members, but i now there are 3 users who cames to my forum only to copy! Because they have forums too!
I try to use the script in the mod global headers and footers and works fine in all forum!
Because a only have the portal in use!
Thanks!
Change the numbers to match the user ID of the users you need. Add more in the same format if needed.
if ($context['user']['id'] == 13 || $context['user']['id'] == 20 || $context['user']['id'] == 28)
echo 'your javascript here';
@IchBin, I think you said it reversed what he/she was asking
Something like
if ($context['user']['id'] != 13 || $context['user']['id'] != 20 || $context['user']['id'] != 28)
echo 'Your JS Here';
If I get it correctly.
He's asking to only do it for 3 users. Hence the reason I didn't use the !.
Oh... I only saw the first para :P
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!
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
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>"
Show your code that you are using please.
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
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?
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!
Thanks! I just tried it, and it works! I know its not foolproof, but its really nice! -Thanks -Aaron ;D
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 :)
You can put the code in your index.template.php (in the <head> section) manually and it will be on all pages.
This is nice tired of peps stealing links and posts >:( this works grate ;D
This is a neat deterrent. But very easy to get around if someone has some basic knowledge.
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:
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.
All you have to do is disable javascript in your browser window and you can right click on it. :P
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
Post the full code you are using in the [ code ] [ /code ] brackets. Without the spaces.
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>';
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>';
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
QuoteTry it this way.
No Errors but the listed groups cannot copy, no one can
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>';
No success, no errors but now everyone can right click/copy
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. :)
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.
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
What sort of block are you using? If you're using IchBin's code, you need to use a php block.
php
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.
Thanks Sabre, yes I'm using the member groups and not the post counted groups. Is that incorrect?
Hi mate :)
I am by no means knowledgeable in the coding arena, and only go by trial n error, and through reading the knowledge provided in past posts.
No that thats outta the way, lets get started!! lol
Ok mate, the easiest way(for meee :D) is to add all the "post group numbers" you want stopped, where it states
$groups = array(1,2,11,19);
And thats it bud!! Mission accomplished without any further coding.
Go have a beer, and marvel at its simplicity!! lol
So Here's the code to add, some of the previous ones didnt work for me:
global $context, $user_info;
$groups = array(ADD POST MEMBER GROUPS HERE eg. 1, 2, 3, etc etc etc);
if ($context['user']['is_guest'] || array_intersect($groups, $user_info['groups']))
echo '
ADD THE REST OF THE CODE HERE
There is no doubt an easier/ more efficient way to do this, but until the knowledgable speak up, this is what we have ;)
You could also leave the staff member groups in for good measure :)
Good luck mate :)
How would I do this in just the SMF pro gallery to keep others from images copies or Hyperlinked from?
If you are indeed using the SMF gallery mod this code should only work in the gallery.
global $context, $user_info;
$groups = array(ADD POST MEMBER GROUPS HERE eg. 1, 2, 3, etc etc etc);
if (isset($_GET['action']) && $_GET['action'] == 'gallery'){
if ($context['user']['is_guest'] || array_intersect($groups, $user_info['groups']))
echo 'ADD THE REST OF THE CODE HERE BETWEEN THE single quotes';
}
TY guys it seems this wouldnt work in my case. Access throughout my forum is based on Membergroup and not post count groups.
It should work not matter group type. All it checks is the Group ID number. Did you try it?
yes as i posted before it doesn't block anyone no matter what groups i put in
Please post your code.
same as i previously posted here:
http://www.tinyportal.net/index.php?topic=8937.80
Quote from: Rafferty on February 24, 2008, 12:42:37 PM
QuoteTry it this way.
No Errors but the listed groups cannot copy, no one can
Judging by this comment you have me a little confused. Are you trying to block access to the listed groups from copying, or are you trying to allow. The code that I've posted would block access to the said groups. So if you don't want those groups to be blocksed, you need to add everyone to the array that you want to be blocked.
so sorry, im a little tired. Yes, it doesnt matter what groups i put in, no one can copy if i have the block active. in other words all groups are blocked no matter what i put in
Well I don't know what to tell you Rafferty. This code in Ticks post worked just fine for me.
http://www.tinyportal.net/index.php?topic=8937.msg180135#msg180135
Thx very much for your help Ich, I guess it just wont work for me
IF you'd like Rafferty, I could take a look at this sometime today I think. Feel free to PM me a temp admin account if you would like.
Can someone spell 'thief' correctly in the topic? buck2
* Has it really been incorrectly spelled since September '05?? - May be why some search queries come up empty! *
Lol. At first I thought it didn't work, until I realized that my script blocker was letting me copy everything.
However, if someone wants the info that bad, they could just save the page.
Thanks for this one - this is Nice.
Its was bit of a headach as its always active for the Admin.
so i just use the other account to post - i wish there was a way to turn it off for admin like you can for other member groups.
try this
http://www.tinyportal.net/index.php?topic=8937.msg192705#msg192705
is there a snippet of code i can add to this to make a popup saying something like "Sorry but that function is not allowed"
There is a mod that does exactly that at smf