ZenphotoPress: Zenphoto plugin for WordPress

1356789

Comments

  • cox Member
    I can't get it to work. I can't select an album, the drop-down menu doesn't show any albums. I double checked all the settings and am sure they are right. Could anyone offer a suggestion on what is wrong
    (WP2.6.1 + ZP1.2)
  • I'm getting the following when I click the Zp icon in the WP post editor after installing v1.5:

    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in ...<directory-path>/wp-content/plugins/zenphotopress/classes.php on line 225

    Any ideas why this would happen? WP v2.6.1 and ZP 1.2

    Thanks!
  • I got rid of the warning message by adding allow_url_fopen = On to my php.ini file, but my albums dropdown is still empty. My configuration paths are set the same as with previous versions.
  • Ok, both of you seem to have the same problem.
    Is your gallery on the same server as Wordpress?

    You could also try enabling debug messages to see if it tells you more about what is going on: write "ZP_E_ALL" in line 27 in classes.php, in the place of "ZP_E_FATAL".
  • Same server. I'll post the debug results asap.

    Update: Here's what I see:

    ZenphotoPress Messages

    INFO

    PHP Version: 4.4.8

    INFO

    Current working directory: /<path>/html/blog/wp-content/plugins/zenphotopress/tinymce

    INFO

    POST:

    INFO

    GET: Array ( [tinyMCE] => 1 [ver] => 311 )
  • Strange: you should actually see one more debug message, saying something like "ZenphotoProxy call".
    Try looking for hidden PHP messages in the popup. If you have Firefox, right click on the ZenphotoPress popup, select "This frame" and "View frame source".
  • Unfortunately, that's all of it. I can email you the popup html source if that will help...

    Thanks
  • Let's try it: webmaster@simbul.net
  • Quick update: the issue seems to be caused by PHP4, which silently dies after choking on a small try/catch block :D

    If we were in a perfect world I'd tell you all to upgrade to PHP5... but since this world is far from perfect, I'll just try to restore PHP4 compatibility as soon as possible ;)
  • cox Member
    Thanks Simbul. Upgrading to PHP5 made everything run as it should
  • I have a small problem with the widget.
    I just don't know how to get the thumbs side by side.
    I want to display 4 images with two in a row.
    I, I , I ... I must have a big ego :D

    Hope you can tell me how to do it.

    And thanks for making this! It's a great feature for wordpress!

    Just got a new question in my head... Is it possible to use more then one widget?
  • Good for me with PHP5 also - thanks!
  • Hi,
    I am new here and I want to thanks Simbul for this plugin.
    Ok, I am facing the same problem as cox: the icon ZP is in the write toolbar, I click on, a pop-up is opening, and then the drop-down menu is empty. I emptied the cache of my Firefox but well, still have the problem. My zenphoto is on on the same server as my worpress.
    You said that you upgraded to php5, how to do that ? Thanks for your help.
    I
  • cox Member
    @ Yuande: For me fortunately it was only a matter of clicking one button in the control panel of my hosting service. Check with your webhost to see if PHP5 is an option for you.
  • @MarcelSpijker: ZenphotoPress is completely stylable through CSS. You just have to write some code in the style.css file in your Wordpress theme folder.
    The widget is assigned a class named `.ZenphotoPress_widget`, so you could try something like:

    `.ZenphotoPress_widget dt {

    float: left;

    margin: 5px;

    }`
  • Thanks! This works great. Only i added the css true HTML Inserts, so i didnt had to modify a file.
  • For whatever reason, I can't make this plugin work. I am running the latest wordpress and Zenphoto. Php version 5.2.6.

    My PHP Info here: http://www.vinnyandjess.com/test.php

    The error I am receiving:

    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /homepages/13/d209020387/htdocs/VinnyAndJess/wp-content/plugins/zenphotopress/classes.php on line 225

    Warning: file_get_contents(http://www.vinnyandjess.com/wp-content/plugins/zenphotopress/zenphoto_bridge.php?function=get_albums&admin_path=/homepages/13/d209020387/htdocs/VinnyAndJess/pictures/zp-core) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /homepages/13/d209020387/htdocs/VinnyAndJess/wp-content/plugins/zenphotopress/classes.php on line 225

    ---------
    - You'll notice from my phpinfo url that allow_url_fopen and allow_url_include are already set to ON.

    - You'll also notice that if you try to use the URL that is in the error, you get plenty of data returned:

    http://www.vinnyandjess.com/wp-content/plugins/zenphotopress/zenphoto_bridge.php?function=get_albums&admin_path=/homepages/13/d209020387/htdocs/VinnyAndJess/pictures/zp-core

    - I've also changed the debug mode. You can see a screenshot of the debug output here:
    http://www.vinnyandjess.com/zenphotopress.jpg
    - any ideas? i've been at this all day. i want to pull my hair out. please help.
  • Well, this is kinda strange: it seems your server isn't very clear on how it's making PHP run ;)

    When allow_url_fopen is true you shouldn't get the warning. In fact, I'm currently having some problems understanding why file_get_contents() fails.

    I'll do some more research. In the meantime, you could try asking for help to your server administrator.

    Another possibility: go to line 224 in classes.php and substitute it with
    `if (false) {`
    This workaround should avoid file_get_contents altogether. Worth a try, but it's possible the fallback method won't work either.
  • @cox: ok, I've done it. I changed to php5 and it is working now. Thanks for your help.
  • Hi Simbul,

    Thanks for the info. that didn't work. this is a really strange problem indeed. Here is the new error that it generates:

    Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /homepages/13/d209020387/htdocs/VinnyAndJess/wp-content/plugins/zenphotopress/classes.php on line 240

    Warning: fsockopen() [function.fsockopen]: unable to connect to :80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /homepages/13/d209020387/htdocs/VinnyAndJess/wp-content/plugins/zenphotopress/classes.php on line 240

    -----
    I've tried disabling all other plugins and trying again, but the error is the same. I am using 1and1 as my web host. They allow both php4 and php5 to run, so i had to update my htaccess file with the following info:
    AddType x-mapp-php5 .php
    AddHandler x-mapp-php5 .php

    i'm wondering if something was missed there...
  • Just a wild guess: is your webserver running on a port different than 80?
  • Ok, I managed to scrap some time together for some fixes.
    ZenphotoPress 1.5.1 should solve all the issues which popped up since the release of 1.5 (most notably, it restores compatibility with PHP4).

    http://simbul.bzaar.net/zenphotopress
  • I'm running zenphoto 1.2 [2213], wordpress 2.6.1 and zenphotopress 1.5.1. I have php 5.2.4 installed, yet I still get an empty albums dropdown. The message from ZP_E_ALL debug level was:xxx

    ZenphotoPress Messages

    INFO

    PHP Version: 5.2.4

    INFO

    Current working directory: /home/vhosts/xxx/subdomains/blog/httpdocs/wp-content/plugins/zenphotopress/tinymce

    INFO

    POST:

    INFO

    GET: Array ( [tinyMCE] => 0 )

    INFO

    ZenphotoProxy method: cURL

    INFO

    ZenphotoProxy call: http://xxx/wp-content/plugins/zenphotopress/zenphoto_bridge.php?function=get_albums&admin_path=/home/vhosts/xxx/httpdocs/zp-core/

    Any ideas? Can I get rid of tinymce?
  • What do you mean "get rid of tinymce"?

    Anyway, try going to the URL of the ZenphotoProxy call and tell me what do you see.
  • When I do that, this is what I get:

    a:90:{i:0;a:3:{s:5:"value";s:2:"57";s:4:"name";s:20:"070708 plaswijckpark";s:8:"parentid";N;}i:1;a:3:{s:5:"value";s:2:"34";s:4:"name";s:20:"12 Days of Christmas";s:8:"parentid";N;}i:2;a:3:{s:5:"value";s:2:"88";s:4:"name";s:12:"2004Ardennen";s:8:"parentid";N;}i:3;a:3:{s:5:"value";s:2:"87";s:4:"name";s:23:"2005AankomstSinterklaas";s:8:"parentid";N;}i:4;a:3:{s:5:"value";s:2:"85";s:4:"name";s:11:"2005AutoRAI";s:8:"parentid";N;}i:5;a:3:{s:5:"value";s:2:"84";s:4:"name";s:14:"2005Denemarken";s:8:"parentid";N;}i:6;a:3:{s:5:"value";s:2:"83";s:4:"name";s:12:"2005Efteling";s:8:"parentid";N;}i:7;a:3:{s:5:"value";s:2:"82";s:4:"name";s:25:"2005GezichtsUitdrukkingen";s:8:"parentid";N;}i:8;a:3:{s:5:"value";s:2:"81";s:4:"name";s:17:"2005GoldenTenLoop";s:8:"parentid";N;}i:9;a:3:{s:5:"value";s:2:"80";s:4:"name";s:13:"2005Halloween";s:8:"parentid";N;}i:10;a:3:{s:5:"value";s:2:"79";s:4:"name";s:15:"2005Jaarmeeting";s:8:"parentid";N;}i:11;a:3:{s:5:"value";s:2:"78";s:4:"name";s:17:"2005Koninginnedag";s:8:"parentid";N;}i:12;a:3:{s:5:"value";s:2:"77";s:4:"name";s:15:"2005KualaLumpur";s:8:"parentid";N;}i:13;a:3:{s:5:"value";s:2:"76";s:4:"name";s:15:"2005MeiVakantie";s:8:"parentid";N;}i:14;a:3:{s:5:"value";s:2:"75";s:4:"name";s:9:"2005Pasen";s:8:"parentid";N;}i:15;a:3:{s:5:"value";s:2:"72";s:4:"name";s:22:"2005TUDelftBibliotheek";s:8:"parentid";N;}i:16;a:3:{s:5:"value";s:2:"25";s:4:"name";s:11:"2e Pony les";s:8:"parentid";N;}i:17;a:3:{s:5:"value";s:2:"16";s:4:"name";s:17:"A day with Thomas";s:8:"parentid";N;}i:18;a:3:{s:5:"value";s:2:"67";s:4:"name";s:24:"Afscheid Peuterspeelzaal";s:8:"parentid";N;}i:19;a:3:{s:5:"value";s:2:"86";s:4:"name";s:13:"Ardennen 2005";s:8:"parentid";N;}i:20;a:3:{s:5:"value";s:2:"66";s:4:"name";s:13:"Ardennen 2006";s:8:"parentid";N;}i:21;a:3:{s:5:"value";s:2:"51";s:4:"name";s:15:"BBQ in het Park";s:8:"parentid";N;}i:22;a:3:{s:5:"value";s:2:"26";s:4:"name";s:16:"Besneeuwde Bomen";s:8:"parentid";N;}i:23;a:3:{s:5:"value";s:2:"55";s:4:"name";s:17:"Bow River Rafting";s:8:"parentid";N;}i:24;a:3:{s:5:"value";s:1:"5";s:4:"name";s:12:"Calaway Park";s:8:"parentid";N;}i:25;a:3:{s:5:"value";s:2:"47";s:4:"name";s:11:"Calgary Zoo";s:8:"parentid";N;}i:26;a:3:{s:5:"value";s:2:"58";s:4:"name";s:17:"Calgary, Mei 2007";s:8:"parentid";N;}i:27;a:3:{s:5:"value";s:1:"9";s:4:"name";s:10:"Canada Day";s:8:"parentid";N;}i:28;a:3:{s:5:"value";s:2:"29";s:4:"name";s:14:"Cinnamon buns!";s:8:"parentid";N;}i:29;a:3:{s:5:"value";s:2:"19";s:4:"name";s:14:"Crazy Hair Day";s:8:"parentid";N;}i:30;a:3:{s:5:"value";s:1:"6";s:4:"name";s:13:"Dagje Calgary";s:8:"parentid";N;}i:31;a:3:{s:5:"value";s:2:"65";s:4:"name";s:24:"Dagje naar strand en bos";s:8:"parentid";N;}i:32;a:3:{s:5:"value";s:2:"46";s:4:"name";s:18:"De spullen zijn er";s:8:"parentid";N;}i:33;a:3:{s:5:"value";s:2:"42";s:4:"name";s:16:"Derde Schaatsles";s:8:"parentid";N;}i:34;a:3:{s:5:"value";s:1:"4";s:4:"name";s:13:"Dinosaurussen";s:8:"parentid";N;}i:35;a:3:{s:5:"value";s:2:"21";s:4:"name";s:10:"Disneyland";s:8:"parentid";N;}i:36;a:3:{s:5:"value";s:2:"17";s:4:"name";s:26:"Eline's Zevende Verjaardag";s:8:"parentid";N;}i:37;a:3:{s:5:"value";s:2:"15";s:4:"name";s:12:"Elines Party";s:8:"parentid";N;}i:38;a:3:{s:5:"value";s:2:"71";s:4:"name";s:14:"GoldenTen Loop";s:8:"parentid";N;}i:39;a:3:{s:5:"value";s:2:"12";s:4:"name";s:16:"Graduation Peter";s:8:"parentid";N;}i:40;a:3:{s:5:"value";s:2:"14";s:4:"name";s:12:"Grassi Lakes";s:8:"parentid";N;}i:41;a:3:{s:5:"value";s:2:"31";s:4:"name";s:13:"Grotto

    etc. Looks valid to me.
  • After digging into this issue, I found that my hosting provider (hosting2go.nl) removes access to 'external' sites through curl, fsockopen and some other methods. Since the call to zenphoto_bridge is through curl, the connection is refused hence no returned albums. The normal (web browser) connection does work, but from php it does not.

    As far as I know the 'old' zenpress plugin did not use this mechanism right? Before I upgraded I did not have this problem. I suppose it is a big rewrite to call the functions in zenphoto_bridge directly instead of the current methods.

    I think I'll have to search for a different solution.
  • No, the old ZenphotoPress plugin did not use this mechanism: it was introduced in version 1.5 to avoid conflicts between Wordpress and Zenphoto (including Zenphoto's classes in Wordpress was actually begging for name clashes :D).

    So, I surmise the problem is your blog and your gallery are hosted on different webservers. This is unfortunately an issue without an easy solution: in fact almost all hosting services disable external calls from php for security reasons.

    I'm working on trying to solve this issue, but it is not something as simple as a bugfix. In the meantime, should you find a suitable solution, let me know ;)
  • I've now modified the old zenpress plugin to work with the changes in zenphoto. I can't use the new features of zenphotopress, but at least I'll be able to continue editing my blog.

    If there is a way to use the new version, I'm very interested to apply it.
  • Thanks for the wonderful plugin. I have it installed and it seems to be working fine.

    I am having one problem though. I have mod rewrite on zenphoto. Now when i insert photos in wordpress using short-codes they have he mod_rewrite urls to the gallery. But when i insert individual photos through popup in wordpress they still have old non mod_rewrite urls.

    Is there any quick fix for this ?
  • I have fallen for this slick plugin, but wound up butchering it pretty heavily for my not-so-average needs. It was easier than writing it from scratch. Simbul, if you are interested in any of the changes I have made, I'll be happy to share them. :)

    - Refactored the widget code so you can actually run any number of copies of the widget. I haven't cleaned it up quite enough so that you can add multiple copies without editing the script, but at least now it is scalable.
    - Changed the MCE so you can get the caption border around images you embed into wordpress, and uses the caption shortcode to align the image, giving an extra alignment option.
    - Changed the widget code to allow you to select any arbitrary list of albums from the gallery to use in the widget. A bit more flexible for galleries like mine where I split up the albums between the two widgets I use, and have an album or two that I don't want in the widgets at all. Currently only acts like an 'include this list' operation, rather than an 'exclude this list' operation which I could see as being useful.

    Still, very useful plugin, and I wouldn't have been able to layout my blog the way I wanted without it.
Sign In or Register to comment.