Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 24. Nov 2024, 20:57

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 27. Nov 2006, 19:59 
Offline

Joined: 27. Nov 2006, 19:56
Posts: 5
Just set up my site at http://www.austin-thomas.co.uk (still needs lots doing to it) and was wondering where in which pages to paste the following script as an echo to protect the site from being right clicked on in 70% of most browsers.

I tried
Code:
echo "<script language=JavaScript>";
echo "<!--";
echo 'var message="Please email austin@austin-thomas.co.uk if you would like to use this image.";';
echo "function clickIE4(){";
echo "if (event.button==2){";
echo 'alert(message);';
echo "return false;";
echo "}";
echo "}";
echo "function clickNS4(e){";
echo "if (document.layers||document.getElementById&&!document.all){";
echo "if (e.which==2||e.which==3){";
echo "alert(message);";
echo "return false;";
echo "}";
echo "}";
echo "}";
echo "if (document.layers){";
echo "document.captureEvents(Event.MOUSEDOWN);";
echo "document.onmousedown=clickNS4;";
echo "}";
echo "else if (document.all&&!document.getElementById){";
echo "document.onmousedown=clickIE4;";
echo "}";
echo 'document.oncontextmenu=new Function("alert(message);return false")';
echo "// --> ";
echo "</script>";
in index.php but it wasn't working at all and if I put it in image.php it just messes the whole thing up!

Please advise,

Charlie


Top
 Profile  
 
 Post subject:
PostPosted: 27. Nov 2006, 21:59 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Hi put

var message="Right Click Disabled! If you need to refreash this screen hit the 'F5' key on your keyboard. Copyright(c) Don Pound Studio, All Rights Reserved";

///////////////////////////////////
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")


at the bottom of js/twg.js.php ;).

But you know that this really useless - everyone who can turn off Javascript can still copy the pics ....

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 28. Nov 2006, 14:36 
Offline

Joined: 27. Nov 2006, 19:56
Posts: 5
Yeah I know it's useless... I will be using other protection methods too. This one stops 70% of the dummies anyway. Firefox automatically disables these types of scripts for me anyway!

Many thanks, great support!

C.>

EDIT: Is there any way this will work for the full screen images on image.php after you click them in the gallery?[


Top
 Profile  
 
 Post subject:
PostPosted: 28. Nov 2006, 14:49 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
no-

You can turn of Javascript anytime without problems -
if someone turns if off before the popup won't open - but if he does it afterwards ... no way.

(Invisible) Watermarks are th only way I can think of.
#removed_broken_link

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 28. Nov 2006, 19:57 
Offline

Joined: 27. Nov 2006, 19:56
Posts: 5
So it's not possible to make the script run on the full screen image page, even though it's useless?


Top
 Profile  
 
 Post subject:
PostPosted: 29. Nov 2006, 01:18 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
oh - sure you can - put it in i_frame/i_popup.php

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 29. Nov 2006, 23:32 
Offline

Joined: 27. Nov 2006, 19:56
Posts: 5
Thanks, do you know of any free invisible watermarking applications or any other protection methods?

Chigs


Top
 Profile  
 
 Post subject:
PostPosted: 30. Nov 2006, 01:38 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
sorry - haven't done anything in this direction - ask google ;).


Top
 Profile  
 
 Post subject:
PostPosted: 30. Nov 2006, 09:05 
Offline

Joined: 27. Nov 2006, 19:56
Posts: 5
Will do, thanks a million for your help. Excellent support!

C.>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy