ZenphotoPress: Zenphoto plugin for WordPress

1235789

Comments

  • It can be done with a little bit of css.
    The widget is a list of <dt> elements inside a <dl> element. The <dl> element has classes .ZenphotoPress_badge and .ZenphotoPress_widget.

    Supposing your thumbnails are 85x85 pixels, you could use something like this:

    `

    dl.ZenphotoPress_widget {

    width: 200px;

    }

    dl.ZenphotoPress_widget dt {

    float: left;

    margin: 5px;

    }

    `

    I can't guarantee the code will work for you. If you need to dig deeper, the key is the "float" CSS property ;)
  • Ok i'm yet another user which when pressing ZP inn tinyMCE gets a blank popup, which means ZenphotoPress can't fetch the albums. I'm running WordPress 2.7.1, Zenphoto version 1.2.4 [3716] (Official Build) and ZenphotoPress 1.5.3.

    My error is:

    ZenphotoPress Messages

    INFO

    PHP Version: 5.2.8

    INFO

    Current working directory: /home/content/m/e/n/mentalleak/html/blog/wp-content/plugins/zenphotopress/tinymce

    INFO

    POST:

    INFO

    GET: Array ( [tinyMCE] => 0 )

    INFO

    ZenphotoProxy method: cURL

    INFO

    ZenphotoProxy call: http://blog.leakycrayon.com/wp-content/plugins/zenphotopress/zenphoto_bridge.php?function=get_albums&admin_path=/home/content/m/e/n/mentalleak/html/photo/zp-core

    and my proxy call result is:

    a:2:{i:0;a:3:{s:5:"value";s:1:"1";s:4:"name";s:7:"Aleator";s:8:"parentid";N;}i:1;a:3:{s:5:"value";s:1:"2";s:4:"name";s:5:"Music";s:8:"parentid";N;}}

    I'd really love if you could help me.

    As i've read around the topic, there were 2 solutions. One was upgrading the zenphotopress plugin, but as you see i got all the latest version for WP, Zenphoto and zenphotopress, so that's out of the question.

    The other solution was that the user had the zenphoto folder password-protected. What does that mean? Hosting Folder permissions? Some setting/feature in zenphoto? Could you please explain?

    Thank you.
  • Simbul Member
    I tried the link you posted and I received an error. I think this is not your problem, anyway.
    Your proxy call result looks ok, by the way.

    What do you mean by "blank popup"? The whole popup is empty or just the dropdown field?
  • You received and error because i changed the path to zenphoto.

    Just the dropdown field where the albums are supposed to be.
  • Simbul Member
    Looks like a problem with cURL calls: this would explain why the proxy call returns the right data when you put the URL in the browser but ZPP is still not working.

    Do you have any kind of restriction - on your server - on the calls you can make? Are Zenphoto and Wordpress on different servers?
  • i changed my hosting and it works.

    Now my problem is actually inserting a thumbnail in a post and not a link to the picture. But i'll prolly find out how on my own.
  • Simbul Member
    Inserting a thumbnail should be the default behavior. It is configurable using the ZPP panel options, anyway.
  • Ipstenu Member
    Okay, I love this plugin :) Works great. I can't figure out how to get dynamic albums to show up in the sidebar widget, though!

    The album shows up on the dropdown, but nothing shows up on the page :( Am I missing the obvious?
  • Simbul Member
    Dynamic albums are not officially supported - which is to say: the Zenphoto team throws in new features faster than I can manage them, these days :)

    I never tested ZPP with dynamic albums, some weird behavior is to be expected. I'll try to put this in the next release cycle, but I have no estimates on when it'll be ready, at the moment.
  • acrylian Administrator, Developer
    Well, dynamic albums were introduced with 1.1.5 over a year ago. Not really a brand new feature, isn't it?..:-) I just noticed that tinyZenpage, the TInyMCE plugin for Zenpage, also only roughly supports dynamic albums (at least showing the album thumb for inclusion). I will see to get that in there then you may be can take a look there.
  • Ipstenu Member
    No worries! I thought I was missing a step in there :) I'm helping my friend set up a blog and while I like random pics from anywhere, she wanted the 'Finale Product' image of every folder set, and it made the most sense to try dynamics :)

    Thank you for looking in on this.
  • Simbul Member
    I didn't say it's brand new: I just said it's faster than I can manage (which is not fast, admittedly) :P

    At least the Wordpress guys seem to have stopped developing, after 2.7.1... ;)
  • acrylian Administrator, Developer
    @Simbul: tinyZenpage now has full support for dynamic albums in the svn. Take a look at the function `printImagesList()` within `/zp-core/plugins/tiny_mce/plugins/tinyzenpage/tinyzenpage-functions.php`, especially around line 121. Should not be hard to adapt.
  • Simbul Member
    Thanks. ZenphotoPress actually digs into the database, so it'll be a little harder than just using the Album and Image classes, but it doesn't look so difficult after all ;)

    On this topic, I've always felt a little uneasy working directly with the database: it is bad for encapsulation, it breaks across Zenphoto releases...
    Is some sort of Zenphoto API being developed (or has it been developed without my knowledge), by any chance?
  • acrylian Administrator, Developer
    Why don't you use the class methods directly like tinyZenpage does? These serve basically as our API. Take a look at tinyZenpage and feel free to take from there what you need as it is inspired by ZenphotoPress anyway (although our own code..:-)).
  • Simbul Member
    The difference is in the environment: tinyZenpage runs as a Zenphoto plugin and thus has access to a lot of functions and facilities external apps like ZPP cannot access.
    Last time I checked there wasn't any easy way of making the core classes available to ZPP without instancing more or less the entire Zenphoto... did something change in this respect?
  • If you just want the basic capability, you can load functions.php. This leaves out all the template functions. Short of this, you will have to stick with MySQL.
  • acrylian Administrator, Developer
    Actually tinyZenpage runs as a TinyMCE plugin that loads the zenphoto functions. I am not familiar with the ZenphotoPress setup in detail but I would think it should be possible to load the classes similar to the main tinyzenpage.php file does. Of coures that might match the term "instancing more or less the entire Zenphoto", but also might save some trouble with updates.
  • I installed this plugin but when I go to the ZP button in a new post, I get a dialog box to select an album but there are no albums listed...

    Any ideas?
  • Simbul Member
    It may be due to your webserver configuration.
    Try activating debug mode to see if you can come up with some more information.

    To activate debug mode, see the FAQ: http://wordpress.org/extend/plugins/zenphotopress/faq/
  • I made that change to the classes.php file.

    Here is what I get when click the ZP button in a new post window:

    ZenphotoPress Messages

    INFO

    PHP Version: 5.2.9

    INFO

    Current working directory: /home1/rickand1/public_html/theblog/wp-content/plugins/zenphotopress/tinymce

    INFO

    POST:

    INFO

    GET: Array ( [tinyMCE] => 1 [ver] => 3241-1141 )

    INFO

    ZenphotoProxy method: cURL

    INFO

    ZenphotoProxy call: http://rickandsamantha.com/theblog/wp-content/plugins/zenphotopress/zenphoto_bridge.php?function=get_albums&admin_path=/home1/rickand1/public_html/802photography/zp-core
  • Simbul Member
    I think I see the problem, here: your theblog/ directory is password-protected.

    ZenphotoPress needs to communicate with a specific php page (zenphoto_bridge.php) to get info from Zenphoto. Given that ZPP doesn't know the password, it can't access the page and thus cannot get any data.
  • Hi Simbul,

    How about setting up zenphoto and wordpress in the same server but on two different sub-domains? ie, my wp is at blog.example.com and my zenphoto is at gallery.example.com?

    zenphoto url: http://gallery.example.com
    admin path: /var/www/gallery.example.com/htdocs/zp-core

    i tried to configure zenphotopress, but it never accept the url and admin path above. By the way, I'm using wp 2.8.2 and zenphotopress 1.5.3.

    Thanks.
  • Theoretically, everything should work fine. Are you sure of the path? Is everything readable, permission-wise?
  • Hi Simbul,

    I'm very much sure that the path is correct and everything is readable since the zenphoto (gallery.example.com) itself is accessible and as you said, theoretically, it should work in this kind of setup. I even tried to change the dir recursively to world readable but still fails. Do you think this is a wp 2.8.2 issue?

    Thanks.
  • No, I don't think it's a WP issue.
    What is the error message, exactly? Something like "Wrong Zenphoto admin path..."?

    That error message pops out when the admin path is not a directory on the filesystem (it actually uses the PHP is_dir() function), so it's kinda hard to tell why it would have issues with an existing directory.

    Could you provide some more info on your server setup? You can drop me a mail if you don't want to post in on a public forum ;)
  • Hi Simbul,
    I'm having trouble getting a album selection. The dropdown box remains emtpy. I activated the debug messages, which seem to be OK. I removed my URL with [path] due to the fact, that I'm just beginning to develop a page.
    INFO
    PHP Version: 5.2.9
    INFO
    Current working directory: [path]/html/wp-content/plugins/zenphotopress/tinymce
    INFO
    POST:
    INFO
    GET: Array ( [tinyMCE] => 1 [ver] => 3241-1141 )
    INFO
    ZenphotoProxy method: cURL
    INFO
    ZenphotoProxy call: [path]/wp-content/plugins/zenphotopress/zenphoto_bridge.php?function=get_albums&admin_path=[path]/html/zenphoto/zp-core

    When I enter the Proxy call, I get the following error message:
    Warning: require_once([path]/html/zenphoto/zp-core/zp-config.php) [function.require-once]: failed to open stream: No such file or directory in [path]/html/wp-content/plugins/zenphotopress/zenphoto_bridge.php on line 71
    [...]

    I'm using the recent ZP 1.2.6 RC2 version, which places the zp-config.php in the new folder zp-data. I think the function $zp_admin_path links to the wrong directory.
    This is just a guess. Could you give me an hint how to change the function so it is linking to the correct zp-config.php location?

    **Update**
    Copying the zp-config.php file into the folder /zp-core works fine for me. Maybe you can adapt your code with the next official ZP release.

    Thank you very much for your efforts!
  • acrylian Administrator, Developer
    The `zp-config.php` file will be stored within the `zp-data` folder from 1.2.6 on.
  • If you change your zenphoto 'admin' area on WP from zp-core to zp-data, it appears to work fine.

    This is caused, as acrylian said, by ZenPhoto moving the config file from zp-core into zp-data.

    Before
    Zenphoto admin path: /var/www/example.com/zenphoto/zp-core

    After:
    Zenphoto admin path: /var/www/example.com/zenphoto/zp-data
  • Hi Ipstenu,

    could you please explain in detail where to change the path?
    Currently I'm lost in code ;9

    Thanks
Sign In or Register to comment.