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: Opening Full Size Images w/out Popup  (Read 847 times)

0 Members and 1 Guest are viewing this topic.

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Opening Full Size Images w/out Popup
« on: February 06, 2021, 07:55:40 pm »

Hello,

I was wondering if anyone knows how we can modify cpg1.6 so that when you click on a thumbnail, it takes you to the full sized image in the same window (ie, not opening it as a pop up). We don't need it to open in the them, it can just take people directly to the image's url so they just see the image. Thanks!
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1676
Re: Opening Full Size Images w/out Popup
« Reply #1 on: February 06, 2021, 09:25:44 pm »

I don't recall too much about these plugins that I was working on, but you can try it (iZoom).
https://forum.coppermine-gallery.net/index.php/topic,79879.msg387313.html#msg387313
Logged

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Opening Full Size Images w/out Popup
« Reply #2 on: February 07, 2021, 03:09:48 am »

Thanks, that doesn't seem to do what I need.

I've been playing around more today and now I realise I can be more specific. W while back we had a volunteer who knows PHP modify Coppermine so that when you click on the thumbnail, it takes you directly to the image. You can see this in action here if you click any thumbnail: http://tng.trekcore.com/gallery/thumbnails.php?album=2  This contrasts with a newly upgraded CPG 1.6 where if you click on a thumbnail it opens a pop up using displayimage.php: http://snw.trekcore.com/gallery/thumbnails.php?album=7

What we need is to bypass the displayimage.php entirely, which saves us a ton of CPU resources.  However, with upgrading to CPG 1.6, the modifications the volunteer made no longer work. Ie, we have two modified files that we would upload that would bypass displayimage.php and allow the thumbnails to directly link to the images:
1. functions.inc.php (https://drive.google.com/file/d/0B-88YH4hGOimSVlWVnBCYzhTSGc/view?usp=sharing)
2. themes.inc.php (https://drive.google.com/file/d/0B-88YH4hGOimVDdHQjFVRy1od1k/view?usp=sharing)

However, uploading those now to an upgraded CPG 1.6 breaks the gallery and we get an error. We're having difficulty so far getting in touch with that volunteer again (as it was 10+ years ago) and so hoping someone here might be able to help us figure out how to bypass display.php again.

Thanks!
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1676
Re: Opening Full Size Images w/out Popup
« Reply #3 on: February 07, 2021, 03:17:40 pm »

I modified the iZoom plugin to perhaps provide something closer to what you're looking for.
Logged

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Opening Full Size Images w/out Popup
« Reply #4 on: February 07, 2021, 03:32:30 pm »

Thanks ron4mac, I see the link to the thumbnail just says javascript when the plugin is enabled. Can you confirm this then bypasses displayimage.php?
Logged

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Opening Full Size Images w/out Popup
« Reply #5 on: February 07, 2021, 03:43:50 pm »

Sorry, I just realized that with this plugin users are not able to save the full size image or open the links in new tabs if they wish. That won't really work for our users.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1676
Re: Opening Full Size Images w/out Popup
« Reply #6 on: February 07, 2021, 05:42:39 pm »

I'm pretty sure, with some work, the plugin could be made to allow right clicks to download or open the image.

The behavior you are looking for could (and should) be implemented in your theme. It is never a good idea to modify core files in the CPG package.
Logged

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Opening Full Size Images w/out Popup
« Reply #7 on: February 07, 2021, 09:09:50 pm »

Yeah I totally agree.  Would you have a ballpark estimate in the number of hours of coding it would take to make those changes? I'm not a programmer but I can put a call out to our site's supporters to see if anyone would be up for helping do that.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1676
Re: Opening Full Size Images w/out Popup
« Reply #8 on: February 08, 2021, 06:49:39 pm »

I would work on your theme but I would much prefer to provide the behavior via a plugin so everyone would be able to use it.

Here is a revamped version of the little iZoom plugin. Images can be right-clicked for contextual actions. Let me know if that meets your requirements.
« Last Edit: February 08, 2021, 08:09:22 pm by ron4mac »
Logged

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Opening Full Size Images w/out Popup
« Reply #9 on: February 10, 2021, 01:28:18 am »

Thanks ron4mac, that's really kind of you to update that. It definitely solves the issue of saving the image, but it still does not allow people to open the images in a new tab if they prefer. Our users often want to open multiple images at once in multiple tabs. Is that possible or does the javascript make that impossible?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1676
Re: Opening Full Size Images w/out Popup
« Reply #10 on: February 10, 2021, 01:45:49 am »

... but it still does not allow people to open the images in a new tab if they prefer.
In all my browsers (Safari,Chrome,Firefox), right-clicking on the zoomed image lets me save the image or open it in a new tab.
Logged

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Opening Full Size Images w/out Popup
« Reply #11 on: February 10, 2021, 02:20:48 am »

Apologies for not being clearer. What I mean is users like to be able to right click on the thumbnail itself (not the full sized image) and select "Open Link in a New tab". That way they can open multiple full sized images in multiple tabs easily. Right now doing this will lead to a new tab being opened that says about:blank#blocked I've got your plugin running here if you want to try it: http://prodigy.trekcore.com/gallery/thumbnails.php?album=1
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1676
Re: Opening Full Size Images w/out Popup
« Reply #12 on: February 10, 2021, 04:06:58 am »

Right now doing this will lead to a new tab being opened that says about:blank#blocked
Must be a browser thing ... works fine for me with all my browsers.

I'll modify it for you to just open the full image in another window ... like the other site.
Logged

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Opening Full Size Images w/out Popup
« Reply #13 on: February 10, 2021, 04:52:18 am »

Hmm, that's odd. Here's a vid I just took showing what happens when I right click on a thumbnail to open in a new window. It happens in Edge and Chrome on my windows comp and in Chrome on my Android. I asked a friend and they said it happens to them as well.

https://drive.google.com/file/d/1d3oBfGFOQN5f1uKxeouCznq5jDFKPB2Z/view?usp=sharing
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1676
Re: Opening Full Size Images w/out Popup
« Reply #14 on: February 10, 2021, 02:53:11 pm »

You're not right-clicking on the zoomed image ... you're right clicking on the thumbnail.

At any rate ... here is a plugin to give you the behavior of your other site.
Logged

trekcore

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Opening Full Size Images w/out Popup
« Reply #15 on: February 10, 2021, 04:21:55 pm »

Wow thanks ron4mac, you're amazing! There are lots of Star Trek fans that will appreciate your work!
Logged
Pages: [1]   Go Up
 

Page created in 0.08 seconds with 20 queries.