forum.coppermine-gallery.net

Support => Older/other versions => cpg1.1.X Support (standalone) => Topic started by: KapHn8d on October 03, 2003, 04:16:13 am

Title: full size image disabling
Post by: KapHn8d 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
Title: full size image disabling
Post by: Joachim Müller 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
Title: thanks for the response, but not my question...
Post by: KapHn8d 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
Title: is it here somewhere?
Post by: KapHn8d 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.
Title: full size image disabling
Post by: 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:

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

Title: thanks!
Post by: KapHn8d 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
Title: Image disabling and removal from the database
Post by: silurus 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
Title: full size image disabling
Post by: Joachim Müller 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
Title: Excuse me!!!
Post by: silurus 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
Title: full size image disabling
Post by: hyperion 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
Title: Re: full size image disabling
Post by: tuga 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";
        }

Title: Re: full size image disabling
Post by: tuga on September 18, 2005, 06:00:27 pm
nevermind... I've found all the answers i was looking for!

Thanks!!!
Title: Re: full size image disabling
Post by: bobbyrabbit on October 17, 2005, 06:31:11 pm
Where does that code go then?
Title: Re: full size image disabling
Post by: Joachim Müller 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.