Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Location of javascript that does onclick="MM_openBrWindow('displayimage.php?pid=  (Read 10791 times)

0 Members and 1 Guest are viewing this topic.

JoshFed

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

I've modified this wonderful software to handle tiffs for the marketing department.  Thumbnails and intermediates are created as jpegs.  When you're browsing displayimpage.php and click on an intermediate it opens a new window with the full size jpeg, well it's not a jpeg, it's a tiff.  I want to change the onclick for tiffs to start a download instead of opening a new window. 

The problem is I can't find
Code: [Select]
onclick="MM_openBrWindow('displayimage.php?pid=... except in include/media.functions.inc.php where it is commented out. 

Does anyone know where that javascript code is located?
« Last Edit: September 07, 2007, 09:52:13 pm by Nibbler »
Logged

Nibbler

  • Guest

scripts.js
« Last Edit: September 06, 2007, 08:02:59 am by GauGau »
Logged

JoshFed

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

When viewing the page source for displayimage.php the following line responsible for the click and view the full size image feature.
Code: [Select]
<a href="javascript:;" onclick="MM_openBrWindow('displayimage.php?pid=878&amp;fullsize=1','52847172846e09d45a2c3c','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=2777,height=3003')"><img src="albums/userpics/10002/normal_2_210.jpg" class="image" border="0" alt="Click to view full size image" /><br /></a>

I need to modify the source code that generates the above line.  I've been starring at html_picture_menu() in displayimage.php, where the above should be and it's not there.  When I comment out the call to html_picture_menu() in the main code block, no intermediate image is displayed, as would be expected.

scripts.js has the MM_openBrWindow function but I need to find where it is called to generate the above line.  I've grep'd all over looking for it.
Logged

Nibbler

  • Guest

Oh, I understand now. It's in theme_html_picture() which is either in theme.php or in include/themes.inc.php. You probably didn't find it with grep because the quote is escaped,

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

Side note: if you want to change it, don't edit include/themes.inc.php, but themes/yourtheme/theme.php. If the function doesn't exist in your custom theme, copy it from themes/sample/theme.php. Definitions in your theme override the default given in include/themes.inc.php. For details, read http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#theme_sample
Logged

JoshFed

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Excellent!  That's what I was looking for.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.