forum.coppermine-gallery.net
Support => Older/other versions => cpg1.2 Standalone Support => Topic started 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 ...
-
check your database with phpMyAdmin, what does the config table say about disable_popup_rightclick and disable_gallery_rightclick ?
GauGau
-
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
-
to switch it off, set the vars in phpMyAdmin both to "0"
GauGau
-
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 ?!
-
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
-
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
<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
<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
<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.
-
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
-
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 :)
-
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!!!!
-
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.
-
Hi John
Thanx for your anwser but it diden't help.
//TreBoR
-
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
-
@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??
-
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
-
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
-
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 :)
-
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.
-
the feature is buggy and will have to vanish - see http://forum.coppermine-gallery.net/index.php?topic=569 for a fix
GauGau
-
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!
-
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.
-
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. :)
-
no right-click modifications completely removed in the stable branch of the cvs - some dev team members please confirm this...
GauGau
-
Confirmed - right click related code not seen in stable...
-
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.
-
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.
-
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.
-
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:
-
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
-
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.
-
As there are several threads dealing with the right-click issue I keep on merging them into one...
GauGau
-
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.
-
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
-
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
-
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
-
You know for future releases, programmer notes in the PR versions would be great for those who want to help...
-
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!!!!
-
@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
-
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)
-
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.
-
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.
-
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.