coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: gem on October 04, 2005, 07:28:02 PM

Title: get rid of image popups?
Post by: gem on October 04, 2005, 07:28:02 PM
I want to get rid of the popups showing the full-size image that appear when you click on the 'intermediate' image. I've already made the intermediate images full-size so there's no point being able to click on them. If that's comprehensible, does anyone have any ideas? I've pored over template.html, theme.php and functions.inc.php over and over; i thought i'd better post here before i started tearing my hair out, heh.
Title: Re: get rid of image popups?
Post by: steverobbins on October 04, 2005, 07:33:20 PM
Hi Gem,

Please take a look at the documentation.

Go to your Config page (after logging in as an admin) and scroll down to 'Create Intermediate Pictures' and set that to No.  Then go to the admin tools and use the tool to resize / delete / update your pictures.

Regards
Steve
Title: Re: get rid of image popups?
Post by: gem on October 04, 2005, 08:09:02 PM
I'd already set 'create intermediate pictures' to no. I just had a go with Admin tools, and somehow (no idea how) I got rid of the links but the images were resized and too small, so I re-uploaded them. Now I can't get it to work at all. I've tried 'update thumbs and resized pictures' but that makes no difference, and I've tried 'delete original size photos' to which I get the reply 'the file ... can't be found'.

You may have guessed I'm not too familiar with this yet, and I don't have a firm grasp of PHP. My humblest apologies, and thankyou for your help. I might go kill somebody now.

Oh, and the gallery I'm working on is at <a href="http://shots.killsurfcity.org/gallery">http://http://shots.killsurfcity.org/gallery</a> if you're interested. :-)
Title: Re: get rid of image popups?
Post by: steverobbins on October 04, 2005, 08:29:43 PM
Hi Gem,

I had a look at your gallery and it seems to be functioning correctly.

So you want to get rid of the clickable picture when viewing the pictures.  This will require a small modification to displayimage.php where you will comment out the line that adds the javascript click.

In displayimage.php, approx line 198 or so, find this line:

$pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";

and replace it with:

$pic_html = "";

Other than that, upload your pictures at the size you would like them to be seen when clicking on the thumbnails.  This is what I have done to me website.
Regards
Steve.
Title: Re: get rid of image popups?
Post by: gem on October 04, 2005, 09:05:43 PM
ahhh. I thought there must be a line like that around somewhere, never realised there was individual php files though. you're a star, thanks dude :-D
Title: Re: get rid of image popups?
Post by: steverobbins on October 04, 2005, 09:22:30 PM
One last thing to complete the job....

edit lang/english.php, approx line 600 change 'Click to view full size image' to something more suitable, such as 'Copyrighted'

Regards
Steve.

Title: Re: get rid of image popups?
Post by: Joachim Müller on October 05, 2005, 06:27:26 AM
disabling the pop-up altogether is not a good idea, as it's used elsewhere. Instead, edit displayimage.php, find            $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";
and replace with            $pic_html = "<!--<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">-->";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "<!--</a>-->\n";
Title: Re: get rid of image popups?
Post by: steverobbins on October 05, 2005, 05:17:37 PM
Thanks for updating GauGau, just realised that I had left the < /a > in place as well.

Regards
Steve.