Generate two thumbnails

Hi everyone,

When user uploads the photo to the gallery, thumbnail is generated.

I want the gallery to generate two thumbnails of different sizes. (basically, one big thumb is for preview inside the blog, and one small one is for navigating through the gallery)

Any ideas how to do that without _heavily_ hacking zenphoto source? What files should I look at?

Thanks!

Comments

  • acrylian Administrator, Developer
    What do you use for a blog? If you use Wordpress take a look at the zenphotopress wordpress plugin.
    If you use the Zenpage plugin that comes with a TinyMCE plugin named tinyZenpage that does the same.
  • I use wordpress. And I use zenphotopress.
    Basically I want to show image of the custom size in the sidebar. Widget which comes with zenphotopress just shows the thumbnails - it is possible to specify the image size only for the popup inside the admin.
  • Update: I found function that does the trick - printRandomImages(1, null, 'all', '', custom_height, custom_width);

    However, the problem is I can't get how to include it in wordpress.

    Just requiring zp-core/template-functions.php doesn't work - zenphoto complains about database error
  • It can find the zp-config.php, but it complains that the DB password or DB user is wrong. I guess the reason is because wordpress works with the same database at the same time from the same process and those two interfere somehow
  • I found a thread about same problem, but it's quite empty - http://www.zenphoto.org/support/topic.php?id=3405&replies=3
  • acrylian Administrator, Developer
    Follow the link in the first post. That explains how to use Zenphoto functions outside of Zenphoto. There are also many other threads about this. Also there are other Wordpress plugins on our extensions page you might want to try.
  • 1) Thanks for the reply!
    2) I solved the problem using @readfile directive. Which is rather dirty, but it does it's job.
    3) It does explain it. However, it does not work. Database error (wrong user/password/host) is raised at some point (though it normally works). Like i've said, i'm not sure why, i suspect that mysql transaction management interferes with zenphoto's (just a random guess)

    Other threads do not work as well. Wordpress plugins do not do what i want them to do - display custom sized thumbnail in the sidebar (they display standard sized thumb).
Sign In or Register to comment.