zenphoto forums » Feature Requests

Sliding photo sizes up onclick

(3 posts)
  • Started 8 years ago by Heilemann
  • Latest reply from trisweb
  1. Heilemann

    Apprentice
    Joined: Feb '06
    Posts: 3

    Just thought this might be of interest: http://www.hotwired.com/webmonkey/06/08/index2a.html

    Posted 8 years ago #
  2. Chilifrei64

    Contributor
    Joined: Dec '05
    Posts: 541

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

    http://beta.chilifrei.net/zenlive

    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.

    Posted 8 years ago #
  3. Zenphoto development team
    trisweb

    Project Manager
    Joined: Sep '05
    Posts: 1,844

    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.

    Posted 8 years ago #

RSS feed for this topic

Reply

You must log in to post.