Sliding photo sizes up onclick


  • Kinda neat.. most of this premade js stuff is really very easy to integrate into zenphoto. So just incase anybody is interested:

    The only thing with this is there is no way to make this use the cache engine in zenphoto because of how the js is coded. Unless you hack the core files of zen, atleast that is my take on it because if you use the printImageThumb() then you can not put this in the <img> tags which the js needs to get its properties. Right now the demo I have uses the full image but scales it down using height/width in the <img> tags. so it not only makes it slower but doesnt use the cache engine.
    I did come up with a way to use the cache image but if the cache wasnt already created, then it wont get created. I take it that the printImageThumb() creates the cache and prints the thumbnail.
    If anybody knows how to create the cache in the background then we could actually implement this as an actual theme, or if someone hacks the js file.

    Oh well, i just thought I would try it out.
  • trisweb Administrator
    Using the cache is very possible. It's all in the URLs. When you resize the image to a certain size in the javascript, just change its src to /albumname/image/480/image.jpg instead of /albumname/image/thumb/image.jpg. The new image will load (and the new size will be created and cached if it hasn't already been).

    You may have to bypass the template tags to do this and do some direct calls to the objects, which is cool. Eventually some convenient things might be added as functions to make scripting easier.
Sign In or Register to comment.