Author Topic: [REQUEST MOD]Admin chooses to enable or disable RIGHT CLICK COPYRIGHT for user  (Read 5472 times)

0 Members and 1 Guest are viewing this topic.

Offline sajwal

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Hello People,
                 Is there any mod, where Admin can choose from ACP to weather allow a user use right click mouse button or not. This may be default set enabled for guest , but would be a fantastic mod if admin chooses special users to get rid of right click restriction.
« Last Edit: August 13, 2006, 03:57:48 AM by sajwal »

Offline whoopiedoo2

  • Newbie
  • *
  • Posts: 28
    • View Profile
this would be a good one

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
In includes/page_header.php file,

find:

Quote
"has_rss" => false,

add after:

Quote
"has_right_click_protect" => (defined('RIGHT_CLICK_PROTECT') && RIGHT_CLICK_PROTECT == true) ? true : false,

In includes/constants.php file, add top of ?>

Quote
define('RIGHT_CLICK_PROTECT', true);

In templates/your_template/header.html file,

replace like this:

Quote
{if has_right_click_protect}
function right(e) {
    if ((document.layers || (document.getElementById && !document.all)) && (e.which == 2 || e.which == 3)) {
      alert("© Copyright by {site_name}");
      return false;
    }
    else if (event.button == 2 || event.button == 3) {
      alert("© Copyright by {site_name}");
      return false;
    }
    return true;
  }

  if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = right;
  }
  else if (document.all && !document.getElementById){
    document.onmousedown = right;
  }

   document.oncontextmenu = new Function("alert('© Copyright by {site_name}');return false");
{endif has_right_click_protect}
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Exalent Nicky - thanks for moving in MODs. ;)

Edit: No more move ?  8O
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?