Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [Solved]: prevent right mouse clicking  (Read 6505 times)

0 Members and 1 Guest are viewing this topic.

bean

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
[Solved]: prevent right mouse clicking
« on: July 21, 2004, 11:08:21 am »

Hey

I cant use .htaccess so I need to find out how to prevent people from hotlinking to the pictures I have in the gallery.
An idea I have is to prevent right mouse clicking and it seems to work. But I can't find the place to add the java script code for the
full size image. Where do I but the java code to disable right click for the full size image ?
« Last Edit: July 21, 2004, 04:34:10 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: prevent right mouse clicking
« Reply #1 on: July 21, 2004, 12:52:38 pm »

edit displayimage.php, find
Code: [Select]
// Display the full size image
function display_fullsize_pic()
{
    global $CONFIG, $HTTP_GET_VARS, $THEME_DIR, $ALBUM_SET;
    global $lang_errors, $lang_fullsize_popup, $lang_charset;

    if (function_exists('theme_display_fullsize_pic')) {
        theme_display_fullsize_pic();
        return;
    }

    ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo $CONFIG['gallery_name'?>: <?php echo $lang_fullsize_popup['click_to_close'];
    
?>
</title>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'] == 'language file' $lang_charset $CONFIG['charset'?>" />
<link rel="stylesheet" href="<?php echo $THEME_DIR ?>style.css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body scroll="auto" marginwidth="0" marginheight="0">
<script language="JavaScript" type="text/JavaScript">
adjust_popup();
</script>
and add your "no right-click" script after it.

GauGau

P.S. I guess you're aware that no right-click sripts will only prevent complete and utter newbies from finding out the url of a pics. I wouldn't waste any energies on such a solution...
Logged

bean

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: prevent right mouse clicking
« Reply #2 on: July 21, 2004, 02:57:18 pm »

P.S. I guess you're aware that no right-click sripts will only prevent complete and utter newbies from finding out the url of a pics. I wouldn't waste any energies on such a solution...

That's the idea :-) Thanks!
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 16 queries.