How to disable right mouse click to prevent copy content in my drupal site

sangeetharao - October 13, 2008 - 12:57

Is there any module which will be useful to disable the right mouse click to prevent copy content on my drupal site.

if not how to achieve that requirement.

please guide me

with thanks and regards
sangeetha rao

disable right mouse click

Bacteria Man - October 13, 2008 - 13:54

I don't know of a module, but this can be accomplished with JavaScript.

That said, I wouldn't waste your time. It can easily be defeated.

What kind of content: text, images? There are ways to prevent hot-linking of images.

-------------------------------------------------------

"The sting in any rebuke is the truth." - Benjamin Franklin

Thank you, and i have one more.............

sangeetharao - October 14, 2008 - 05:27

Benjamin Franklin, thank you for your suggestion.

Is there any module in drupal that will display the user ip addresses in the bloke area?

could you suggest that?

with regards
sangeetha rao

user's ip address

Bacteria Man - October 14, 2008 - 06:50

No need to be so formal. Just call me Ben. :-)

The user's IP address is stored in the sessions table.

You don't need a module; just do something like:

global $user;
$user_ip = db_result(db_query("SELECT hostname FROM {sessions} WHERE uid = %d", $user->uid));
$output = t("Your IP Address: !user_ip", array("!user_ip" => $user_ip));
return $output;

-------------------------------------------------------

"The sting in any rebuke is the truth." - Benjamin Franklin

Thanks for the code

inoutech - October 14, 2008 - 07:30

Thanks for the info. You are the Best!

Truly,

Roy Leonhardt

Private Software
Computer Speed
SEO
Create Your Own Reality

Help

smcclendon - February 1, 2009 - 21:15

As a newbie.....

How can I use this on my Drupal site to keep people from saving images?

Can I just put this in the content?

cannot

dman - February 1, 2009 - 21:22

How can I use this on my Drupal site to keep people from saving images?
Can I just put this in the content?

No.
No you can't.
Sorry.

.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |

... sorrrrrrry, but ...

tryitonce - June 10, 2009 - 16:55

where does the code go - it is probably obvious for most - but not yet for me.

thanks for helping

using code

Bacteria Man - June 10, 2009 - 23:26

Just create a node or perhaps a block (wherever you want the output to appear), copy/paste the code and change the input filter to php. You'll also need to wrap the code in opening/closing php tags.

<?php
...
?>

thanks

tryitonce - June 11, 2009 - 08:59

Great, thanks for the quick answer.

 
 

Drupal is a registered trademark of Dries Buytaert.