Greetings,
My name is Harry and recently I started to use VirtueMart. I am developing this site (extraimpresores.com) but I am having a problem. I need to disable the right clic on the image that appear inside a fancybox when I click in the product image.
I manage to disable the right click on all the site images, but the one that appear inside the fancybox in virtuemart.
How can I achieve it?
Never heard anyone want to do that - and disabling rmc is rarely used these days as image thievery occurs far less. Anyone determined to steal an image simply looks at the page code and extracts the URL.
eg
http://extraimpresores.com/images/stories/virtuemart/product/TABO-PRE 90.jpg
You also are using a commercial template so we cannot know how it is currently coded. http://forum.virtuemart.net/index.php?topic=108212.0
mmm... Is there a way to disable FancyBox? I unchecked the option in virtuemart but it still appear.
If you uncheck Fancybox then Facebox is loaded and used instead.
Is there a way to disable/remove the image link so it doesnt open the full size of the image?
Edit and override components/com_virtuemart/views/productdetails/tmpl/default_images.php
<div class="main-image">
<?php echo $image->displayMediaFull("",false,"rel='vm-additional-images'"); ?>
<div class="clear"></div>
To answer your original question, you can do that by editing Fancybox JS (jquery.fancybox-1.3.4.pack.js or jquery.fancybox-1.3.4.js). Find this:
<div id="fancybox-content"></div>
and change to this:
<div id="fancybox-content" oncontextmenu="return false"></div>
The file edit suggested by Ghost will work for you but would have to be redone every time that VirtueMart is updated. Be aware that none of this will stop the simple drag and drop of an image from the displayed page.
QuoteBe aware that none of this will stop the simple drag and drop of an image from the displayed page.
you can add a transparent png image over the original image ... so with drag and drop you will get only the transparent png
Quote from: jenkinhill on June 01, 2017, 15:53:28 PM
The file edit suggested by Ghost will work for you but would have to be redone every time that VirtueMart is updated.
No, just create Fancybox override in templates/yourtemplate/js/fancybox/jquery.fancybox-1.3.4.pack.js (or jquery.fancybox-1.3.4.js).