Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Yes, I know it's not a perfect solution, but my client wants to disable right click and image download for Node Gallery. Does anyone have the code, and where does it go?
Thanks
Comments
Comment #1
dbeall CreditAttribution: dbeall commentedThis is not the answer you were looking for..
Maybe water mark the images, because anyone can still get the image, even with right click disabled. The rule is, if you can view it, you can save it.
Sometimes I have to use the FF developer tool bar 'view image information' for lightbox images, or screen capture for flash images.
This code will work in 'some' but not 'all' cases...
Comment #2
hassansr CreditAttribution: hassansr commentedi have considered watermarks, however the client is adamant on the non download issue. So i need to be able to disable right click
Comment #3
dbeall CreditAttribution: dbeall commentedThis one is better
http://www.dynamicdrive.com/dynamicindex9/noright.htm
Edit: this would have to go in the page.tpl.php file in your theme folder below the body tag.
Comment #4
hassansr CreditAttribution: hassansr commentedthat works really well, thanks
summarize:
1. add this to page.tpl.php in the theme being used inside the body tags | it will be identified by something like, div id="body_left" or div id="body_right" or div id="body"|
copy from here>>
2. need to make sure to remove it and refresh before editing pages or life will be irritating for editor.
3. replace and save when done
the path to files is still available via view source and the copy using ctrl-c still works, but for most users it should stop them from downloading images
Comment #5
dbeall CreditAttribution: dbeall commented@hassansr, glad that is working for you.
Change title for search results, category, component and close this one as it looks to be solved..
Comment #6
dbeall CreditAttribution: dbeall commentedComment #7
Sandip Choudhury CreditAttribution: Sandip Choudhury commentedCopy Prevention is a module - https://drupal.org/project/copyprevention for -
Disable text selection
Disable copy to clipboard
Disable right-click context menu on all site content
Disable right-click context menu only on images
And for disable many more . . .