Disable Right Click
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 1 của 1

Chủ đề: Disable Right Click

  1. #1
    Thành Viên PandavB's Avatar
    Ngày tham gia
    Feb 2014
    Bài viết
    243
    Thanks
    1
    Thanked 13 Times in 11 Posts

    Icon14 Disable Right Click

    This script will act as a sort of barrier to prevent people from right clicking on your forum thus offering some sort of protection. There are ways to get round this but think of it as a hurdle which may put some people off.

    Add the following code to the header template:
    Code:
    PHP Code:
    <script type="text/javascript">
    <!--
    var 
    error="Right click functionality is disabled";

    function 
    clickIE4(){
    if (
    event.button==2){
    alert(message);
    return 
    false;
    }
    }

    function 
    clickNS4(e){
    if (
    document.layers||document.getElementById&&!document.all){
    if (
    e.which==2||e.which==3){
    alert(message);
    return 
    false;
    }
    }
    }

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

    document.oncontextmenu=new Function("alert(error);return false")

    // --> 
    </script> 
    While this blocks the ability to Right Click, it also blocks the ability to copy and paste through the context menu that appears when Right Clicking. Copy and paste functionality is still available through the Ctrl+C and Ctrl+V shortcuts respectively.

    Editing the Error Message:
    Changing the message shown is a piece of cake. This can be done by finding this line near the top of the script:

    Code:
    PHP Code:
    var error="Right click functionality is disabled";
    Change the text in quotes to anything you like
    File Kèm Theo File Kèm Theo
    Khách viếng thăm hãy cùng PandavB xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 

Các Chủ đề tương tự

  1. [MU] Lỗi No-Ip Disable Mong Các Bạn Giúp Đỡ
    Bởi sontran901 trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 3
    Bài viết cuối: 15-03-12, 10:46 PM
  2. [MU] Lỗi khi click vào nhân vật bản 11.00.00
    Bởi detucuadavid trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 0
    Bài viết cuối: 26-02-12, 07:08 PM
  3. [KT] Cần giúp về vấn lỗi không click vào NPC thủ khố
    Bởi kakakura trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 7
    Bài viết cuối: 09-02-12, 01:00 PM
  4. NPC Cổ Lão Thái không click được vào
    Bởi del.love trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 17
    Bài viết cuối: 28-08-10, 06:53 PM
  5. Click vào NPC
    Bởi hihahihuc trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 3
    Bài viết cuối: 15-08-10, 09:19 AM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 11:07 AM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.