[Solved]: prevent right mouse clicking [Solved]: prevent right mouse clicking
 

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

Main Menu

[Solved]: prevent right mouse clicking

Started by bean, July 21, 2004, 11:08:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bean

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 ?

Joachim Müller

edit displayimage.php, find// 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...

bean

Quote from: GauGau on July 21, 2004, 12:52:38 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!