News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

full size image disabling

Started by KapHn8d, October 03, 2003, 04:16:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

KapHn8d

I remember their being a question on the old support forum regarding what part of the config you commented out to disable the ability to click on the intermediate picture and get the full size image. If it was transferred here, I haven't found it... could someone please repost?

You help is much appreciated!

Thanks,
Clayton

Joachim Müller

you don't edit a file, but you go to the config section (once you're logged in as admin) and disbale it there - see http://coppermine-gallery.com/forum/index.php?topic=177

GauGau

KapHn8d

I am not talking about the intermediate pictures. I'm asking how to disable the full size image pop-up window... ie. You click on thumbnails, you get the intermediate image... you click on the intermediate image, you get nothing. The default behavior is to pop open a new window with the full resolutin image. I simply want to disable that. I posted to the old board and got a response with a section of PHP that I needed to replace... the old and new section was proveded in the post. I searched for the old, replaced it with the new and it worked great. I was running like that until a server problem that has caused me to reinstall everything (including coppermine) and I don't have the snippet I'm suppose to replace anymore.  :(  I really do appreciate your quick response. I should have been molre clear in the original post. Thanks...

-Clayton

KapHn8d

       if (isset($image_size['reduced'])) {
                $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
                $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
                $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','".uniqid(rand())."','toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
                $pic_html .= "<img src=\"".$picture_url."\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
                $pic_html .= "</a>\n";
        } else {
                $pic_html = "<img src=\"".$picture_url."\" {$image_size['geom']} class=\"image\" border=\"0\" /><br />\n";
        }


I have been experimenting and still can't find it.

I would really appeciate the help.

hyperion

As I recall, disabling the javascript function that opens the new window does the trick.  I also remember the old topic, but not to worry, GauGau expects to integrate the old board or have it as a reference in a matter of days. Can you wait that long?

For a start, try this:



if (isset($image_size['reduced'])) {
                $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
                $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
                $pic_html = "<img src=\"".$picture_url."\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
        } else {
                $pic_html = "<img src=\"".$picture_url."\" {$image_size['geom']} class=\"image\" border=\"0\" /><br />\n";
        }

&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-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)

KapHn8d

Thanks!!

Commenting out the line that references the javascript took care of it. I appreciate all the help...

 :D -Clayton

silurus

Firstly absolutely delighted to have found this support forum for Coppermine.

I would like to take this one step further, as well as not allowing the pop up I would like the image to be removed from the database.  So, what would basically happen is the user would upload an image of any size to their album, it automatically gets resized to my set parameters in the intermediate image settings and then the original image is discarded so as not to waste server storage space.  Is this possible does anyone know or, more importantly, does anyone know how to do it?

Mark

Joachim Müller

you like posting without reading anything before? Use some common sense and post feature requests in the appropriate board. Consider yourself warned!

GauGau

silurus

Hold on, I was just extending a discussion about disabling image pop ups.

Perhaps you need to look at the structure of the forums, twice you have got shitty with me by referring to forums/categories in the 1.2.x area, I don't have 1.2.x so why would i look there for my answers?

My questions have been about 1.1.x and that's where i've posted them!

I admire and thank you for taking on this great piece of software just think your attitude is a little off, sorry!

Mark

hyperion

To prevent the storage of the original image, edit include/picmgmt.inc on the line before:


return $result;


Insert the following:


if(max($imagesize[0],$imagesize[1]) > $CONFIG['picture_width'] && file_exists($normal)) {

        @unlink($image);

}


Resulting in:



if(max($imagesize[0],$imagesize[1]) > $CONFIG['picture_width'] && file_exists($normal)) {

        @unlink($image);

}

return $result;




Don't forget to disable the javascript popup for larger images, or you will have 404 errors.  

-Hyperion
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-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)

tuga

Hi, sorry my ignorance but where do I put that code?
Thanks!

Quote from: hyperion on October 04, 2003, 02:33:48 AM
As I recall, disabling the javascript function that opens the new window does the trick.  I also remember the old topic, but not to worry, GauGau expects to integrate the old board or have it as a reference in a matter of days. Can you wait that long?

For a start, try this:



if (isset($image_size['reduced'])) {
               $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
               $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
               $pic_html = "<img src=\"".$picture_url."\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
       } else {
               $pic_html = "<img src=\"".$picture_url."\" {$image_size['geom']} class=\"image\" border=\"0\" /><br />\n";
       }



tuga

nevermind... I've found all the answers i was looking for!

Thanks!!!

bobbyrabbit


Joachim Müller

this thread is for an outdated version of coppermine. It's only there for reference. Search the support board that deals with your version for a solution. Locking this thread now.