#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jul 6, 2013 16:27:41 GMT -8
Hey guys if you use this code it'll work. Put the follow code here: Admin > Themes > Layout Templates > Forum Wrapper Put it next to <head> <script type="text/javascript"> function catch_click(e) { if (!e) var e = window.event;
var right_click = (e.which ? (e.which == 3) : (e.button == 2));
if (right_click) { alert('Right clicking on this page is not allowed.'); return false; } }
document.onmousedown = catch_click; if (document.captureEvents) document.captureEvents(Event.MOUSEDOWN); </script> All that code does is disable right clicking forum wide, stopping you from copy/pasting text.. It is not cross-browser compatible, and you can still get the image URLs by quoting posts.
|
|
inherit
194418
0
Jan 18, 2015 10:11:41 GMT -8
XENO QUEEN
89
May 2013
kiwishaped
|
Post by XENO QUEEN on Jul 6, 2013 16:40:08 GMT -8
Hey guys if you use this code it'll work. Put the follow code here: Admin > Themes > Layout Templates > Forum Wrapper Put it next to <head> <script type="text/javascript"> function catch_click(e) { if (!e) var e = window.event;
var right_click = (e.which ? (e.which == 3) : (e.button == 2));
if (right_click) { alert('Right clicking on this page is not allowed.'); return false; } }
document.onmousedown = catch_click; if (document.captureEvents) document.captureEvents(Event.MOUSEDOWN); </script> All that code does is disable right clicking forum wide, stopping you from copy/pasting text.. It is not cross-browser compatible, and you can still get the image URLs by quoting posts. Yeah, I do see your point, but I wanted it forum wide just so that I could stop people from stealing both peoples work (photos and words) I removed quoting as an option and no code is perfect, not even yours, unfortuantly, I found my ways around it. I just found this one more... visually appealing I suppose. Do NOT get me wrong, dearest, this is a FAB code, better than I could ever do. I was just presenting people with another option.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jul 6, 2013 16:58:34 GMT -8
..Were you able to figure out why my entire board was right click disabled with the plugin enabled? Sorry ♥ ℒʊ√ ♥, Could you give this version a try?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jul 6, 2013 17:11:22 GMT -8
No worries XENO QUEEN.. Just be aware that your code is not cross-browser, so some visitors will still have access to the context menu.
|
|
inherit
(?)?
188910
0
Jan 26, 2013 13:30:48 GMT -8
♥ ℒʊ√ ♥
Clouds float into my life no longer to carry rain or usher storm but to add color to my sunset sky.
10,458
January 2013
luv
|
Post by ♥ ℒʊ√ ♥ on Jul 6, 2013 17:16:40 GMT -8
..Were you able to figure out why my entire board was right click disabled with the plugin enabled? Sorry ♥ ℒʊ√ ♥, Could you give this version a try? Will do and thank you!
|
|
inherit
194418
0
Jan 18, 2015 10:11:41 GMT -8
XENO QUEEN
89
May 2013
kiwishaped
|
Post by XENO QUEEN on Jul 6, 2013 17:18:40 GMT -8
No worries XENO QUEEN.. Just be aware that your code is not cross-browser, so some visitors will still have access to the context menu. Thank you for that! :) I will keep that in mind, do you have any suggestions to make image safety site wide? Other than what I've already done? P.s - The code works in Firefox, IE and Chrome, it's good enough for me. Haha.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jul 7, 2013 4:13:50 GMT -8
The problem with Firefox, and I think Safari is that it gives you the option to turn off scripts after the second alert.. Click that and you can then right click freely.
I'd use a pop-up <div> instead, that way you won't get the option to stop the scripts from working.
Here's a code I wrote a while back to do that for v4.5. I've updated it to work in Safari too..
<script type="text/javascript"> <!-- var message = "<b>Please do not do that!!</b>";
var woah = document.createElement('div'); with(woah) { id = 'woah'; style.border = '1px solid black'; style.backgroundColor = '#ff0000'; style.position = 'absolute'; style.display = 'none'; style.width = '250px'; style.height = '100px'; style.margin = '0 auto'; style.textAlign = 'center'; innerHTML = '<span style="color: #000000; position: relative; top: 40px;">'+message+'</span>'; onclick = function(){this.style.display = 'none';} } document.body.appendChild(woah);
function showAlert() { var sW = window.innerWidth || document.documentElement.clientWidth; var sH = window.innerHeight || document.documentElement.clientHeight; sW = sW/2-125; sH = sH/2-100; if(navigator.userAgent.match(/AppleWebKit/)) { woah.style.top = window.scrollY+sH+'px'; } else if(document.documentElement) { woah.style.top = document.documentElement.scrollTop+sH+'px'; } else { woah.style.top = window.pageYOffset+sH+'px'; }
woah.style.left = sW+'px'; woah.style.display = ''; return; }
document.oncontextmenu = function(){showAlert(); return false;} // --> </script> You are welcome to try that.
Or, with a little tinkering, it could be made to target images only. That way right clicking will be available, just not on your images.
|
|
inherit
194418
0
Jan 18, 2015 10:11:41 GMT -8
XENO QUEEN
89
May 2013
kiwishaped
|
Post by XENO QUEEN on Jul 7, 2013 10:20:59 GMT -8
The problem with Firefox, and I think Safari is that it gives you the option to turn off scripts after the second alert.. Click that and you can then right click freely. I'd use a pop-up <div> instead, that way you won't get the option to stop the scripts from working. Here's a code I wrote a while back to do that for v4.5. I've updated it to work in Safari too..
You are welcome to try that. Or, with a little tinkering, it could be made to target images only. That way right clicking will be available, just not on your images. Alright, I'll give it a go, thank you very much! I'll let you know how it goes.
|
|
inherit
196452
0
Nov 1, 2013 7:40:31 GMT -8
Baller95
What's for dinner?: Food
1,771
July 2013
baller95
|
Post by Baller95 on Jul 27, 2013 13:43:24 GMT -8
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jul 27, 2013 13:50:36 GMT -8
Ricky answered it for me.. The plugin disables the quote function for posts containing images as a security measure, as the image can be taken from the Visual side of the WYSIWYG editor.
|
|
inherit
196452
0
Nov 1, 2013 7:40:31 GMT -8
Baller95
What's for dinner?: Food
1,771
July 2013
baller95
|
Post by Baller95 on Jul 27, 2013 14:16:26 GMT -8
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Jan 30, 2014 7:40:20 GMT -8
Ricky answered it for me.. The plugin disables the quote function for posts containing images as a security measure, as the image can be taken from the Visual side of the WYSIWYG editor. I just noticed that this doesn't seem to protect images on the main page.
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Jan 30, 2014 11:35:55 GMT -8
Todge blcTodge don't know what's up but I have the plugin enabled, set to 50px in the settings and for guests. I can log out and using IE11 and FF the plugin works like a charm. Here are some threads on my forum loaded with pictures: thescooterprofessor.proboards.com/thread/3038/members-picture-gallerythescooterprofessor.proboards.com/thread/1051/steam-diesel-punk-elite-projectNow blc sent me a PM with photos that he copied right from my forum as a guest and on his computer he says he's using FF too? But this is weird I can copy the signature photos anywhere on my forum even though I have the signature resizing plugin set to 125px by 150px? I tried moving it around a bit and no changes. Why can blc copy these and send them to me on FF and I use FF and I get the message opo up like I'm supposed to saying they can't be copied? As I pointed out above, it seems to be the home page that isn't covered. I noticed it on my forum by accident when I had to retest because it removed the quote button. People need to be able to quote others so I had to just set it to guests, so I could get the quote button back, and call it good, though it isn't.
|
|
Former Member
inherit
guest@proboards.com
134807
0
Nov 22, 2024 19:43:07 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jan 14, 2016 5:11:54 GMT -8
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jan 26, 2016 11:51:32 GMT -8
|
|