Warning: Illegal string offset 'echo' in /www/htdocs/v078316/blog/wp-content/themes/hybrid/library/extensions/custom-field-series.php on line 79

35 responses to “New WordPress Plugin: kPicasa Gallery PHP4MOD”

  1. Darin

    Having a couple of issues

    1. print_r is not commented out.
    $start = 0;
    $stop = count( $xml->entry ) – 1;

    should be something like

    $start = 0;
    $stop = count( $xml->entry ) – 1;
    if($stop < 0) { $stop = 0; }

  2. david

    Hi Darin!

    1. You’re right – lost my debug info there.. ;-)
    2. Yep, thank you for the hint. As you may have noticed this is ported from the original kPicasa Gallery.

    I’ve fixed these issues. Download the new version from WordPress.org. I’ll also consolidate the newest version (v0.1.0) of kPicasa Gallery asap.

  3. Paul

    I just tried installing this and I’m getting the following error:

    Warning: Invalid argument supplied for foreach() in /home/paulrus/public_html/wp/wp-content/plugins/kpicasa-gallery-php4mod/kpicasa_gallery.php on line 101

  4. Paul

    Actually I managed to fix it and now the only issue is that Lightbox doesn’t work very well – the X is under the image and the prev / next buttons appear in the middle of the image.

    Any ideas?

  5. Guillaume

    Hi David,

    I was just looking at how popular the other Picasa plugins were, and I accidently bumped into your plugin, I wasn’t aware of it!!

    I haven’t looked at it, but great initiative anyway!! Since you’ve seen how it works, if you want to chat a bit about the plugin, drop me an email.

    And… sorry for releasing a few versions in such a short time :)

  6. Bernhard

    this is a nice plugin, but i have one question: Is it posible to increase the Thumbnail-size of the pictures in the albums? actual size is only 72px :(

    thx for help

  7. david

    @Paul: That’s hard to analyze as I don’t really have Lightbox dev experience. I just use it. In which browser did you try? Maybe your HTML is not valid? When I’ve migrated to the newest kPicasa Gallery version you’ll have the option to choose Highslide instead of Lightbox.

    @Guillaume: Well, when I have released the first version I’ve dropped you a note on the WordPress Plugin Forum page. I don’t know why but it never appeared (hasn’t been approved?).

    I’m happy that it’s okay for you that I’ve copied & remodeled your code.. ;-) I just thought it’s a great plugin and unfortunately my webspace is currently only setup for PHP4. Yes I’ll contact you regarding some details..thx! And hey, the more versions you release the better (I don’t have to translate every one :) .

  8. david

    Thank you Bernhard. Yes you are right, the 72px thumbnails are a bit small. The reason was to keep the length of the page short. Since the lastest versions of kPicasa Gallery offers a pagination functionality I’ve decided to switch back to an higher resolution. The same for the columns – I’ll change it to two columns.

  9. Bernhard

    By the way, i solved the 72px thumbnail-problem on my own… here the solution:
    line 199 added:

    $thumbURL2 = str_replace(‘/s72/’, ‘/s144/’, $thumbURL); // s72, s144 und s288 Thumbnailsize

    and in line 208 deletet “height=’$thumbH2′ width=’$thumbW2′” to keep original size of the thumbs.

    Not the best solution, but it works ;)

    I am looking forward for the new version David ;)


  10. Bernhard

    sry, change was in line 206 and looks: ” print ““;”

  11. Bernhard

    sry, change was in line 206 and looks: –> print ““; <–

  12. Frederik

    I am also trying to change the 72px thumbnails. Your hack did not work for me though, Bernard. Did you forget to mention something?

  13. david

    Guys, I’ve updated to version 0.1.3. So now you have all the nice new features like Highslide support and many more. Plus added a dropdown within the options dialog to configure thumbnail size. Bernhard & Frederik I hope there is no need for hacking anymore ;-)

  14. Bernhard

    thx david,
    i will try the update next weekend.


  15. Nick

    Hi David, this mod just saved the day for me :-) I’ve been using Guillaume’s plugin on my dev machine, but when uploading to my hosting provider today I found out they only support php4, and a large part of my site uses the Kpicasa plugin. Your mod really helped me out there.

    I’ve found one issue though, showing multiple albums doesn’t work for me. I used the exact same code which works on my dev machine with Guillaume’s plugin but it doesn’t work on my live site.

    KPICASA_GALLERY(Noosa) works
    KPICASA_GALLERY(Brisbane) works
    but KPICASA_GALLERY(Noosa, Brisbane) doesn’t

    any ideas to what I could be doing wrong?

  16. Carl

    Love the new version! Is there a way to incorporate the Picasa captions?

  17. andres

    First of all, thank for the plugin, awesome, easy and useful!

    My problem is that:

    I cant use Highslide or Lightbox. I change it in the wp options tab, but nothing changes. Im using kpicasa 0.1.3 and WP 2.3.3. Any idea?


  18. andres

    I forgot the URL to kgallery:



  19. Bernhard

    Hallo David,
    know i have installed the new version of your gallerie an it is nearly perfect. Thank`s a lot.

    There is one “Feature” i am missing in the new version, the “title” of the photos. All my picasa photos has a title and in the old version, the title of the singel photos were displayed in the lightbox an by mouse hover (you can see it on my Blog-photos on the startpage what i mean).
    Is it also possible for the “kPicasa Gallery PHP4MOD 0.1.3.” like in the old version? I looked in the code, but i am to bad in php, to do it on my own :(

    Thx for your response

  20. Bernhard

    Hallo David,
    it`s me again… i found an interesting page: http://www.digitalia.be/software/slimbox
    maybe you can use this instead of lightbox, because it should be faster.


  21. Jon

    I just started using the kPicasa PHP4MOD plugin for a few of my sites, and it certainly makes having photo galleries so much easier to maintain!

    However, I’m having trouble with the captions, namely they don’t show up. I do get the descriptions for the album, but none of the captions for the photos are displayed. I can’t seem to figure out where in the code the problem might be. I’m wondering if you may have come across something or would be able to assist me in figuring it out…

  22. david

    I’ve updated to version 0.1.4

    @Nick: The advanced gallery range feature you needed is available now!
    @Carl, Bernhard & Jon: I’ve fixed the captions issue.
    @Andres: Your gallery link is not available – I get a 404.
    @Bernhard: Thank you for the nice lightbox clone link. I’ll think about integrating it, but can’t promise if I have the time in the near future.

  23. andres

    Oh, sorry, I was testing all the week and maybe the URL wasnt online. Check now.

    I updated to the new version, follow all the steps, but the visualization isn’t right (no lightbox or Highslide)

  24. david

    Andres, I’ve checked your page and in my opinion the problem lies within your wordpress template. Not even the default wordpress JS files are included.

  25. juan enrique


    For some reason the plug-in works perfect when i just install it, but after some time it just stops working and gives me the “Error: your PHP configuration does not allow kPicasa Gallery to connect to Picasa Web Albums. Please ask your administrator to enable allow_url_fopen or cURL.” message.

    If that where the case, i presume it wouldn’t even work for the first time, right?… and it does… only some time after it stops.

    Any ideas?



  26. juan enrique

    Thank you for the effort!… some moments ago it worked again, and now it doesn’t, so i presume it’s quite weird…

    And thanks for the compliment… but in all fairness i must say i use the template Foliage Mod by Derek Punsalan and really cool plug-ins like yours… :-D

  27. Evan Gaertner

    Is it possible to add text to the page with the KPICASA_GALLERY call?

    I would like to add the text “Photos may be viewed here or at our public picasa gallery” I would then hyperlink to the public gallery.

  28. david

    Juan, I had a look at the fetch function and I’m afraid the problem lies on the provider site. I could imagine that your hoster is blocking server site requests after several attempts. Maybe you ask their support if there are any restrictions regarding file_get_contents() or cURL .

    Evan, no sorry that’s not possible via the WordPress WYSIWYG (there would be some rendering issue) but you could add this directly to the code of the plugin itself. Have a look at the section where the album meta information (Title, number of photos etc.) is rendered.

  29. david

    Juan, another note: how many photos contains your gallery, on average?

  30. juan enrique

    Thx, i’ll ask the service provider… and regarding the number of photos per album it depends… overall i have 46 albums, the one with the most pictures is 186 the one with the least pictures is 8… i’d say most would be between 40 and 80… you can have a look here: http://picasaweb.google.com/je.gutierrez

    Do you think that might also have someting to do with it?

    JE =)

  31. mwkuiper

    I really love to try it out. This is something new

  32. jbanko

    Nice post man i just signed up to flickr to!

  33. Simon

    I just wanted to say thanks for thinking about us with older PHP versions. Great job. You can check out the fruits of your labor (well a mod’ version) on my site. Thanks.

Leave a Reply