New Wordpress Plugin: kPicasa Gallery PHP4MOD

January 14, 2008 – 9:16 pm

Just released my first wordpress plugin: kPicasa Gallery PHP4MOD. It’s a modified version of the great kPicasa Gallery plugin by Guillaume Hébert.

What does it? Exactly the same as the original one with the advantage it is also working with PHP4. In my opinion this is quite important as many users haven’t upgraded to PHP5 yet.

How to use it:

  1. Unzip the archive to your wp-content/plugins/ folder.
  2. Activate the plugin via the Plugins menu inside WordPress administration view
  3. Now create a post or a page with KPICASA_GALLERY(YourPicasaUsername) as the only content. For example, if your Picasa username is knut123, you would create a post or page with KPICASA_GALLERY(knut123)
  4. Enjoy!
  1. 32 Responses to “New Wordpress Plugin: kPicasa Gallery PHP4MOD”

  2. Having a couple of issues

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

    should be something like

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

    By Darin on Jan 23, 2008

  3. 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.

    By david on Jan 24, 2008

  4. 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

    By Paul on Jan 30, 2008

  5. 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?

    By Paul on Jan 30, 2008

  6. 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 :)

    By Guillaume on Feb 4, 2008

  7. Hello,
    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
    Bernhard

    By Bernhard on Feb 6, 2008

  8. @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 :).

    By david on Feb 6, 2008

  9. 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.

    By david on Feb 6, 2008

  10. 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 ;)

    Greets
    Bernhard

    By Bernhard on Feb 7, 2008

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

    By Bernhard on Feb 7, 2008

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

    By Bernhard on Feb 7, 2008

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

    By Frederik on Feb 11, 2008

  14. 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 ;-)

    By david on Feb 13, 2008

  15. thx david,
    i will try the update next weekend.

    greets

    By Bernhard on Feb 14, 2008

  16. 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?

    By Nick on Feb 16, 2008

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

    By Carl on Feb 20, 2008

  18. 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?

    Thanks!

    By andres on Feb 20, 2008

  19. I forgot the URL to kgallery:

    http://www.gallerysalamanca.com/fotos/

    ;-)

    By andres on Feb 20, 2008

  20. 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
    greets
    Bernhard

    By Bernhard on Feb 22, 2008

  21. 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.

    greets
    Bernhard

    By Bernhard on Feb 22, 2008

  22. 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…

    By Jon on Feb 23, 2008

  23. 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.

    By david on Feb 26, 2008

  24. 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)

    By andres on Feb 29, 2008

  25. 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.

    By david on Mar 11, 2008

  26. Hi!

    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?

    Thx..

    JE

    By juan enrique on Mar 25, 2008

  27. Hi Juan,

    I’ll think about what could be wrong. Come back in a few days when I’ve a bit more time. Btw: You have a really awesome website there =)

    By admin on Mar 26, 2008

  28. 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

    By juan enrique on Mar 26, 2008

  29. 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.

    By Evan Gaertner on Mar 31, 2008

  30. 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.

    By david on Apr 8, 2008

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

    By david on Apr 8, 2008

  32. 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 =)

    By juan enrique on Apr 9, 2008

  33. Juan, yes the number of pictures might be a problem. In the other post Yorokobi wrote:

    Well… it would appear that with my ISP, 1and1, that around 100 is the limit. 150 was too much, so I settled for around 100 per gallery - 118 is the max amount I have in any given gallery and it loads fine.

    By admin on Apr 13, 2008

Post a Comment