fullscreen pic zoomable with js fullscreen pic zoomable with js
 

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

Main Menu

fullscreen pic zoomable with js

Started by firsh, August 24, 2007, 02:54:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

firsh

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

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:

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

Joachim Müller

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

firsh

Quote from: GauGau 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()
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
              <?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?

Joachim Müller

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

firsh

Quote from: GauGau 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

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:)