Help - Search - Members - Calendar
Full Version: Image And Bandwidth Theft
Movable Type Community Forum > Additional Resources > Tips and Tricks
crab25241
I am having trouble with myspace.com and xanga.com, who both encourage their many users to hotlink. Their free accounts don't allow for much space so they tell them either to hotlink or buy their premium accounts. Most of their users are teenagers and novices so their preference is to keep their free accounts. To be fair, many of them don't think they're doing anything wrong. Many attempts to prevent this with .htaccess from both me and my host have been futile.

I'd love for a solution to this practice from within Movable Type; preferably as an option in the settings menu that would disable right-click-save and hotlinking. I know this would probably not defeat a determined internet-savvy thief but it might stop the novices, who are the vast majority of the culprits.

Any ideas?
npunter
I doubt there's a way to do this from MT, but you can use a .htaccess file to prevent people hot linking your images.

Create a file in a text editor and name it .htaccess enter the following text, replacing mysite.com with your site's URL. Any links from outside www.mysite.com will not work

CODE
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.com [NC]
RewriteRule \.(png|gif|jpe?g)$ - [NC,F]


FTP to your sites root directory and the file will do the work for you. You will need to check with your host that you are allowed to .htaccess files though!
djslim
QUOTE (crab25241 @ Jan 17 2006, 03:51 PM)
I am having trouble with myspace.com and xanga.com, who both encourage their many users to hotlink. Their free accounts don't allow for much space so they tell them either to hotlink or buy their premium accounts. Most of their users are teenagers and novices so their preference is to keep their free accounts. To be fair, many of them don't think they're doing anything wrong. Many attempts to prevent this with .htaccess from both me and my host have been futile.

I'd love for a solution to this practice from within Movable Type; preferably as an option in the settings menu that would disable right-click-save and hotlinking. I know this would probably not defeat a determined internet-savvy thief but it might stop the novices, who are the vast majority of the culprits.

Any ideas?
*



most hosting companies offer more bandwidth than anyone would ever need. a button is so small I wouldn't worry about it this much. I understand your point but be flattered they want to use your image or button. Thats the way I look at it.
jespes
you asked how to ...

QUOTE
... disable right-click-save... I know this would probably not defeat a determined internet-savvy thief but it might stop the novices ...


If you include this javascript between (head) and (/head), when someone right-clicks on that page, they'll get an alert box on their screen saying "Please don't steal my bandwidth blah blah blah."

Obviously, change that wording to say whatever you want.


CODE
<script language="JavaScript1.1" type="text/javascript">
<!--courtesy http://javascript.internet.com -->
<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Please don't steal my bandwidth blah blah blah");
return false;
}
return true;
}
 
document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
//  End -->
</script>



PS I'm just addressing the poster's request ... here's hoping it doesn't trigger the usual "no right click" blabfest .... smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.