Post by Abdullazizsaid » Mon Apr 27, 2015 4:27 pm

hello

Disable Right Click & CTRL + C OC 2.0.1.1

thanks in advace


Posts

Joined
Thu Apr 09, 2015 2:10 am

Post by viethemes » Mon Apr 27, 2015 8:04 pm

You can use my extension Custom JavaScript and add code below

Code: Select all

$(document).ready(function(){ 
  document.oncontextmenu = function() {return false;};

  $(document).mousedown(function(e){ 
    if( e.button == 2 ) { 
      return false; 
    } 
    return true; 
  }); 
});

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by IP_CAM » Mon Apr 27, 2015 10:19 pm

But, just to mention it, it's of no real use. Anyone can use the Browser Control Functions to see the Source, and you just prevent Visitors to call, i.E. a Product Page, in a new WIndow. Or just switch of the JavaScripting, by use of the Noscript-Browser Mod... ::)

It's so, at best, not very Customer-friedly acting, in my opinion! ;)
Ernie

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'300+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by yodapt » Mon Apr 27, 2015 10:39 pm

Maybe worth to mention text selection can be disabled with CSS, although it can still be copied from the source code.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by Abdullazizsaid » Thu Apr 30, 2015 9:56 pm

does it work at any theme cuze i using this theme http://themeforest.net/item/journal-adv ... talAtelier and its not working :(


Posts

Joined
Thu Apr 09, 2015 2:10 am

Post by IP_CAM » Fri May 01, 2015 10:10 am


I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'300+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by sanshay » Mon May 04, 2015 10:29 pm

Use simple code in body tag, dont use java for this.
In your template catalog/view/theme/YOURTHEME/template/common/header.tpl
Find:

Code: Select all

<body class="<?php echo $class; ?>">
Replace with

Code: Select all

<body oncontextmenu="return false" class="<?php echo $class; ?>">
Hope this help you further

Active Member

Posts

Joined
Fri Jan 25, 2013 8:49 pm

Post by Dhaupin » Tue May 05, 2015 12:09 am

Changing the body tag like that may break mods that use it as a verbatim target, just saying.

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA
Who is online

Users browsing this forum: No registered users and 37 guests