Disable click setting stuck. - Page 2 Disable click setting stuck. - Page 2
 

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

Disable click setting stuck.

Started by ElkySS, October 15, 2003, 10:34:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zarsky

its ok...someone will move it....this feature is buggy and will be removed or revised in the next version

Search the board, I know the fix is out there somewhere.
Read the Online DOCs, FAQ, and SEARCH the board BEFORE posting questions for help.

DefenceTalk.com

Open "scripts.js" and edit this part down at the bottom, you can't miss it:


///////////////////////////////////
// disable right-click start///////
function click(e)
   {
   if (document.all)
   if (event.button == 2) return false;
   if(document.layers) if (e.which == 3) return false;
   }
function click2()
   {
   event.returnValue=false;return false;
   }
   if (document.layers)document.captureEvents(Event.MOUSEDOWN);
   document.onmousedown=click;
   document.oncontextmenu=click2;
   
// disable right-click end/////////
///////////////////////////////////


You will no longer have to worry about right clicks. :)
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.defencetalk.com%2Fpictures%2Fsignature_cpg.php&hash=c0098ed5314d39beb9e8799c7c8787a9a0353b45)

Joachim Müller

no right-click modifications completely removed in the stable branch of the cvs - some dev team members please confirm this...

GauGau

Tarique Sani

Confirmed - right click related code not seen in stable...
SANIsoft PHP applications for E Biz

ElkySS

for some reason I cannot right click on any part of my new gallery.  
both "Disable right-click on full-size pop-up (JavaScript - no foolproof method) " and "Disable right-click on all "regular" pages (JavaScript - no foolproof method) " are set to no but it still won't let me.  please help...

also the URL link that shows up in the pic info is worng.  it is showing up like "http://elkyss.servebeer.com/gallery//displayimage.php/?pos=-15989"
the / infront of the ? is messing it all up. I have tryed changing the "Target address for the 'See more pictures' link in e-cards " but it allways puts the / back in there.

hyperion

You are suffering from two separate issues.  The right click feature is buggy, and the solution is noted in several posts.  Just search to find.


The second issue is new, and it will be investigated.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

ElkySS

kewl thx.  I get my right click back and hope for a speedy solution to that trailing / thingy.

BTW Great work on the new gallery guys.  I am sure that Greg would be happy with the direction that things are going.

jacques_brelle

Hi,
I had the same problem with the right click...
so I just modified the file "scripts.js" in the main directory deleting these lines :
///////////////////////////////////
// disable right-click start///////
function click(e)
   {
   if (document.all)
   if (event.button == 2) return false;
   if(document.layers) if (e.which == 3) return false;
   }
function click2()
   {
   event.returnValue=false;return false;
   }
   if (document.layers)document.captureEvents(Event.MOUSEDOWN);
   document.onmousedown=click;
   document.oncontextmenu=click2;
   
// disable right-click end/////////
///////////////////////////////////

and it works... I hope this is what you wanted.
 :mrgreen:

jdbaranger

Hi,

For the // problem, in displayimage.php, search the line

$info['URL'] = '<a href=' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . ' >' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';

and replace it with

$info['URL'] = '<a href=' . $CONFIG["ecards_more_pic_target"] . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . ' >' . $CONFIG["ecards_more_pic_target"] . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';

Jean-Denis
Jean-Denis

ElkySS

You guys are great.  I actually found the right click code and just commented it out with a // rather than del it.  the the other code worked gread.  keep it up.

Joachim Müller

As there are several threads dealing with the right-click issue I keep on merging them into one...

GauGau

Jeff Seabrook

i'd suggest making it an announcement?

change this:

///////////////////////////////////
// disable right-click start///////
function click(e)
{
if (document.all)
if (event.button == 2) return false;
if(document.layers) if (e.which == 3) return false;
}
function click2()
{
event.returnValue=false;return false;
}
if (document.layers)document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=click;
document.oncontextmenu=click2;

// disable right-click end/////////
///////////////////////////////////


TO THIS:

///////////////////////////////////
// disable right-click start///////
//function click(e)
//{
//if (document.all)
//if (event.button == 2) return false;
//if(document.layers) if (e.which == 3) return false;
//}
//function click2()
//{
//event.returnValue=false;return false;
//}
//if (document.layers)document.captureEvents(Event.MOUSEDOWN);
//document.onmousedown=click;
//document.oncontextmenu=click2;

// disable right-click end/////////
///////////////////////////////////

this is in SCRIPTS.JS

commenting out this section fixes the right click bug, and can be removed alltogether.

Joachim Müller

this is only half of the story, there are changes in other files as well.
Check the whole thread for an answer.
We're hopefully going to release cpg1.2.0final in the very near future (which will fix the issue), so please be patient for the moment...

GauGau

Cyberpawz

I have solved the issue for the right click...

In the file SCRIPTS.JS

Change
/////////////////////////////////
// disable right-click start///////
function click(e)
{
if (document.all)
if (event.button == 2) return false;
if(document.layers) if (e.which == 3) return false;
}
function click2()
{
event.returnValue=false;return false;
}
if (document.layers)document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=click;
document.oncontextmenu=click2;

// disable right-click end/////////
///////////////////////////////////


To This below.

///////////////////////////////////
// disable right-click start///////
//function click(e)
//{
//if (document.all)
//if (event.button == 2) return false;
//if(document.layers) if (e.which == 3) return false;
//}
//function click2()
//{
//event.returnValue=false;return false;
//}
//if (document.layers)document.captureEvents(Event.MOUSEDOWN);
//document.onmousedown=click;
//document.oncontextmenu=click2;

// disable right-click end/////////
///////////////////////////////////


THEN, and this is important...

Go to the functions.inc.php

Which is in the include folder of Coppermine, and look for this line.

        if ($CONFIG['disable_gallery_rightclick'] == 1)

Change this to

        if ($CONFIG['disable_gallery_rightclick'] == 0)

Save the page.

Reload the Coppermine page if you have it open, or open it, and right click away.  This works on my server..

http://www.cyberpawz.com/coppermine/displayimage.php?pid=1318&fullsize=1

Test here.

Cyberpawz

Cyberpawz

The issue I am having now is that smaller images that don't need to be resized are not right clickable.

Small image

I have fixed the portion that is right clickable in the large images, but not the smaller, can someone please tell me how to get this portion of it fixed, so far I have found nothing really to state how to change it.

Cyberpawz

Cyberpawz

You know for future releases, programmer notes in the PR versions would be great for those who want to help...

bromide

when using ie, my users can't right click the photo to get the url for remote linking.  i dont mind them remote linking, so how do they get around the java script?  thanks!!!!

Joachim Müller

@bromide: this has been answered in detail in this thread (I moved your posting to it for this very reason). Upgrade to cpg1.2.0final and you should be fine, the no-right-click feature has been removed from final (because it was buggy).

GauGau

P.S. searching before posting would have helped

Digital Pea

You're all going to throw rotten eggs at me (https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.photo-art-gallery.com%2Fphpbb%2Fimages%2Fsmiles%2Fparanoid.gif&hash=6e4cb656134340a3b0e8a7e2e6bbef51c90e143b)... but... erm.... well....... I WANT DISABLE RIGHT CLICK!! (https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.photo-art-gallery.com%2Fphpbb%2Fimages%2Fsmiles%2Fma.gif&hash=cb5f9ef98fa0b0c81172e206c514d2afc2200064)

It's all well and good peeps telling me "if you don't want images nicked then don't put them on the net", but I sell the damn things! They are my livelihood, as I am a photographer, so how am I supposed to display my wares if I don't put them up to view?!  (https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.photo-art-gallery.com%2Fphpbb%2Fimages%2Fsmiles%2Fu_nut.gif&hash=9d4fff3df6db6dde34b976777632f6eac321b2d2)

The coppermine album is the best for my needs so far, having given up on alternatives. But, I really want a disable right click option.... watermarking ruins the pics, and digimark only tags them, neither these options stop copying in the first place.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.photo-art-gallery.com%2Fphpbb%2Fimages%2Fsmiles%2Fhob.gif&hash=ddfc79de60b5a7ce2fabf04a2d5ac7329f645c32)

Casper

The hack has been posted by gaugau, here

But as he says, anyone with any sense can still get them.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here