4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: pixelkitty on February 20, 2003, 08:04:54 AM
-
I have a script that I am currently using at pixelkitty.net (http://www.pixelkitty.net) to disable right click of images only.
This way, visitors can still use other right click functions such as bookmark, back, open in new window/tab etc on the page itself.
Is it possible to put this script into 4images instead of the current 'disable right click' script?
I want to do this as I find the current disable script is too restrictive, as I use right click extensively for navigation and other purposes when I am within my own sites.
The script I use at the above site is below, for those who may want it.
// JavaScript Document
var clickmessage="© Copyright by {site_name}"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
-
Very good, thank you! I'm moving this post to the MOD section, if you don't mind, otherwise it will be lost here...
-
Is it possible to put this script into 4images instead of the current 'disable right click' script?
Personally, I prefer the current right click disable script as I also do not want users choosing "View Source" when I display my images in a chromeless browser window.
Just my two cents. Nice script though.
-
there is nothing stopping the site visitor from clicking EDIT - VIEW SOURCE
waste of time trying to stop that really.
All my script is designed to do is remind people that copyright is enforced. They already have the image downloaded onto their machine as soon as they view the site so ... *shrug*
-
Actually in a chromless browser window, there is no Edit menu so the user can't choose "View Source". Yes, you're right about the browser caching images. It's rather easy to stop that too through meta tags but that's a whole other topic. :wink:
I applaud you for the script. I truly do. It's a nice alternative and it's good to have options for software as rich in features as 4images. I was just voicing my opinion that I wouldn't prefer it to be the default script that shipped with 4images, that's all.
-
reason I would want it "ONLY ON THE IMAGE" is so people actually hit the download button instead of just right clickin on the image, so it counts how many people download.
I disabled the right-click disabler. Many people get frustrated by it, through my experience.
-
yes, this right-click disable thingie often seems quite a poor attempt to avoid unlogged downloads or something... i like the winxp thingie where whenever you're with your mouse above a picture it gives you this small menu where you also have the save option and of course it works and the download is still not counted for :) in the end it seems that it is only users' ignorance that keeps those downloads coming :lol:
-
not a big deal to disable this "thingie"
<meta http-equiv="imagetoolbar" content="no">
or for any particular image<img src="image.jpg" galleryimg="no">
-
Well, since this thread is supposed to be for a mod and it now seems like it might turn into a whole other topic about general image theft, I would like to point everyone to an existing forum topic:
Pic Security
http://www.4homepages.de/forum/viewtopic.php?t=1716
The image toolbar, right clicking and many other techniques have already been documented there.
-
I have a script that I am currently using at pixelkitty.net (http://www.pixelkitty.net) to disable right click of images only.
This way, visitors can still use other right click functions such as bookmark, back, open in new window/tab etc on the page itself.
Is it possible to put this script into 4images instead of the current 'disable right click' script?
I want to do this as I find the current disable script is too restrictive, as I use right click extensively for navigation and other purposes when I am within my own sites.
The script I use at the above site is below, for those who may want it.
// JavaScript Document
var clickmessage="© Copyright by {site_name}"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
I do not know how to use this Mod. Anyone help me please. :)
-
I do not know how to use this Mod. Anyone help me please. :)
Open /templates/<yourtemplate>/header.html
replace the original javascript with this one.
-
ThankS V@no :D
boti
-
Excellent mod. Can anyone add the F10 right-click disable to it?
Here is what I had in my header before this mode that also handled the F10 issue:
<script language=JavaScript>
var message="© Copyright by {site_name}";
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>
-
hey , how do we disable the right click one image ???
thx
-
:D Cool it work fine..... 8)
-
How can I format the copyright message?
I want to have linebreaks so that it's not just one long run on sentance.
Im trying to put:
All images are copyright their respective owners
Please view the full image and use the download link to download
We dont allow Hotlinking, so there is no need to view the properties
of the images.
Thank you,
Sitename
-
use \n
-
Mmmm, but when the site is open in Firefox, if you right click on the image, it will show the Copyright notice. But click 'OK' to close the pop up copyright window and then right after closing the window the usual menu-on-right click opns up allowing the user to save the photo.
Is this just happening to me ??
-
Mmmm, but when the site is open in Firefox, if you right click on the image, it will show the Copyright notice. But click 'OK' to close the pop up copyright window and then right after closing the window the usual menu-on-right click opns up allowing the user to save the photo.
Is this just happening to me ??
Happens with me too, but if you notice and look at the menu, there is no 'properties' or 'save image as' options. It's as though you right-clicked on the page, not the image. :)
-
Is there a way to change this mod, so that it works only on the details page, with the full image.
I still want to be able to right click on thumbs to open in a new window.
thanks for the help
-
copy the JS into the detail.html... (o:
a other solution is to use the strg and then klick on the Thumb to open it in a new window...
-
copy the JS into the detail.html... (o:
a other solution is to use the strg and then klick on the Thumb to open it in a new window...
Thanks Acidgod, after i posted that i thought the same thing.
But didnt get a chance to try it untill now.
and it works :D
-
What I have done is delete the javascript code and use:
header.html
<meta http-equiv="imagetoolbar" content="no">
as well as:
<body oncontextmenu="return false" ...>
Works pretty well so far, need to test on firefox.
-
Works pretty well so far, need to test on firefox.
Works in Firefox too... (o:
-
thanks a lot dude for this great thing :)