Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: full size image disabling  (Read 22157 times)

0 Members and 1 Guest are viewing this topic.

KapHn8d

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
full size image disabling
« on: October 03, 2003, 04:16:13 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
full size image disabling
« Reply #1 on: October 03, 2003, 09:30:50 am »

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://forum.coppermine-gallery.net/index.php?topic=177

GauGau
Logged

KapHn8d

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
thanks for the response, but not my question...
« Reply #2 on: October 03, 2003, 02:31:16 pm »

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
Logged

KapHn8d

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
is it here somewhere?
« Reply #3 on: October 03, 2003, 11:33:40 pm »

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

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
full size image disabling
« Reply #4 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:

Code: [Select]


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";
        }

Logged
&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

(http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png)

KapHn8d

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
thanks!
« Reply #5 on: October 04, 2003, 06:47:22 am »

Thanks!!

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

 :D -Clayton
Logged

silurus

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Image disabling and removal from the database
« Reply #6 on: October 04, 2003, 12:46:53 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
full size image disabling
« Reply #7 on: October 04, 2003, 03:33:58 pm »

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

GauGau
Logged

silurus

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Excuse me!!!
« Reply #8 on: October 04, 2003, 03:46:51 pm »

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
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
full size image disabling
« Reply #9 on: October 06, 2003, 05:07:42 am »

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

Code: [Select]

return $result;


Insert the following:

Code: [Select]

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

        @unlink($image);

}


Resulting in:

Code: [Select]


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
Logged
&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

(http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png)

tuga

  • Translator
  • Coppermine newbie
  • **
  • Offline Offline
  • Posts: 8
Re: full size image disabling
« Reply #10 on: September 18, 2005, 04:53:51 pm »

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

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:

Code: [Select]


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";
        }

Logged

tuga

  • Translator
  • Coppermine newbie
  • **
  • Offline Offline
  • Posts: 8
Re: full size image disabling
« Reply #11 on: September 18, 2005, 06:00:27 pm »

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

Thanks!!!
Logged

bobbyrabbit

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: full size image disabling
« Reply #12 on: October 17, 2005, 06:31:11 pm »

Where does that code go then?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: full size image disabling
« Reply #13 on: October 17, 2005, 09:37:30 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 18 queries.