Getting Zenphoto to generate a different sized thumbnail

Hi,
I noticed that regardless of what theme it is, zenphoto just seems to take a 100x100 thumbnail and resize it to what the theme thumbnail.

I actually want ZP to generate thumbnails in the cache folder that are more than 100x100, is there a way to do this?

Comments

  • acrylian Administrator, Developer
    Zenphoto does generate cached resized images on the file whenever an image function is called and the page visited the first time.

    Do you mean generate/pre-cache via the cacheManager then?
    If your theme for example uses custom image sizes within the theme files and does not use these standard options, the backend and thus the cacheManager will not know about them. It will just use the standard options instead. So your themeoptions.php file needs to register the required custom sizes in ThemeOptions constructor like this:
    `
    if (class_exists('cacheManager')) {
    $me = basename(dirname(__FILE__));
    cacheManager::addThemeCacheSize($me, NULL, 580, 580, NULL, NULL, NULL, NULL, NULL, false, NULL, true);
    }
    `
    Add further `cacheManager::addThemeCacheSize()` to cover all sizes you use in your theme. Parameters except the first follow the standard customsizedimage function parameters.

    The Zenpage theme also provides an example
  • I'm actually still using the zenpage theme on goodfreephotos, we just changed the files, I'm not sure where custom functions would be. The standard functions set the height and width to be 200, but the files in the cache are still 100x100.
  • Is there a variable that just controls what size it is. I'm using the Zenpage theme that I've modified. I'm not sure where the custom function would be if I'm not using the standard options. I changed the values in the standard options but the generated thumbnails are still 100 by 100, its just the they are being resized to 200 when being displayed, when I changed 200 to 300, the were being resized to 300 but the actual thumbnail being generated was still 100x100. I want zenphoto to generate 300x300 or 400x400 thumbnails when I upload the image in the admin panel.
  • acrylian Administrator, Developer
    The thumbs on your site are 100x100px but upscaled by HTML/CSS. That's why they look a bit blurry. So the theme must use fixed function calls to use these image size. These are on the related theme files naturally just like the default functions (the functions are named accordingly as well).

    The Zenpage theme has 95x95px thumbs hardcoded with custom sized image functions and also does not use the standard options therefore. Which is why they are actually disabled for that theme normally.
  • I've also been searching for a Printfullimage() function that takes some parameter like a title and prints a full image. I can't seem to find one.
  • acrylian Administrator, Developer
    There is no `printFullImage` function. But there is: http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetFullImageURL

    You actually should have seen that if you modified the Zenpage theme as it uses that on its image page as well. It only works in image context, within the next_image loop or on the image page. Unless you set a specific image object to use.

    There are also class methods. All available functions and class methods are listed here: http://www.zenphoto.org/documentation/elementindex.html
Sign In or Register to comment.