Mod: Cool JSFX-Element Fading for Thumbnails
E-Razor
Joined: 2005-01-07
Posts: 18 |
Posted: Tue, 2005-02-08 15:02 | |||
Yeah, element-fading for your thumbs, see http://www.jsfx.com for examples. 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 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. @modules/imageframe/templates/ImageFrame.tpl:40 class="$class" id="IFid`$IF_count`"}{/if}{if Could be great if the developers would add that class to the cvs too! I think thats all... I wish you much fun with that new toy ;-)
|
||||
Posts: 808
Is there a way to apply this patch using windows?
Posts: 8601
it's not that long.. you could apply it by hand..
Posts: 18
i've added a highlighted version... i think thats a bit better for manual patching...
Posts: 32
I'd like to try adding this mod to my G2, but I don't know how to edit the tpl files manually. I try to open up the tpl files with notepad, but all I get is a bunch of mushed up code. What files should I edit and how should I do it in order to get the images to fade? Any tips or suggestions would be appreciated. Thanks.
-Andrew
Posts: 8601
try wordpad to edit tpl
Posts: 32
I attempted to edit everything manually but there were some problems.
I was unable to make these changes in albumBody.tpl:
95c97,98
< ImageFrame_pre=$smarty.capture.link ImageFrame_post="</a>"}
---
> class="elemFader"
> ImageFrame_pre=$smarty.capture.link ImageFrame_post="</a>""}
102a106
> </div>
What should I do? I can't find the first ImageFrame_pre line in the file anywhere and for the other one (</div>), I have no idea what I'm suppose to change or cut out. Any ideas?
There is also the problem with the ImageFrame file:
@modules/imageframe/templates/ImageFrame.tpl:40
class="$class" id="IFid`$IF_count`"}{/if}{if
Where am I supposed to put this? It does not appear to fit in line 40...
Please reply with any suggestions. Thanks.
Posts: 8601
that part of the diff is obsolete.. just a guess, but look for giThumbnail and add elemFader after it.. so you get:
class="%CLASS% giThumbnail elemFader"
in one place, and:
class="giThumbnail elemFader"
in another.
Posts: 32
Hey mindless,
Thanks for the tips, but it still doesn't seem to work...grrr.
Well, maybe it is just too outdated to implement into the current G2 version. Were you or anyone else able to get it to work before? Maybe it will be added as a module in a future version... :wink:
Posts: 164
Sorry to sound stupid but I understood up to the part where he says "apply the patch patch -p1 < matrix2jsfxmatrix.patch".
How do you actually apply it? Copy the code into a template somewhere? Use something like PPF-O-Matic, what? :oops:
Posts: 8601
the patch is old so it won't apply to the current codebase.. you may be able to figure out how to apply the changes manually by looking at the diffs posted above.
Posts: 100
Apply the patch... that changes *matrix to jsfxmatrix and adds some <script>-tags to our html-templates:
Code:
patch -p1 < matrix2jsfxmatrix.patch
i'm stuck there. if I had shell axx to my server, I'm pretty sure I would figure it out. But all I have is web tools: cpanel/phpmyadmin/filebrowser is what I'm working with. Can you please post patched version or a pre-made matrixjsfx folder with patched files that we could just appload? I'm sure lots of people would greatly appreciate that. Thanks for your time.
Posts: 1
I created a working patch (as for v2.0-beta-4), have fun with it.
Posts: 26
Where can I find this new version that works with new theme system?
Posts: 16504
If you follow his directions in the first post and just use the last attachment "matrix2jsfxmatrix.patch.txt" then everything should work fine. I'm assuming you have shell access or access to a Linux type box that has patch. If not you should be able to apply the changes by hand, it's really only a couple of line in album.tpl, theme.tpl and theme.inc.
Posts: 198
Should I follow this patch http://gallery.menalto.com/files/matrix2jsfxmatrix.patch_804.txt manually to add the fade functionality to the Classic theme?
Posts: 16504
You should be able to. If I was applying those changes to a theme other than Matrix, I'd just look very closely at each line in the theme to find a corresponding line that was changed in the patch.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 198
I am manually trying to add this patch http://gallery.menalto.com/files/matrix2jsfxmatrix.patch.txt to my classic theme and am wondering where this section goes:
"> <script LANGUAGE="JavaScript">
> JSFX.fadeElemAuto();
> </script>
65c67
< {include file="gallery:layouts/matrix/templates/itemNavigator.tpl"}
---
> {include file="gallery:layouts/jsfxmatrix/templates/itemNavigator.tpl"}
70c72
< <table id="gbThumbMatrix">
---
> <table id="gbThumbjsfxMatrix">
95c97,98
< ImageFrame_pre=$smarty.capture.link ImageFrame_post="</a>"}
---
> class="elemFader"
> ImageFrame_pre=$smarty.capture.link ImageFrame_post="</a>""}
102a106
> </div>
195c199
< {include file="gallery:layouts/matrix/templates/itemNavigator.tpl"}
---
> {include file="gallery:layouts/jsfxmatrix/templates/itemNavigator.tpl"}
diff -r layouts/matrix/templates/head.tpl layouts/jsfxmatrix/templates/head.tpl
10a11,17
> <script LANGUAGE="JavaScript" SRC="{$layout.layoutUrl}/JSFX_ElemFader.js" TYPE="text/javascript"></SCRIPT>
> <script LANGUAGE="JavaScript">
> JSFX.FadeElemMinOpacity = 70;
> JSFX.FadeElemAutoUp = 5;
> JSFX.FadeElemAutoDown = 10;
> </script>
>
diff -r layouts/matrix/templates/singleBody.tpl layouts/jsfxmatrix/templates/singleBody.tpl
11c11
< {include file="gallery:layouts/matrix/templates/pathbar.tpl"}
---
> {include file="gallery:layouts/jsfxmatrix/templates/pathbar.tpl"}
96c96
< {include file="gallery:layouts/matrix/templates/itemNavigator.tpl"}
---
> {include file="gallery:layouts/jsfxmatrix/templates/itemNavigator.tpl"}
130c130
< {include file="gallery:layouts/matrix/templates/itemNavigator.tpl"}
---
> {include file="gallery:layouts/jsfxmatrix/templates/itemNavigator.tpl"}
"
Thanks,
Jeff
Posts: 16504
Sorry, I guess I didn't answer your previous question clearly. Yes you want to use http://gallery.menalto.com/files/matrix2jsfxmatrix.patch_804.txt The one you're trying to use is for the old layout/theme system
The patch jortgies created, http://gallery.menalto.com/files/matrix2jsfxmatrix.patch_804.txt works with the current theme system.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 28
Does this patch still work on code 2.1. I cant seem to get it to patch. I keep getting the following errors
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Only in jsfxmatrix/: JSFX_ElemFader.js
|diff -rB matrix/templates/album.tpl jsfxmatrix/templates/album.tpl
--------------------------
Can anyone give me some pointers
Thanks
Posts: 8601
you need to apply the patch manually, none of the line numbers will match up anymore.