Digital Point Forums
iKobo

Go Back   Digital Point Forums > Design & Development > Programming > JavaScript
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Mar 23rd 2005, 8:24 pm
lilquit's Avatar
lilquit lilquit is offline
Hand of A'dal
 
Join Date: Oct 2004
Location: so cal, oahu, worldwide
Posts: 408
lilquit is on a distinguished road
no right click script

Would it be hard to add a no right click script for images into my site
www.662mob.com

Thank you
__________________
My CPA Life - The Story of an Affiliate Marketer from Day 1

bodyboarding - -
Reply With Quote
  #2  
Old Mar 23rd 2005, 8:45 pm
fryman's Avatar
fryman fryman is offline
Kiss my rep
 
Join Date: Jun 2004
Posts: 9,589
fryman is a name known to allfryman is a name known to allfryman is a name known to allfryman is a name known to allfryman is a name known to allfryman is a name known to all
I use this and love it

Quote:
<script language="JavaScript1.2">
var clickmessage="Right click disabled on images!"
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()
</script>
It seems to work only on IE.
Reply With Quote
  #3  
Old Mar 23rd 2005, 8:46 pm
Smyrl's Avatar
Smyrl Smyrl is online now
Moderator
 
Join Date: Mar 2004
Location: Scrub Oak Forrest
Posts: 9,494
Smyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond reputeSmyrl has a reputation beyond repute
Phone Verified
I have been told that only makes people more determined to get. I saw a javascript version. The work around being disable javascript. It seems where there is a will, there is a way. I might considering branding so if stolen it would be obvious.

Shannon
Reply With Quote
  #4  
Old Mar 23rd 2005, 8:56 pm
getsum80 getsum80 is offline
Hand of A'dal
 
Join Date: Mar 2005
Posts: 333
getsum80 is on a distinguished road
a very nice good code
__________________
Bodyboards - Bodyboarding -

Check out my blog at
Reply With Quote
  #5  
Old Mar 23rd 2005, 8:57 pm
J.D. J.D. is offline
of the Nightfall
 
Join Date: Nov 2004
Posts: 1,198
J.D. has a spectacular aura aboutJ.D. has a spectacular aura about
Quote:
Originally Posted by fryman
I use this and love it
FF will popup a dialog and then will still show the menu in FF.

Besides, it won't prevent people from downloading your images, if this is what you are trying to prevent, that is. In FF, you just go to Page Info and you will see all images on the page and will be able to save them.

J.D.
Reply With Quote
  #6  
Old Mar 23rd 2005, 9:01 pm
lilquit's Avatar
lilquit lilquit is offline
Hand of A'dal
 
Join Date: Oct 2004
Location: so cal, oahu, worldwide
Posts: 408
lilquit is on a distinguished road
I'm not tech enought to put it on . I will have to find someone that is but thanks for the code.
I want it because people are posting my images on other sites using my bandwith
__________________
My CPA Life - The Story of an Affiliate Marketer from Day 1

bodyboarding - -
Reply With Quote
  #7  
Old Mar 23rd 2005, 9:03 pm
fryman's Avatar
fryman fryman is offline
Kiss my rep
 
Join Date: Jun 2004
Posts: 9,589
fryman is a name known to allfryman is a name known to allfryman is a name known to allfryman is a name known to allfryman is a name known to allfryman is a name known to all
That is not a right click problem, it is called hotlinking. Much more complicated, you should get in touch with someone that can play around with your .htaccess file.
Reply With Quote
  #8  
Old Mar 23rd 2005, 9:09 pm
lilquit's Avatar
lilquit lilquit is offline
Hand of A'dal
 
Join Date: Oct 2004
Location: so cal, oahu, worldwide
Posts: 408
lilquit is on a distinguished road
well its mostly kids doing it so i think they just right click properties to get the image address
__________________
My CPA Life - The Story of an Affiliate Marketer from Day 1

bodyboarding - -
Reply With Quote
  #9  
Old Mar 23rd 2005, 9:17 pm
J.D. J.D. is offline
of the Nightfall
 
Join Date: Nov 2004
Posts: 1,198
J.D. has a spectacular aura aboutJ.D. has a spectacular aura about
Quote:
Originally Posted by lilquit
well its mostly kids doing it so i think they just right click properties to get the image address
As fryman said, it's not the kind of problem you can resolve with client-side scripting. Find out which sites are hotlinking to your images and block offending IP's.

J.D.
Reply With Quote
  #10  
Old Mar 23rd 2005, 9:22 pm
lilquit's Avatar
lilquit lilquit is offline
Hand of A'dal
 
Join Date: Oct 2004
Location: so cal, oahu, worldwide
Posts: 408
lilquit is on a distinguished road
well if they cant right click they have to view source to get the code yes??? That is enough for me.. if they go through the trouble of viewing source code i dont mind
__________________
My CPA Life - The Story of an Affiliate Marketer from Day 1

bodyboarding - -
Reply With Quote
  #11  
Old Mar 23rd 2005, 9:27 pm
NewComputer's Avatar
NewComputer NewComputer is offline
of the Nightfall
 
Join Date: May 2004
Location: Canada
Posts: 1,993
NewComputer will become famous soon enoughNewComputer will become famous soon enough
Quote:
Originally Posted by lilquit
I'm not tech enought to put it on . I will have to find someone that is but thanks for the code.
I want it because people are posting my images on other sites using my bandwith
Do you have Cpanel? You can use what is called a hotlinking block...
Reply With Quote
  #12  
Old Mar 23rd 2005, 9:32 pm
lilquit's Avatar
lilquit lilquit is offline
Hand of A'dal
 
Join Date: Oct 2004
Location: so cal, oahu, worldwide
Posts: 408
lilquit is on a distinguished road
No cpanel on this hostng service
Im trying to get my web guy to change this site to my other host which has a cp but he is lagging OC (out of control)
__________________
My CPA Life - The Story of an Affiliate Marketer from Day 1

bodyboarding - -
Reply With Quote
  #13  
Old Mar 23rd 2005, 9:37 pm
ResaleBroker's Avatar
ResaleBroker ResaleBroker is offline
Sales Training Webmaster
 
Join Date: Jul 2004
Location: SalesPractice.com
Posts: 1,662
ResaleBroker is on a distinguished road
You can prevent hotlinking with .htaccess if you're on an Apache Server with Mod-rewrite. If you need a tutorial I posted some links in my blog [seobulletin].
__________________
Sales Training - The Definitive Source for Sales Education on the Internet
Think and Grow Rich by Napoleon Hill - Free Digital Download PDF eBook Edition

Last edited by ResaleBroker; Mar 23rd 2005 at 9:46 pm.
Reply With Quote
  #14  
Old Mar 23rd 2005, 9:53 pm
J.D. J.D. is offline
of the Nightfall
 
Join Date: Nov 2004
Posts: 1,198
J.D. has a spectacular aura aboutJ.D. has a spectacular aura about
Quote:
Originally Posted by lilquit
well if they cant right click they have to view source to get the code yes??? That is enough for me.. if they go through the trouble of viewing source code i dont mind
You are missing the point here (sorry). If you consider clicking Tools > Page Info as going through the trouble, then sure, stick this or similar code to each and every of your pages. What we are trying to say here is that this will be more trouble for *you* to maintain the script than it will ever be for *them*.

J.D.
Reply With Quote
  #15  
Old Mar 23rd 2005, 10:09 pm
getsum80 getsum80 is offline
Hand of A'dal
 
Join Date: Mar 2005
Posts: 333
getsum80 is on a distinguished road
aahhh ok i get it
__________________
Bodyboards - Bodyboarding -

Check out my blog at
Reply With Quote
  #16  
Old Mar 23rd 2005, 10:26 pm
NewComputer's Avatar
NewComputer NewComputer is offline
of the Nightfall
 
Join Date: May 2004
Location: Canada
Posts: 1,993
NewComputer will become famous soon enoughNewComputer will become famous soon enough
I never really understood the whole javascript thing anyways. Invisibly water mark it (there are tutorials) and then keep an eye on your logs. When you visit their site and drag your mouse over the image you know is yours it will show your watermark. An ISP email later and the image is gone.

Otherwise, you are fighting a losing battle...
Reply With Quote
  #17  
Old Mar 23rd 2005, 10:31 pm
getsum80 getsum80 is offline
Hand of A'dal
 
Join Date: Mar 2005
Posts: 333
getsum80 is on a distinguished road
whats an isp email?
i email their isp?
how do i know whose hosting them

this is the site where people post my photos the most
www.805bbr.com/forum
__________________
Bodyboards - Bodyboarding -

Check out my blog at
Reply With Quote
  #18  
Old Mar 24th 2005, 9:06 am
redking redking is offline
Grunt
 
Join Date: Oct 2004
Posts: 93
redking is an unknown quantity at this point
Quote:
Originally Posted by getsum80
whats an isp email?
i email their isp?
how do i know whose hosting them

this is the site where people post my photos the most
www.805bbr.com/forum
Damn you're dumb. This is not the industry for you.
Reply With Quote
  #19  
Old Mar 24th 2005, 10:19 am
getsum80 getsum80 is offline
Hand of A'dal
 
Join Date: Mar 2005
Posts: 333
getsum80 is on a distinguished road
F U red king I'm a kid and i am trying to learn
__________________
Bodyboards - Bodyboarding -

Check out my blog at
Reply With Quote
  #20  
Old Mar 24th 2005, 10:40 am
clasione clasione is offline
of the Nightfall
 
Join Date: Jan 2005
Location: Long Island
Posts: 2,346
clasione is a name known to allclasione is a name known to allclasione is a name known to allclasione is a name known to allclasione is a name known to allclasione is a name known to all
This is the one I use:
<script type="text/JavaScript">
<!--

//Disable

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> </script>
__________________
-
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AdSense Per Click Payout Based On Natural Rankings digitalpoint Reporting & Stats 82 Sep 25th 2005 9:09 am
Estimated Payment per click vs average cost per click joeychgo Reporting & Stats 5 Sep 16th 2005 4:01 pm
Link/Directory Script Review Dreamshop Link Exchange 20 Aug 16th 2005 7:46 am
Newbie: Script to auto-create links? www.e-booked.com Link Development 2 Mar 13th 2005 9:52 am
Higher Earnings W/Hight Click Thru Rate wiseone Reporting & Stats 2 Oct 18th 2004 9:57 am


All times are GMT -8. The time now is 1:13 pm.