-Cookie- Posted December 17, 2013 Share Posted December 17, 2013 This tutorial will disable right click on your site for guests only! Just add that code at the very top of your ACP > look & Feel > Skin name > Global Template > defaultHeader <if test="IPSMember::isInGroup( $this->memberData, array(2) )"> <script language=JavaScript> var message="You Must Log-in before you can use Right Click!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </script> </if>To Change what the message says all you need to do is Edit this part of the codes "You Must Log-in before you can use Right Click!" And if your wanna add different groups to the code just go to this <if test="IPSMember::isInGroup( $this->memberData, array(2) )">and where it says 0 add your groups like this 2,4,12 etc.... 7 Link to comment Share on other sites More sharing options...
Verified Posted December 17, 2013 Share Posted December 17, 2013 There is already a hook for this. Regardless, good tutorial and thanks for taking your time to make this for WebFlake! 2 Link to comment Share on other sites More sharing options...
Reptiles Posted January 26, 2014 Share Posted January 26, 2014 Thanks for this Link to comment Share on other sites More sharing options...
Arif Posted July 18, 2014 Share Posted July 18, 2014 works for me thanks Link to comment Share on other sites More sharing options...
Adrian98 Posted October 14, 2014 Share Posted October 14, 2014 Thank you Link to comment Share on other sites More sharing options...
naRf Posted December 6, 2014 Share Posted December 6, 2014 And ctrl + c? Link to comment Share on other sites More sharing options...
KareraHekku Posted December 12, 2014 Share Posted December 12, 2014 This is great, I mean it doesn't stop Guest completely, but it easily will hinder most Guest trying to quickly Copy and Paste stuff! Thanks! Link to comment Share on other sites More sharing options...
Ionutz. Posted December 23, 2014 Share Posted December 23, 2014 thx man Link to comment Share on other sites More sharing options...
svk Posted December 25, 2014 Share Posted December 25, 2014 Thank you. Link to comment Share on other sites More sharing options...
m000 Posted December 30, 2014 Share Posted December 30, 2014 Valid condition for checking if member's guest is (!$this->memberData['member_id']) 1 Link to comment Share on other sites More sharing options...
osef Posted January 14, 2015 Share Posted January 14, 2015 great !! thanks Link to comment Share on other sites More sharing options...
Bahme1940 Posted January 31, 2015 Share Posted January 31, 2015 Thanks for sharing, nice sig btw. Link to comment Share on other sites More sharing options...
Checker Posted February 4, 2015 Share Posted February 4, 2015 good tutorial and thanks Link to comment Share on other sites More sharing options...
Bogdan. Posted February 23, 2015 Share Posted February 23, 2015 Thanks , I use this Link to comment Share on other sites More sharing options...
sikho Posted March 5, 2015 Share Posted March 5, 2015 BIG THX for this!! Link to comment Share on other sites More sharing options...
Recommended Posts