forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Rodinou on October 15, 2003, 10:34:26 pm

Title: Disable click setting stuck.
Post by: Rodinou on October 15, 2003, 10:34:26 pm
I go to Admin ...

I turn to Yes to DISABLE the Script ... Right click works
I turn to No ... Right Click always works !

So ... if I choose YES or NO, in 2 cases, no right click :(

Ouinnnn ...
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on October 15, 2003, 10:37:58 pm
check your database with phpMyAdmin, what does the config table say about disable_popup_rightclick and disable_gallery_rightclick ?

GauGau
Title: Edit: Right click issues w/ 1.2RC2
Post by: Rodinou on October 15, 2003, 11:04:46 pm
Actually my config is "Disable Right click > Yes"

And I have this on PhpMyAdmin

Modifier Effacer  disable_popup_rightclick   1  
Modifier Effacer  disable_gallery_rightclick   1
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on October 15, 2003, 11:07:09 pm
to switch it off, set the vars in phpMyAdmin both to "0"

GauGau
Title: Edit: Right click issues w/ 1.2RC2
Post by: Rodinou on October 16, 2003, 10:17:31 am
I have tested, changed in phpMyAdmin : same result : no right click !!!

Anyway, the code is very old (only compatible with IE, with Mozilla you can have right content)

If I remove from the code, no pb with admin ?


It would be more interesting, in future, to do

<div style=width=100% height=100% style="background-image:blank.gif; z-index:2>
<img src=img.jpg>
</div>

... But have you any problem ?!
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on October 16, 2003, 11:10:41 am
for the moment (as a fix), you can edit script.js and comment out the no-right-click stuff.
The issue with a blank gif in front of the actual picture has been discussed on the dev board and will probably be in the next version.

GauGau
Title: Edit: Right click issues w/ 1.2RC2
Post by: Rodinou on October 16, 2003, 11:23:46 am
Ok I do This :)

Take the code for the future version ...

Don't forget if you put a blank.gif ON a clickable pic ... how to click to have the big pic hehe ? :)

Solution is simple. Since Mozilla & IE5.x, ALL can be clickable ... here's the code.

I have taken one of my page to have a "real" code.

http://www.sortons.net/photos/displayimage.php?album=177&pos=1

So ...

Actually the code is

Code: [Select]
<table align="center" width="600" cellspacing="1" cellpadding="0" class="maintable">
        <tr>
                <td align="center" class="tableb" height="100" style="white-space: nowrap; padding: 0px;">
                        <table cellspacing="2" cellpadding="0" style="border: 1px solid #000000; background-color: #5B5B5B; margin-top: 30px; margin-bottom: 30px;">
                                <tr>
                                        <td>
                                                <a href="javascript:;" onClick="MM_openBrWindow('displayimage.php?pid=5279&fullsize=1','8261626483f8e61d5c7e24','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=496,height=656')"><img src="albums/userpics/10001/normal_02.jpg" class="image" border="0" alt="Cliquez pour voir l'image en taille réelle" /><br /></a>

                                                <div align="center" class="admin_menu"><a href="delete.php?id=5279&what=picture"  class="adm_menu" onclick="return confirm('Voulez vous vraiment SUPPRIMER cette image?\nLes commentaires seront également supprimés.');">SUPPRIMER CETTE IMAGE</a></div>

                                        </td>
                                </tr>
                        </table>


Replace

Code: [Select]
<a href="javascript:;" onClick="MM_openBrWindow('displayimage.php?pid=5279&fullsize=1','8261626483f8e61d5c7e24','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=496,height=656')">
<img src="albums/userpics/10001/normal_02.jpg" class="image" border="0" alt="Cliquez pour voir l'image en taille réelle" /><br /></a>

by

Code: [Select]
<div title="Cliquez pour voir l'image en taille réelle" style="width:100%; height:100%; cursor:hand; z-index:2; background-image:url(blank.gif)" onClick="MM_openBrWindow('displayimage.php?pid=5279&fullsize=1','8261626483f8e61d5c7e24','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=496,height=656')">

<img src="albums/userpics/10001/normal_02.jpg" class="image" border="0" />

</div>

In fact, the image stops to be linked : it's the Div which is in Z-INDEX becoming clickable : your pic is protected.

Why ? Right click and you have ... "save the background image as ..." and you can have only the ... "blank.gif" :)

The top would be that ...

albums/userpics/10001/normal_02.jpg =
image.php?id=44

so ...

<img src=image.php?id=44>

(possible 'cause the paths are in the database) and the protection will be granted.
Title: Right click
Post by: rgroen on October 16, 2003, 01:59:32 pm
Can anyone tell me why the right click doesnt work in de 1.2 version.

I only want that people can right click the biggest original photo.


Thnx
Title: Edit: Right click issues w/ 1.2RC2
Post by: Rodinou on October 16, 2003, 02:18:17 pm
Before post ...
1. see if you are in the good forum ... it's about a bug, a request ... so ... SUPPORT FORUM is the good.

2. see if a similar post doesn't exist or ... in this case
http://forum.coppermine-gallery.net/index.php?topic=569

More easy for all :)
Title: Can't turne of Javascript and edit Albums even as admin!!
Post by: ThE_TreBoR on October 19, 2003, 04:49:59 pm
Hi All


Java:

In the Config page you can turne right click on or off, but it doesent work!
It doesent matter if it's on or off, right click can't be enabeld.


Admin mode:

wy can't you edit/delete/ any Album properties as Admin unless the Album rights is set to Members of the group Administrators?

Thanx on beforhand!!!!
Title: Edit: Right click issues w/ 1.2RC2
Post by: John on October 19, 2003, 04:53:45 pm
The java right click problem has been proposed on here before! did you search? AFAIR the solution was to set it back to the default val. in your sql database.
Title: Edit: Right click issues w/ 1.2RC2
Post by: ThE_TreBoR on October 19, 2003, 05:22:48 pm
Hi John

Thanx for your anwser but it diden't help.


//TreBoR
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on October 19, 2003, 09:35:00 pm
moved/merged some right-click postings into this thread. No right click is crap and will be removed from Coppermine, as it brings more problems than it solves.
For the moment, just disable the settings in the database as described above.

GauGau
Title: Edit: Right click issues w/ 1.2RC2
Post by: John on October 19, 2003, 09:52:51 pm
@gaugau : I dont know if it should be completely removed??? yes it is crap, would recommend remove function completely from cpg BUT also allow add-on to completely disable right click (like its doing now) so at least there is some choice in the matter??
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on October 19, 2003, 10:01:27 pm
I will remove the JavaScript completely and instead there'll be some blank gif in front of the actual picture, so a "right-click,save picture as" will only save the blank gif. This will of course be an admin option (like it is now) and an add-on in the mods section.

GauGau
Title: Edit: Right click issues w/ 1.2RC2
Post by: pcfreak on October 19, 2003, 10:19:31 pm
Quote from: "gaugau"
I will remove the JavaScript completely and instead there'll be some blank gif in front of the actual picture, so a "right-click,save picture as" will only save the blank gif. This will of course be an admin option (like it is now) and an add-on in the mods section.

GauGau


Has no use, spend time to beter things
Title: Edit: Right click issues w/ 1.2RC2
Post by: Rodinou on October 19, 2003, 10:21:01 pm
I'm OK :)

The "No right click option" or "blank.gif" is loss of time :)

If you don't want people copy your pictures ... don't put them on the net : the BEST NO SAVING PIC OPTION :)
Title: no right click - how to allow right clicks
Post by: simplythi on October 22, 2003, 10:21:24 pm
how do i turn off the no right click option? Which file is the no right click code located in? I want my users to be able to right click and save images as they wish.
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on October 22, 2003, 10:28:58 pm
the feature is buggy and will have to vanish - see http://forum.coppermine-gallery.net/index.php?topic=569 for a fix

GauGau
Title: An unusual right click issue.
Post by: Gren on October 23, 2003, 10:47:03 pm
The ability to right click was disabled by default, for some reason. However, the ability to right click was toggled on in the control pannel. Switching the settggns around doesn't work.

Normally, this wouldn't be an issue, but Dekstop wallpaper is among my galleries content. Any clues to what this is caused by? Even better, possible fixes?

Edit: Oh, good gravy! This was for Coppermine Photo Gallery 1.2.0 - RC2, not 1.1.1! Terribly sorry!
Title: Edit: Right click issues w/ 1.2RC2
Post by: Zarsky on October 23, 2003, 10:54:48 pm
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.
Title: Edit: Right click issues w/ 1.2RC2
Post by: DefenceTalk.com on October 24, 2003, 05:35:18 am
Open "scripts.js" and edit this part down at the bottom, you can't miss it:

Code: [Select]

///////////////////////////////////
// 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. :)
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on October 24, 2003, 09:09:23 am
no right-click modifications completely removed in the stable branch of the cvs - some dev team members please confirm this...

GauGau
Title: Edit: Right click issues w/ 1.2RC2
Post by: Tarique Sani on October 24, 2003, 01:08:16 pm
Confirmed - right click related code not seen in stable...
Title: Edit: Right click issues w/ 1.2RC2
Post by: ElkySS on October 26, 2003, 04:01:41 am
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.
Title: Edit: Right click issues w/ 1.2RC2
Post by: hyperion on October 26, 2003, 05:48:18 am
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.
Title: Edit: Right click issues w/ 1.2RC2
Post by: ElkySS on October 26, 2003, 12:44:55 pm
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.
Title: Edit: Right click issues w/ 1.2RC2
Post by: jacques_brelle on October 26, 2003, 03:10:54 pm
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:
Title: Edit: Right click issues w/ 1.2RC2
Post by: jdbaranger on October 27, 2003, 10:48:49 am
Hi,

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

Code: [Select]
$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

Code: [Select]
$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
Title: Edit: Right click issues w/ 1.2RC2
Post by: ElkySS on October 28, 2003, 03:20:31 am
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.
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on October 31, 2003, 08:01:55 am
As there are several threads dealing with the right-click issue I keep on merging them into one...

GauGau
Title: Edit: Right click issues w/ 1.2RC2
Post by: Jeff Seabrook on November 12, 2003, 02:35:43 am
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.
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on November 12, 2003, 08:39:31 am
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
Title: Edit: Right click issues w/ 1.2RC2
Post by: Cyberpawz on November 13, 2003, 12:22:59 am
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
Title: Edit: Right click issues w/ 1.2RC2
Post by: Cyberpawz on November 13, 2003, 04:07:33 am
The issue I am having now is that smaller images that don't need to be resized are not right clickable.

Small image (http://www.cyberpawz.com/Coppermine/displayimage.php?album=random&cat=&pos=-1689)

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
Title: Edit: Right click issues w/ 1.2RC2
Post by: Cyberpawz on November 14, 2003, 04:54:59 pm
You know for future releases, programmer notes in the PR versions would be great for those who want to help...
Title: enable remote linking
Post by: bromide on November 20, 2003, 12:03:20 am
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!!!!
Title: Edit: Right click issues w/ 1.2RC2
Post by: Joachim Müller on November 20, 2003, 07:26:45 am
@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
Title: Uh-oh!
Post by: Digital Pea on February 07, 2004, 07:47:21 pm
You're all going to throw rotten eggs at me (https://forum.coppermine-gallery.net/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://forum.coppermine-gallery.net/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://forum.coppermine-gallery.net/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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.photo-art-gallery.com%2Fphpbb%2Fimages%2Fsmiles%2Fhob.gif&hash=ddfc79de60b5a7ce2fabf04a2d5ac7329f645c32)
Title: Edit: Right click issues w/ 1.2RC2
Post by: Casper on February 07, 2004, 07:54:52 pm
The hack has been posted by gaugau, here (http://forum.coppermine-gallery.net/index.php?topic=2450)

But as he says, anyone with any sense can still get them.
Title: Edit: Right click issues w/ 1.2RC2
Post by: Digital Pea on February 07, 2004, 08:05:30 pm
Quote from: "casper"
The hack has been posted by gaugau, here (http://forum.coppermine-gallery.net/index.php?topic=2450)

But as he says, anyone with any sense can still get them.

Thanks Casper.
Title: easier solution (at least for me)
Post by: maelody on February 16, 2004, 04:56:08 pm
I editted whichever theme I was using and went into its template.html file and changed where it said <body> into <body oncontextmenu="return false" ondragstart="return false">. That disables right click everywhere on the page. Hope that helps.