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: fullscreen pic zoomable with js  (Read 3708 times)

0 Members and 1 Guest are viewing this topic.

firsh

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
fullscreen pic zoomable with js
« on: August 24, 2007, 02:54:52 am »

hi

i found a simple js which can zoom into a pic and fit it horizontally or vertically
i want to add this to the fullscreen view of a picture

Code: [Select]
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
clicking on the resized image calls this function
clicking:
href="javascript:;" onclick="MM_openBrWindow('displayimage.php?pid=303&fullsize=1','17765145846ce1fedd2cd2','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=1285,height=1027')"

here is my zoomer's function:

Code: [Select]
function launchViewer(filename,x,y)
 {
  window.imagex=x;
  window.imagey=y;
  window.imagename=filename;
  viewer=window.open('z.html','VIEWER','scrollbars,status,resizable');
  viewer.opener=window;
  viewer.focus();
  return false;
 }

and in this rar are the source html files (renamed to php) of the viewer http://www.partysounds.hu/firsh/viewer.rar

i tried this:
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.imagename=theURL;
  viewer=window.open('z.php','VIEWER',features);
  viewer.opener=window;
  viewer.focus();
  return false;
}

but i think it can only accept an URL with an exentsion (jpg)

how can I make this thing working?
somehow put the zoomer under the function theme_display_fullsize_pic() in themes.inc.php ???

thanks
« Last Edit: August 25, 2007, 07:59:40 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: fullscreen pic zoomable with js
« Reply #1 on: August 24, 2007, 08:26:26 am »

Don't edit include/themes.inc.php. Edit themes/yourtheme/theme.php instead.
Call your custom function from within adjust_popup()
Logged

firsh

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: fullscreen pic zoomable with js
« Reply #2 on: August 24, 2007, 02:27:51 pm »

Don't edit include/themes.inc.php. Edit themes/yourtheme/theme.php instead.
Call your custom function from within adjust_popup()
im examining this now
but it's not just a function, it would affect the whole view

at the bottom of my theme.php there is a bit of html stuff, in the middle of which there is
Code: [Select]
              <?php     echo  '<a href="javascript: window.close()"><img src="'
                
htmlspecialchars($imagedata['path']) . '" '
                
$imagedata['geometry']
                . 
'alt="'
                
htmlspecialchars($imagedata['name'])
                . 
'" title="'
                
htmlspecialchars($imagedata['name'])
                . 
"\n" $lang_fullsize_popup['click_to_close']
                . 
'" /></a><br />' ."\n";
               
?>
this and the code around are the structure of the fullscreen view?
how can i get the url of the photo ending with jpg?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: fullscreen pic zoomable with js
« Reply #3 on: August 24, 2007, 04:46:39 pm »

Looking into this is beyond of what you can expect from regular support. The JavaScript bits in the archive are trivial - I have no idea what you want to see accomplished with it.

Joachim

P.S. Not everyone has got an app to extract rar files - it's not a bright idea to use that. Use zip instead in the future
Logged

firsh

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: fullscreen pic zoomable with js
« Reply #4 on: August 24, 2007, 08:26:28 pm »

Looking into this is beyond of what you can expect from regular support. The JavaScript bits in the archive are trivial - I have no idea what you want to see accomplished with it.

Joachim

P.S. Not everyone has got an app to extract rar files - it's not a bright idea to use that. Use zip instead in the future

ok thanks  ;)

i will rewrite the whole thing, now i know how to edit the fullscreen page
its a good starting point now i just have to get things together
i may post the link when im done to show what was this all about:)
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 20 queries.