No right click

9 years 10 months ago #106373 by encreetplus
Good day,

How can i do a NO RIGHT CLICK on images from the Gallery ??

I need this solution for the CB Gallery only not a global solution.

Stefan
9 years 10 months ago #108352 by Castlestone
Why would you show something, that nobody can "download" and why you're looking for no right click code?

Even you wouldn't share your files, don't share files on the internet ;)

You can put this code into you "gallery" (.../components/com_comprofiler/plugin/user/plug_cbgallery) file where the tab "host" the template.

But remember, first visitors can be get angry till you decide to protect areas like this and second - everyone can make a screen shot and get what you want to safe!!!

But here you get what you want:

[code:1]<script language="JavaScript" type="text/javascript">
<!--
function dno(){return false}
function omu(e){if(e.which==1){window.releaseEvents(Event.MOUSEMOVE);window.onmousemove=null}}
function jk(){alert(unescape("Hier kannst du deinen eigenen Text einfügen!"«»));return false}
function ct(){hg=event.button;if(hg==2||hg==3)jk()}vc=document.all;qb=document.getElementById;if(vc){if(qb){document.oncontextmenu=jk;document.onselectstart=dno}else{document.onmousedown=ct}}if(qb&&!vc){document.onmousedown=dno;document.oncontextmenu=dno}if(document.layers){window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);window.onmouseup=omu}
//-->
</script>[/code:1]

Its java-script

greetings

Post edited by: Castlestone, at: 2009/08/18 02:43

Post edited by: Castlestone, at: 2009/08/18 02:44
Moderators: beatnantkrileon
Time to create page: 0.368 seconds
Facebook Twitter Google LinkedIn