flash frames and zoom
|
tigra
Joined: 2004-07-14
Posts: 4 |
Posted: Wed, 2004-07-14 09:29
|
|
Hi |
|
|
tigra
Joined: 2004-07-14
Posts: 4 |
Posted: Wed, 2004-07-14 09:29
|
|
Hi |
|
Posts: 25956
Zoom:
Download and test and verify operation of http://www.zoomify.com/ez/ Make sure are a comfortable how this works and how the images get displayed and how the directory/images are stored.
If you can't get that to work; do not proceed.
Once you have it working independently of Gallery then here is the steps I took:
open util.php and find
$opts=array( 'none' => _("None"), 'dots' => _("Dots"),below that add:
'zoom' => _("Zoom"),This will give you the option in the album properties to change the "frame" around the image to allow the zoom to function.
now in the html_wrap/inline_imagewrap.inc
find
case "dots": ?> <table style="border-width:1px; border-style:dashed; border-color:<?php echo $borderColor ?>"> <tr> <td> <?php echo $href_tag ?> </td> </tr> </table>and add:
<?php break; case "zoom": global $gallery; $photo = $gallery->album->getPhoto($GLOBALS["index"]); $name = $photo->image->name; ?> <TABLE BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=#000000 WIDTH="500" ALIGN="CENTER"> <TR> <TD> <TABLE BORDER=0 WIDTH=100% BGCOLOR=#ffffff CELLSPACING=0 CELLPADDING=0> <TR> <TD align="center"> <script language="JavaScript" type="text/javascript" SRC="<?php echo makeGalleryUrl("js/flash.js") ?>"></script> <script language="JavaScript" type="text/javascript"> <!-- if (flash.ver[6]) { // if Flash 6.0 or newer is installed, do Flash 6.0 stuff. document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="600" HEIGHT="450" ID="theMovie">\n'); document.write('<PARAM NAME="FlashVars" VALUE="zoomifyImagePath=../swf/<?php echo $name ?>/">\n'); document.write('<param name=Menu VALUE="FALSE">\n'); document.write('<PARAM NAME="src" VALUE="<?php echo makeGalleryUrl("swf/zoomifyViewer.swf") ?>">\n'); document.write('<EMBED FlashVars="zoomifyImagePath=../swf/<?php echo $name ?>" SRC="../swf/zoomifyViewer.swf" MENU="false" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" WIDTH="750" HEIGHT="450" NAME="theMovie"></EMBED>\n'); document.write('</OBJECT>\n'); } else if (flash.installed) { // do older Flash stuff document.write('<?php echo $href_tag ?> \n'); document.write('Upgrade your flash to get the zoom experience: <br>'); document.write('<a href="http://www.macromedia.com/go/getflashplayer/">'); document.write('<img border="0" src="<?php echo getImagePath('flash.gif') ?>" alt="get flash!" height="31" width="88"></a>'); } else { document.write('<?php echo $href_tag ?><br> \n'); document.write('Flash is NOT installed. You need flash to get the full zoom experience:<br> \n'); document.write('<a href="http://www.macromedia.com/go/getflashplayer/">'); document.write('<img border="0" src="<?php echo getImagePath('flash.gif') ?>" alt="get flash!" height="31" width="88"></a>'); } //--> </script> <NOSCRIPT><?php echo $href_tag ?><br></b><a href="http://www.macromedia.com/go/getflashplayer/"> <img border="0" src="<?php echo getImagePath('flash.gif') ?>" alt="get flash!" height="31" width="88"></a></NOSCRIPT> </TD> </TR> </TABLE> </TD> <TD></TD> </TR> </TABLE>This adds the zoomify flash content to "wrap" the image. It also shows an image if the user does not have flash installed or not at the correct version.
Get flash.gif from http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif and place it in your gallery/images directory.
Get flash.js from http://www.skyzyx.com/scripts/flash.php and place in your gallery/js directory.
Create a directory called swf in the gallery directory.
In this directory you will add the zoomifyViewer.swf as well the images folder(s) for your 'zommifyed' images.
Zoomifyer EZ v3.0.exe will generate a folder of the same name as your file and create smaller images of the original. Take that folder/directory and place it in the swf directory.
You are almost there! :wink:
Make a medium sized image (for gallery to make a thumb and for default view (non flash) of the original highres image. Add this lower resolution image to gallery.
Now in the album properties you will be able to select zoom for the image. Do not select zoom for the thumb.
Note: the name of the image you use must be the same name as the folder you are using as well as the low resolution gallery image must be the same name. If you run into problems this is mostlikly the place to start looking.
So when the zoom frame is used: the flash.js will detect the version. If true it will add the zoomifyViewer.swf and the subsiquent images from the swf directory. If no flash then the regular image is displayed.
I think that is all I did.
Dave
Posts: 4
Thanks. I''l try make this under Windows.
but they haven't Linux or FreeBSD versions
Posts: 2
I have this more or less working except one thing. When I click on my image, I get the zomify flash thing to load, but it doesn't have my image in there. It just has the blue zoomify logo. All my images are the same name and I have the 'zoomified' folder inside the swf folder. Why isn't it loading?
Posts: 25956
starks,
All I can say is have to followed my first step:
View the source of the page you are trying to get it to work and make sure the paths to the images and directories are correct.
For some unknown reason (I could never figure out) was I had to "rebuild" the image folder on a few images that I copied from one directory to another. Perhaps that might help.
Have you made a html file outside of gallery to test? Make a html file with the flash <object> & <EMBED> tags (that zoomify provides) and see if you can get it to work outside gallery first.
A link to your test file would be helpful.
Dave
Posts: 606
How big should an image be? My image is about 1536x1024 and it doesn't seem to zoom as yours do...
Posts: 606
Also, how about sharing the how-to on the embedded albums hack... that looks awesome!
Posts: 25956
Well some of mine are much bigger than that. (4645x5833) but I don't think it should matter. Zoomify only "slices" the image up and stores the images in the image folder.
Embeded movies?, the sub album dropdown? I don't know what you mean.
Dave
Posts: 606
the subalbum pictures listed in the description of the parent album on the main albums page...
Thanks for all too!
Posts: 25956
Well jnash if I tell you I will have to shoot you. :D
It is sort of my signature and don't realy want to give it away. It took hours and hours to make work. I will tell you that it is a combo of:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=61154&sid=e8470335a24e0e83df536ffb031f2427#61154
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=11880&sid=e8470335a24e0e83df536ffb031f2427#11880
http://sourceforge.net/tracker/index.php?func=detail&aid=701041&group_id=7130&atid=307130
then for the mouse over; I used some css for the new class I added:
.childthumbs:hover img
{
border:3px outset #C0C0C0;
-moz-opacity: 1.0;
filter: alpha(opacity = 100);
vertical-align:top
}
So I have a option in the album properies to show hide or place the small thumb in the discription. Then Use the "Edit thumb" to crop the highlight the way I like.
Dave
Posts: 606
I can appreciate that! I'll take a look at the threads you provided... I started to attempt this a while back, but got tired due to the constant upgrades for a bit.
Thanks again!
James
Posts: 606
Thanks for your tips! I've managed to hack a bit together to get similar results. Now I just have to figure out the 'square' thumbnail hack for it... Unfortunately, the hacked code is ugly as sin...
Thanks again.
James :D
Posts: 25956
jnash,
Square thumbs or any other shape is not a hack but a part of Gallery.
Go the the highlight of the album and under the thumb there is a dropdown.
select "edit thumbnail" a new window will popup and you will be able to crop the highlight the way you like. Sometimes square is not right but there is many options to choose.
Dave
Posts: 606
I saw that, was just seeing if there were alternatives to doing it manually, and yet, not messing with the orig thumbnail, just the highlight... much to much I think...
Posts: 2
I managed to get the zoom working right. It's pretty amazing. I did a test image that was 8800px x 17000px and it was just as fast as their 30mb sample image. This is going to be great for my work. Here's my link if anyone wants to see it in action. (Look at sdr and brt)
http://www.ktua.com/gallery/view_album.php?set_albumName=Test-Gallery
Posts: 25956
starks,
Glad I could help. Looks good.
Dave
Posts: 1
Here is one nice pure-javascript image-preview tool - LuckyZoom - http://luckyteam.co.uk/products/LuckyZoom/