Reptiles Posted February 24, 2014 Share Posted February 24, 2014 How do i stop people from being able to view (see image below) the red part when they right click on an image and make it so they can only see the purple part..? Link to comment Share on other sites More sharing options...
0 Lock Down Posted February 24, 2014 Share Posted February 24, 2014 (edited) add the code below to the top of your skins globaltemplate. It will stop all but admins from using right click. acp > Look & Feel > Manage Skin Sets & Templates > Manage TemplatesGlobal Templates > globaltemplate <if test="!in_array($this->memberData['member_group_id'],array(4,6))"> <script language=JavaScript> var message="Right click is unavailable on the website!"; function clickIE(){ if (event.button==2){ alert(message); return false; } } function clickNS(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=clickNS; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE; } document.oncontextmenu=new Function("alert(message);return false") </script> </if> Or if you don't want to show a message change this line document.oncontextmenu=new Function("alert(message);return false") to this document.oncontextmenu=new Function("return false") Edited February 24, 2014 by Lock Down 1 Link to comment Share on other sites More sharing options...
0 Kingy Posted February 24, 2014 Share Posted February 24, 2014 The question(s) in this support topic have been answered and the owner has been able to solve the problem. Because of this, the support topic has been closed and moved. If you have other questions, please open a new topic. Link to comment Share on other sites More sharing options...
Question
Reptiles
How do i stop people from being able to view (see image below) the red part when they right click on an image and make it so they can only see the purple part..?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts