mPicasaIntegration HS
a Wordpress-Plugin for Google PicasaWeb Integration
Um es mal international zugänglich zu machen, schreib ich das Ganze hier auf Englisch
At first – to clearify – i’m not the original author of this plugin. Unfortunately he disappeared from the internet with his whole website. But you can still find a copy of the original plugin for example at gormful.com and i was using it till some changes in the google feed caused so many bugs which made the plugin unusable for some time.
Then i found Michael Toppa’s site who fixed some of these bugs.
But my main problems with the album integration still existed so i decided to make the plugin working again. Furthermore i found a Javascript named HighSlide in some other photo albums and thought it would be nice to see that in mPicasaIntegration also. Some work should still be done:
- including the rating and comment form again
- fix some more bugs …
… but i hope you already enjoy my work.
Download (last update: 03.07.2008):
mPicasaIntegrationHS-1.2.8.tgz or mPicasaIntegrationHS-1.2.8.zip
Changelog:
[1.2.8]
- fixed reading the rss feed correctly … again ;o)
[1.2.7]
- did some minor fixes over the last year
[1.2.6 beta]
- fixed the cached files’ extension missing problem
- fixed bug resulting in showing thumb-sized images when width was under max-width(mPicasaIntegration – settings page)
[1.2.5 beta]
- manually adding albums with googles feed is now working again
[1.2.4 beta]
- now reading image width/height from media namespace instead of gphoto namespace (should be more reliable)
- admin panel > ’synchronize album’ forces album update in spite of unreached update interval
- image description under the maximized image now uses the image description from googles feed if available
- now forcing MAGPIE_CACHE_ON=0 for not using cache while fetching albums
- on album update/sync : deleted images will now be deleted from the wordpress album too
- it is now possible to sort the album overview (equal indexes will be sorted by album date)
Usage:
- Download and unpack the plugin.
- Copy the folder “mPicasaIntegration” to ./wp-content/plugins/
- Give the folder ./wp-content/plugins/mPicasaIntegration/cache global read and write access (777) if not already set
- In this package there’s also a folder named “copy to wp-includes but backup before” which contains a revised version of the ./wp-includes/rss.php made by ottodestruct.com which must be replaced because the original file cannot fully parse the new Picasa feed. PLEASE backup the original files before!
- Now go to the WordPress Plugins tab and activate the plugin.
- In Options -> Google Webalbum, the most important setting is your Picasa username.
- In Manage -> Google Webalbum, click “Add Album manually” or “Add all unknown albums“
- To embed the album:
- Simply use the tag [mpione] in your post or page (it will be replaced with the album overview when viewing the post/page)
- To embed the photos in your posts and/or pages:
- Click “Show Albums,” and then click the title of the album you just added. The next screen will show you a summary of the photos in the album. You will need the ID numbers to embed the photos
- In a post or page, embed a photo like this: [mpiphoto=aa,bb,cc,dd] where aa is the photo-ID, bb the align value (none, left, right, leftclear, rightclear), cc the photo type (thumb, scale) and dd the desired image width (note the maximum is 640)
Original Notes from Michael Toppa’s Site:
mPicasaIntegration WordPress plugin
Important Note – Please Read! I am not the original author of this plugin. I have made some essential fixes to it, but there are still bugs. I do not plan to do additional feature development on it. If you have trouble with the “mpiphoto” tag, please let me know. However, I am not offering support for the other tags, as they mostly don’t seem to work. I hope to begin working on my own Picasa plugin for WordPress in April May (I’m currently working on another project). I’ve deliberately not advertised this plugin on the WordPress plugin sites. I’m making my fixes available so others who were using the old version won’t be completely stuck, but I don’t want to attract new users to it. I want to focus my efforts on writing a new plugin rather than doing a lot of patchwork on this one.
The mPicasaIntegration plugin allows you to embed photos and thumbnails from Google’s Picasa into your WordPress site. It was written by Markus Steinhauer, and he last updated it sometime in the Fall of 2006. The plugin stopped working soon after that when Google significantly changed the Picasa RSS feed, which the plugin relies on. Markus and his web site have vanished, and I have not been able to contact him. So I’ve taken the liberty of performing some “emergency surgery” on this plugin to get it at least partially functioning again (Markus released it under a GNU license, so I don’t think he’ll mind).
Markus’ last release was numbered 1.0. I have labeled this one 1.1 alpha. I’m giving it the alpha designation because I have found a number of bugs (some that were already there, and some that have to do with the change in the RSS feed). See the Known Issues listed below. The short version is this: if you want to embed individual photos from Picasa in Wordpress pages and posts, and have those images link to Picasa for the full-size version, then the plugin will perform reasonably well for you. For other things, you will likely run into problems.
Setup and Usage
- Download the Google Calendar Widget from ottodestruct.com. You don’t need to install the widget, but you will need Otto’s revised version of rss-functions.php. Follow the instructions in his readme file. This is needed because the Magpie RSS reader that comes with WordPress (as of version 2.0.2 anyway) cannot fully parse the new Picasa feed.
- Download mPicasaIntegratation.
- Unzip and copy all the files and folders to your Wordpress plugin directory. Give global read and write access to the “cache” directory.
- Go to the WordPress Plugins tab and activate the plugin.
- In Options -> mPicasaIntegration, the most important setting is your Picasa username. Disabling image caching is not allowed currently.
- In Manage -> mPicasaIntegration, click “Add Album” (assuming you already have an album on Picasa!) and follow the instructions on the screen.
- Click “Show Albums,” and then click the title of the album you just added. The next screen will show you a summary of the photos in the album. You will need the ID numbers to embed the photos in your posts and/or pages.
- In a post or page, embed a photo like this: [mpiphoto=aa,bb,cc,dd] where aa is the photo-ID, bb the align value (none, left, right, leftclear, rightclear), cc the photo type (thumb, scale) and dd the desired image width (note the maximum is 640).
- See Markus’ original notes below for information on other tags, but I found them to be buggy and haven’t worked on fixing them yet.
Future Plans
I don’t plan to do further feature development on this plugin. Markus wrote a very ambitious plugin here, but it has bugs. I use only the “mpihoto” tag and I will do what I can to offer support for that tag if you have trouble with it. I am not offering support for the other tags.
Markus’ approach is different from what mine would be, and the feature set I’m interested in is smaller (I mainly want to easily embed individual photos in my posts, not do full album browsing or get involved with comments and ratings). I hope to start work on my own Picasa plugin, probably in May, after I get an unrelated project done. Please use the comment section below to let me know what kind of features you might be interested in. I’m curious to see what others are looking for.
Fixes in 1.1 alpha
- Can parse the new Picasa RSS feed. Unfortunately the new feed does not include image dimensions like the old one did. I changed the image display function to determine the dimensions at the time of caching, and then update the database entry for the photo. There are other fields missing as well in the new feed, but none of them seem to be critical.
- Fixed bug with trying to stat the filesize of images that are not yet in the cache.
- Version 1.0 tried to show the fullsize image locally when you clicked a thumbnail. This worked on pages but not on posts. This is not an easy thing to fix, so at least for now I’ve set the link to go the Picasa page for the image.
- Update 4/5/07: fixed bug with pubdates when used with the date function. In PHP 5 the date value has to be in integer, but it was coming through as a string.
Known Issues
- “Divide by zero” error appears sometimes when displaying an image for the first time. This is a race condition between the page display and the image cacher (i.e. the image hasn’t finished caching before the page finishes loading). This error usually goes away when you reload the page. On one occasion I couldn’t fix it with a page reload, so I deleted the image from the cache and tried again, and that worked.
- The “Synchronize” management function doesn’t always work. I’ve found I sometimes get better results if I wait 5 minutes or so after making a change to an album before trying this. I have not investigated why this is happening.
- The “Synchronize” function lacks the ability to delete. If you delete a photo from an album in Picasa, it won’t get deleted from mPicasaIntegration.
- The navigation arrows when using the mpialbum tag don’t work properly. I believe the problem is they are running in reverse order from what you’d expect.
Markus’ Original Notes
Markus had the following information on his site before it disappeared. I was able to rescue this from the Google cache.
More Page Solution
Create a new page and name it something like ‘Gallery’ or ‘Photos’. Write the tag [mpialbumlist] on it. For each album you want to display, you have to create a new page and write the tag [mpialbum=x] (x is the album id) on it. After that remind the page-ID and set it in the mPicasaIntegration Management Panel.
The advantage of this solution is, that you can define the headline for the albums.
If you want to use images from these albums on posts or pages you have to use the following tag syntax. An easier way of integration is already planned and partially coded.
Photos inline with Posts and Pages
The tag looks like this: [mpiphoto=aa,bb,cc,dd] whereby aa is the photo-ID, bb the align value (none, left, right, leftclear, rightclear), cc the photo type (thumb, scale) and dd the image width.
Example: [mpiphoto=12,left,thumb,100] would display the thumb of the photo with the id 12 left aligned with floating text around it and a width of 100 pixels.
Example: [mpiphoto=12,none,scale,400] would display the photo with the id 12 centered (depending on the theme style) breaking the text and a width of 400 pixels.
I hope that you find this plugin useful. If you have any questions, bugs or suggestions, feel free to post a comment. It would also be great to hear if someone installed it successfully.
- Nothing But Words » Blog Archive » New Home For mPicasaIntegration
- WP Plugins DB » Plugin Details » mPicasaIntegration HS
- Metric Tensor / links for 2007-11-06
- Die besten WordPress-Plugins | Volker Ruerup
- Michael Toppa - Web Architect » Blog Archive » New Home For mPicasaIntegration
- Kyoichiro Kawamoto - mPicasaIntegration HS


#1 by mufias on May 16th, 2007
i got this error, why?
Warning: getimagesize(): Read error! in v1/wp-content/plugins/mPicasaIntegration/functions/functions.display.php on line 34
Warning: getimagesize(): Read error! in v1/wp-content/plugins/mPicasaIntegration/functions/functions.display.php on line 244
#2 by icelander on May 16th, 2007
Hi!
Every thing is good but I’ve got some stupid error. I can’t get thumbnails and I’ve only name of picture. And I don’t know why but plugs doesn’t download picture to cache. I have 777 but still nothing. Maybe because this function is switch off. Any chance to acessable it?
Or maybe other suggestion.
Anyway great pluggin but could be better?
#3 by Lucas on May 19th, 2007
Hi,
SOme problems, can u help me?
i got this
Warning: date() expects parameter 2 to be long, string given in /home/luelucas/public_html/online/wp-content/plugins/mPicasaIntegration/functions/functions.display.php on line 106
in http://www.luelucas.com.br/online/?page_id=22
And the text at the botton isnt good, can u take a look? Thanks!
Lucas
#4 by Lucas on May 19th, 2007
And please…
where I change the words to my language…
Thanks
Lucas
#5 by Lucas on May 19th, 2007
man, sorry about the spam…
The problem is only with Firefox, can u still take a look?
#6 by Jeromy on May 22nd, 2007
It appears when the thumbs are created for the album list tmb_XXa.jpg it creates them fine. But when the thumbs are created for the photo list (i.e. tmb_XX.jpg) it does not format or convert the picture correctly. Even if you FTP the photo back to your local machine it cannot be viewed. Does anyone know where in the code the thumb is being created? Also what is the difference between the album list thumb and the other thumbs. I love the script but this issue is driving me crazy.
#7 by Björn on May 23rd, 2007
@ Lucas:
on my firefox the page looks fine.. hmm… :-/
@ all:
i’m currently looking into the image creating problem.
it seems that the rss function does not return the complete rss data from the feed-url.
so the needed [media.media:group.thumbnail@url] and [media.media:group.content@url] from the rss-url (http://picasaweb.google.com/data/feed/api/user/Abi2000Laucha/albumid/PHOTOID?kind=photo&alt=rss) are missing…
#8 by Björn on May 23rd, 2007
Ok guys
I think i found it. Google actually only has 160pixel-thumbs while the plugin requested 80pixel…
So i changed this and think i got it working again.
If you are still having problems, look if you replaced the file “wp-includes/rss.php” correctly.
Your can check this by doing the following:
- remove the “//” in “wp-content/plugins/mPicasaIntegration/functions/functions.admin.php” at line 692 and 694
- now delete and renew the albums, delete all files in “wp-content/plugins/mPicasaIntegration/cache” and look if the page returns some image-urls while trying to create the thumbnails in the overview
- if you only see “ThbSrc()” instead of “ThbSrc(URL)” it may be that you have the wrong rss.php or the RSS-Cache(1 hour) still holds some out-dated google data
- you can also check this by temporarily disabling the cache in “wp-include/rss.php”. search for the “define(‘MAGPIE_CACHE_ON’, 1);” and change the line “define(‘MAGPIE_CACHE_ON’, 0);”
- after doing so renew the albums and delete all files in “wp-content/plugins/mPicasaIntegration/cache” again…
Hope this helps finding some problems. I’ll look how i can fix some more problems automatically…
#9 by icelander on May 24th, 2007
Hmm still something wrong.
Now I’ve got finally thmbs in cache but it’s other error
Warning: getimagesize() [function.getimagesize]: Read error! in /usr/home/i31626/public_html/icelander/wp-content/plugins/mPicasaIntegration/functions/functions.display.php on line 245
The same is also in line 35.
Keep going great work.
#10 by RaineWalker on May 29th, 2007
I’m getting the error:
Could not fetch the provided feed.
any clue?
#11 by Douglas Michaelson on June 5th, 2007
One quick question / comment…
Would it be possible to have an English and a German version of this plugin? Noted when there are multipul pages the links and text come up in German.
Thanks for everything!!!!
Doug Michaelson.
#12 by Björn on June 20th, 2007
@RaineWalker:
i got this error on some albums too while reimporting all my albums.
but after using “add all unknown albums” again, the missing albums were imported without error. maybe only some buggy buffer-handling…
@Doug:
sure. i’ll look into that…
@icelander:
did you delete all files in the {plugins/mPicasaIntegration/cache} directory before readding your albums?
#13 by Björn on June 24th, 2007
*updated recently*
#14 by Ross Griffiths on July 7th, 2007
Hi,
Can you tell me how to change the background colour of my album descriptions? My page is black but the backgrounds for the individual album descriptions are white. The text appears to be the default colour for the theme I’m using.
Thanks,
Ross
#15 by Björn on July 8th, 2007
Hi Ross,
this description is sourrounded by two divs
<div class=”mpialbumoverviewmeta”>
<div class=”mpialbumoverviewdescription”>
…description-text
</div>
</div>
So in your themes css file you can set this background color just by adding some css definition for one of these classes like this:
…
.mpialbumoverviewmeta {
background: #000000;
}
…
greetings
Björn
#16 by kiroro on August 1st, 2007
hi~ I just downloaded your plugin.
But I can’t make it work anyway.
when I press ‘ add the album manually’ or ‘add all unknown album’,it always show error message:
Fatal error: Cannot redeclare mkz_mpi_plugin_init() (previously declared in C:\public\blog\wp-content\plugins\mPicasaIntegration\mPicasaIntegration.php:75) in C:\public\blog\wp-content\plugins\mPicasaIntegration\mPicasaIntegration.php on line 104
what I did wrong?
#17 by David Eriksson on August 13th, 2007
I guess this isn’t a support forum but I have the same problems as kiroro. I use WordPress 2.1.2 on Ubuntu Linux 6.06.1
\David
#18 by chrispie on August 19th, 2007
DANKE DANKE UND NOCHMALS DANKE!
Ich habe etliche Stunden verschwendet um ein schönes Wordpress Plugin für Picasa zu finden. Fantastisch!!! VIELEN DANK!
genau dieses Plugin habe ich gesucht
#19 by David Eriksson on August 22nd, 2007
I got it working by not symlinking to the mPicasaIntegration directory…
“Add all unknown albums” does not work for me though, and I’ll have to get rid of some germain language text…
\David
#20 by Falko on October 3rd, 2007
Ich habe versucht, das Plugin zum Laufen zu bringen, doch leider erfolglos: http://hausbau.thompage.net/picasa-gallery/?album_id=25
Die Dateien Thumbs im Verzeichnis sind 0×0 Pixel groß´und auch Byte. Chmod ist auf 777.
Woran kann es liegen? Die Thumbs für das Album hat er vernünftig erstellt: http://hausbau.thompage.net/picasa-gallery/.
Über schnelle, konkrete Hilfe wäre ich sehr sehr glöücklich – Danke.
Gruß Falko
#21 by Doug Michaelson on October 19th, 2007
Bjorn,
I’m recieving this error:
WordPress database error: [Invalid default value for 'pubdate']
CREATE TABLE IF NOT EXISTS wp_mkz_mpi_comment ( id int(20) NOT NULL auto_increment, photo int(20) NOT NULL default 0, subject varchar(255) NOT NULL default ”, body text NOT NULL default ”, email varchar(255) NOT NULL default ”, name varchar(255) NOT NULL default ”, internet varchar(255) NOT NULL default ”, userip varchar(15) NOT NULL default ”, pubdate int(12) NOT NULL default ”, approved tinyint(1) NOT NULL default 1, PRIMARY KEY (id) );
WordPress database error: [Invalid default value for 'reqdate']
CREATE TABLE IF NOT EXISTS wp_mkz_mpi_comment_captcha ( id int(20) NOT NULL auto_increment, number varchar(4) NOT NULL default ‘0000′, userip varchar(15) NOT NULL default ‘0.0.0.0′, reqdate int(12) NOT NULL default ”, used tinyint(1) NOT NULL default 0, PRIMARY KEY (id) );
mPicasaIntegration: Adding column ’sort’ to the database … done
at the top of my admin pages. I have a fresh install of WP & a fresh download of the pluging any thoughts?
#22 by fiys on November 6th, 2007
My english is not good, excuse me for this. I´m using this plugin but i ve got a problem.
first: i would like that the albums list in two colums,or three,… how can i do this?
in my base the plugin don´t create “user.wp_mkz_mpi_comment”
very thanks for this. If you speak spanish… thanks
#23 by Aly on January 5th, 2008
Hey Björn
I need some help
This is the first time in months I’ve tried to add an album and found it didn’t work.
I then found you and followed your instructions… Unforutnately, it’s still not working.
When I try to add a new album it says “done but with errors on the page” but it didn’t do anything. Also when I click on the existing albums, it says “no album found”.
I’ve checked all my settings and they appear to be right… PLEASE can you help?
Kind regards Aly
#24 by Björn on July 3rd, 2008
*Update*
Fixed reading picasaweb’s feed… again ;o)