mPicasaIntegration WordPress plugin
Update: I’ve completed my Picasa plugin for WordPress, called Shashin. It has many of the same features as mPicasaIntegration, plus a number of others.
The mPicasaIntegration plugin allows you to embed photos and thumbnails from Google’s Picasa into your WordPress site. I did some basic fixes to it after it’s original author ceased working on it (I fixed the RSS parsing after Google significantly changed the Picasa RSS feed). I’ve started work on my own Picasa plugin, but I’m getting ready to move from Tokyo back to the US, so it probably won’t be ready until July.
Björn Teichmann has made other fixes and enhancements to mPicasaIntegration, and is continuing to work on it, so I’ve decided to stop hosting mPicasaIntegration for download. You can now download mPicasaIntegration from Björn’s site.






March 29th, 2007 at 4:05 am
I hope you can help. I’ve tried your plugin and it’s nearly working for me. I created a page with [mpialbumlist]on it and it has generated the thumbnails correctly in the cache. But when I try and generate posts with individual pictures, the cache images are zero size and I end up with an error on hte page. Do you have any suggestions?
Thanks.
John
March 29th, 2007 at 1:18 pm
Hi John,
To be honest I haven’t even tried mpialbumlist. I went as far as fixing mpiphoto and stopped there. Could you try mpiphoto and let me know if you still have the same problem?
I did run into this same problem, but only once, when using mpiphoto. I mentioned in the Known Issues section to try deleting the files from the cache and trying again. Could you give that a try?
March 29th, 2007 at 4:56 pm
Thanks for replying.
When I use mpiphoto it doesn’t generate the cache thumbnails correctly. I get a file tmb_xx. with no extension and 0bytes in size. I’ve tried deleting the files from the cache but it doesn’t help - same problem when the thumbnail is regenerated.
The page error is:
Warning: getimagesize() [function.getimagesize]: Read error! in /mypath/mPicasaIntegration/functions/functions.display.php on line 229
The link is created correctly, but obviously no image shows. I have a little more time today so I’ll play around and see if I can come up with any clues.
It’s odd that the album thumbnails are ok but the photo thumbs aren’t. I take it they’re generated in the same way? Maybe it’s an issue of what google allows direct access to. Anyway, I can always link using picasaweb’s own link method (which appears to generate its own size-selectable thumbnails).
Thanks,
John
March 31st, 2007 at 4:53 am
Mike,
When I attempt to add galleries to the plugin I receive this error in the published column:
Warning: date() expects parameter 2 to be long, string given in /home/ylazf80/public_html/wp/wp-content/plugins/mPicasaIntegration/functions/functions.admin.php on line 379
at
Warning: date() expects parameter 2 to be long, string given in /home/ylazf80/public_html/wp/wp-content/plugins/mPicasaIntegration/functions/functions.admin.php on line 379
I’m running WP 2.1.2.
Any suggestions?
Doug
March 31st, 2007 at 7:02 am
Hi John,
On the management page for mPicasaIntegration, could you click the links for your albums and let me know if the picture IDs for those thumbnails appear in any of the photo lists? I’m curious to see if those pictures have registered in your database or not.
I have a few pictures without file extensions in my cache, but they are for videos, and they actually seem to work fine that way (I haven’t looked into how that works yet - I imagine it has to do with whatever mechanism Google uses to stream videos). But it sounds like yours are for regular pictures.
March 31st, 2007 at 7:19 am
Hi Doug,
That’s interesting. When I worked on fixing the RSS feed, I found that the new Picasa RSS feed didn’t have a pubdate for the albums anymore, so I’d expected the pubdate to be null. Perhaps Picasa has added pubdate back to the feed.
The plugin does a strtotime on the date from the feed and then saves it in a varchar field. So the error actually makes sense if in fact pubdate is in the feed. In functions.admin.php, on the line before the error, could you add:
print $album->pubdate;
exit;
And then try again? This should print the value to your browser - let me know what it shows.
March 31st, 2007 at 7:42 am
Mike,
I sent an email your way as I didn’t know the best way to describe what is happening now..
Thank you,
Doug
March 31st, 2007 at 9:10 pm
Hi Doug,
Sorry, I didn’t look at this closely enough before I replied before. Putting a print statement on the previous line didn’t work for you because that line is in a html block, not php, so it just displayed the literal statement. Also, my albums actually do have a pubdate value. It’s not coming from the RSS feed, so it’s just defaulting to the current date (at the time the album was added to mPicasaIntegration).
…So my guess is that you’re on a different version of PHP than I am. Are you on PHP 5? I’m on PHP 4, and I’m thinking 5 might be more strict than 4 about the time value being a numeric value rather than a string.
Undo the change I suggested before, and try replacing line 379 with this:
<td align=”center”><?php echo date(get_option(’date_format’), intval($album->pubdate)); ?> at <?php echo date(get_option(’time_format’), intval($album->pubdate)); ?</td>
and let me know what that does. You may still get an error on some other line where the same thing is happening, but I’d like to see if it fixes it on this line.
Mike T
April 9th, 2007 at 11:59 pm
For reference, you should not need my modified rss-functions.php file any more, with Wordpress 2.1 and up.
Pull this URL for the feed:
http://picasaweb.google.com/data/feed/api/user/USERNAME/album/ALBUMNAME?kind=photo&alt=rss
Then parse that using a normal XML DOM parser (not Magpie!).
That will get you all the data you need in a much simpler manner than trying to cope with the ATOM crap. It’s what my new Picasa Web Widget does (as soon as I finish it, anyway).
May 9th, 2007 at 9:03 pm
Hi Michael.
THANKS A LOT! I really enjoy your work to get this plugin fixed again. I just did some changes too to get the album overview also working again.
Additionally i added the HighSlide Javascript so it has a new look and feel…
I hope its ok that i took your work as a basis and do some advertising here
Maybe someone finds it useful.
You can find it at
http://mpicasaintegrationhs.derflash.de
Best regards
Bjoern
May 23rd, 2007 at 7:17 am
Mike,
I tried adding the above code to line 379 (assuming it is the same line 379 as yours)
I placed the code where my astric (*) is located. It did not change anythign other then I began to see the error “// error while fetching feed or no data } } else { // no feed address (should never happen) } } } ?>”
Any ideas?
} else {
?>
Could not fetch feed ”.
May 23rd, 2007 at 11:24 am
I just noticed that version 1.2.2 was out and I was still using 1.2. The thumb problem appears to be resolved.
What is the easiest way to put the thumbs in rows of 4 across instead of one long column?
Thanks for all your hard work.
May 23rd, 2007 at 9:59 pm
Hi Jeromy,
Just put them in a 4-column wide table, like this:
<table>
<tr>
<td>[mpiphoto=1,left,scale,200]</td>
<td>[mpiphoto=2,left,scale,200]</td>
<td>[mpiphoto=3,left,scale,200]</td>
<td>[mpiphoto=4,left,scale,200]</td>
</tr>
</table>