Author Topic: [ADD-ON] Image Zoomer  (Read 67290 times)

0 Members and 1 Guest are viewing this topic.

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #15 on: May 16, 2006, 08:28:46 PM »
Ok so here's what we've done so far..

made a new jpg.html file for /templates/<your_template>/media
Code: [Select]
<!-- Template file for JPG Files -->
<head>
<script type="text/javascript" src="http://valid.tjp.hu/zoom2/tjpzoom.js"></script>
</head>
<div style="float:left" onmouseover="zoom_on(event,{width},{height},'{media_src}','{media_src_2}');" onmousemove="zoom_move(event);" onmouseout="zoom_off();"><img src="{media_src}" alt="tjpzoom picture title" style="padding:0;margin:0;border:0" /></div>
<div style="clear:both;"></div>

opened includes/functions.php

replaced
Code: [Select]
   $site_template->register_vars(array(
     "media_src" => $media_src,

with
Code: [Select]
$media_src_2 = $site_sess->url(ROOT_PATH."images/download/".$media_file_name."".jpg);

$site_template->register_vars(array(
     "media_src" => $media_src,
     "media_src_2" => $media_src_2,

right now its working up to a point. check the example here. Both IE and FF show the same.
http://www.cydonian.com/photos/img1205.htm

but other images seem to have a more difficult time. Looks different in FF. Looks like the above when in IE
http://www.cydonian.com/photos/img780.htm

Looks like its loading the high resolution version but its stuck. the zoom window is there but the hourglass and loading text at the top left stay with no zoom image showing in the window. Could something be interfering? maybe the fact that the image is clickable (mod) when mouseover?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Image Zoomer
« Reply #16 on: May 16, 2006, 08:45:35 PM »
... $media_file_name is the name incl. extension ...
... so try this ... in functions.php
Code: [Select]
$media_src_2 = $site_sess->url(ROOT_PATH."images/download/".$media_file_name);
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #17 on: May 16, 2006, 08:53:22 PM »
hmm, no change.

Looks like its trying to load it, It just cant find it maybe?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Image Zoomer
« Reply #18 on: May 16, 2006, 09:00:41 PM »
... test for {media_src_2} ...
insert in your jpg.html at the bottom ...
Code: [Select]
{media_src_2}
... an see on your details-page ... is the url for your high resolution image correct ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #19 on: May 16, 2006, 09:07:04 PM »
so place the {media_src_2} like this in the jpg.html?

Code: [Select]
<!-- Template file for JPG Files -->
<head>
<script type="text/javascript" src="http://valid.tjp.hu/zoom2/tjpzoom.js"></script>
</head>
<div style="float:left" onmouseover="zoom_on(event,{width},{height},'{media_src}','{media_src_2}');" onmousemove="zoom_move(event);" onmouseout="zoom_off();"><img src="{media_src}" alt="tjpzoom picture title" style="padding:0;margin:0;border:0" /></div>
<div style="clear:both;"></div>
{media_src_2}

and yes all high resolution images are stored in that directory. The following link..
http://www.cydonian.com/photos/img1205.htm

High resolution here.
http://cydonian.com/gallery/images/download/CRW_7929-1_edited-2.jpg

adding the {media_src_2} at the bottom of the jpg.html file just revealed the download location in text under the image itself. Had no change to the functionality of the script.
« Last Edit: May 16, 2006, 09:22:38 PM by sigma. »

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Image Zoomer
« Reply #20 on: May 16, 2006, 09:32:53 PM »
... I see ... the high res. images are not in /photos/... - folder (4images-url) ... they are in the /gallery/... - folder ...
... so we need this in functions.php ...
Code: [Select]
$media_src_2 = "http://cydonian.com/gallery/images/download/".$media_file_name;

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #21 on: May 16, 2006, 09:53:35 PM »
YES! that makes it work. but there is one little problem..

because i have this installed http://www.4homepages.de/forum/index.php?topic=7120.0

there seems to be a problem with images that are clickable. The example we have been using is at the end of the category so it is not a link.

here it is working perfectly
http://www.cydonian.com/photos/img1205.htm

here it is broken
http://www.cydonian.com/photos/img1206.htm

And just to make sure I checked to see if it was a horizontal to vertical image problem. it is not. It has to be caused by the image being a link.

Any ideas?

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #22 on: May 16, 2006, 11:26:57 PM »
This link issue is probably a issues related to the javascript. I will contact the author and find out if it can be fixed.
If anyone has an idea please post a reply. You can download the script here: http://valid.tjp.hu/zoom2/tjpzoom.js

http://valid.tjp.hu/zoom2/index_en.html

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Image Zoomer
« Reply #23 on: May 16, 2006, 11:32:25 PM »
... yes, the zoom-tool with high res. images looks nice ...  :wink:
... but are you sure, that the high res. image for img1206.htm exist in the .../gallery/images/download/... folder ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #24 on: May 16, 2006, 11:37:35 PM »
absolutely.

the only difference with the two photos is one is clickable and one is not.

For Those just joining us.
Visit http://www.cydonian.com/photos/img1205.htm

Move mouse over image and use your ARROW keys to adjust the zoom window.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Image Zoomer
« Reply #25 on: May 16, 2006, 11:53:19 PM »
... perfectly ...  :D ... also the ARROW keys function ...
... now im1206.htm works also ? ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #26 on: May 17, 2006, 12:04:58 AM »
no, like I said, 1206 does not work because i once added the following tweak.
http://www.4homepages.de/forum/index.php?topic=7120.0

Images within a category have links to other images within that category. 1205 is at the end of the category ladder so there is no link attached to the image, therefor the zoom script works fine. 1206 is not at the bottom of the category, it is at the top so it has a link to the next image attached to it. This is why the zoom script does not work for 1206.

Have to figure how to allow links on images for the zoom script. might also have to do with the css attached to links. I think there is a mouseover function for the css and it might be clashing with the mouseover on the zoom script.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Image Zoomer
« Reply #27 on: May 17, 2006, 12:06:58 AM »
... for no storing of the high res. images via xp-imagetoolbar you should use the following ...
... insert in header.html ...
Code: [Select]
<meta http-equiv="imagetoolbar" content="no" />

... zoom-tool in im1206.htm works also for me ... !
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #28 on: May 17, 2006, 12:12:46 AM »
aaahh interesting. seems to work in IE but not FF

strange

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: Image Zoomer
« Reply #29 on: May 17, 2006, 12:18:13 AM »
... for no storing of the high res. images via xp-imagetoolbar you should use the following ...
... insert in header.html ...
Code: [Select]
<meta http-equiv="imagetoolbar" content="no" />

What does this do exactly?