JSFX - Rollovers

Forum thread: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=26040

In short: it integrates the roll-over effect from http://www.jsfx.com in gallery2.

Installation

  • Go to your gallery2-dir:
$> cd gallery 
  • Copy the matrix-folder to jsfxmatrix:
$> cp layouts/matrix/ layouts/jsfxmatrix/
  • Now enter the jsfx-dir:
$> cd  layouts/jsfxmatrix/
  • Apply the matrix2jsfxmatrix.patch that changes *matrix to jsfxmatrix and adds some <script>-tags to our html-templates:
$> patch -p1 < matrix2jsfxmatrix.patch 
  • btw, you can change the values for fading if you want, and well, maybe there is someone whos smart enough to add these values somewhere in the gallery as a setting.

@layouts/jsfxmatrix/templates/head.tpl

 <script LANGUAGE="JavaScript"> 
     JSFX.FadeElemMinOpacity = 70; 
     JSFX.FadeElemAutoUp      = 5; 
     JSFX.FadeElemAutoDown   = 10; 
 </script>
  • Download the jsfx-script:
$> wget http://www.jsfx.com/development/elemfader/javascript/JSFX_ElemFader.js
  • Ok, we've to tell the jsfx-script what elements to use, thats happening by using class=“elemFader”, fortunately our thumbnails don't have a class yet, i've used the parameter in layouts/jsfxmatrix/templates/albumBody.tpl:97, but we've to use it too.
    So it's necessary to add something to the imageframe-module:

@modules/imageframe/templates/ImageFrame.tpl:40

 class="$class" id="IFid`$IF_count`"}{/if}{if
 
wiki/projects/php/gallery2/jsfx.txt · Last modified: 2005/05/23 12:27 by e-razor
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki