ZenPhoto plugin for WordPress not fully functioning

Since the beginning of using ZP together with WordPress I use a very small plugin which served me very well untill the latest upgrade of ZP. It is still functioning, but it is not creating the appropriate thumbs anymore. You can see what I mean at the right of this page:
http://www.jacktummers.nl/blog

And now I hope someone can tell me what I have to change in this code to make it work again. I visited the website of the author of this plugin, but I can't get in touch with him (no contact information).

`function zenphotos($max=12) {

global $wpdb;

/**************************

* CONFIG *

**************************/

$zen_location = "http://www.jacktummers.nl/collectie/"; /* Set this to the exact location of your zenphoto install. */

$zen_thumb_size = 70; /* Set this to the width you wish the thumbnails to be produced to */

/**************************

* END CONFIG *

**************************/

$zen_output = "";

$zen_images = $wpdb->get_results("SELECT zp_images.filename as zp_filename, zp_images.title as zp_title, zp_albums.folder as zp_folder FROM zp_images as zp_images, zp_albums as zp_albums WHERE zp_images.albumid = zp_albums.id AND zp_images.show = 1 ORDER BY zp_images.id DESC LIMIT 0, $max");

foreach ($zen_images as $zen_image){

$zen_output .='imagezp_folder .'&i='. $zen_image->zp_filename .'&w='. $zen_thumb_size .'&h='. $zen_thumb_size .'&cw='. $zen_thumb_size .'&ch='. $zen_thumb_size .'" alt="'. $zen_image->zp_title .'" /> ';

}

echo $zen_output;

}`

Comments

  • acrylian Administrator, Developer
    Sorry, I cannot help but I would suggest to look at the normal theme and /zp-core/i.php to see how the image processor works.

    Note that the code above does not cover any password protection or inheritat publish states. That can only be checked via the object model. Sadly due to WP's theme structure the Zenphoto as a plugin way does not work.
  • Because I didn't know where to look etc. (I'm not really good at PHP), I created a custom page inside ZP with a printlatestimages() and loaded that page into an iframe in my WP-pages. He who isn't smart has to be clever :)

    http://www.jacktummers.nl/blog
  • acrylian Administrator, Developer
    That's the simplest solution actually and not that bad. (iFrame is not that bad as real frames and nearly all video services use it as wel).
  • Also, html5 has this attribute called 'seamless' for iframes. Until now only supported by Chrome, but it will display iframes just like any other section of a document.
  • acrylian Administrator, Developer
    If you clear all margins and borders you can already make it look like that, I think.
Sign In or Register to comment.