Picasa Widget updated
Posted in Open Source, PHP, Programming, wordpress by sandaruwan on July 11th, 2007Edit : Latest update http://www.sandaru1.com/2008/04/04/wordpress-picasa-plugin/
I just updated the picasa widget. Thanks for the comments on the early version. Now, you can select the image size. Then, picasa username field get bit complicated.
If you want to use your whole picasa album you can just type your username. If you want only one album then you can put the album name within brackets(Without spaces). Here is an example : username(album).
If you want to get photos from more than one user, then type all usernames separated by space. You can even use brackets with the usernames.

Hey,
Nice update, tested it out, and it works well.
If you find time for the next update, maybe you can configure the widget so we can display multiple copies of your widget, like 2 or 3 random photos in a row. (I think you’ve done this on your site.)
The only catch is, it would be great if you could lock each one to a specific album.
Is this already possible?
July 12th, 2007 at 6:10 am
You can set the number of photos. Check the settings.
July 14th, 2007 at 3:58 pm
Hi,thanks for the updating.
Im using this widget on my page but i am finding some difficulties on make it work properly,after i activated i still receiving a warning on my page requiring to configure my widget first,but i can’t spot the error within the configuration.I copy below the edit of it,hoping you?l be able to give me some light and point to me where it is my mistake,
Thanks in advance.
July 15th, 2007 at 6:20 am
Sandaruwan,
I have multiple albums on my Picasa account, and only want photos from one album. I used the instructions for setting up the Picasa Widget in WP, and set my Picasa User using the example on this page. Still, the photos on my blog page appear from several difference albums on my Picasa account.
What am I doing wrong?
July 15th, 2007 at 1:22 pm
El Moreno,
You don’t have to change the code - Go to Presentation -> Widgets -> Click on Picasa Widget to configure it.
John,
Try setting your RSS-Delay to ‘0′. After you get it working, you can change that back to original value again.
July 15th, 2007 at 6:58 pm
if you list multiple photos, can you restrict each one to a different album and only that album?
not sure how to do this.
July 15th, 2007 at 8:09 pm
Hi Sandaruwan,
Thanks a lot for the plugin, works like a charm. I have a weird question though, don’t know if it’s an absurd one or not (i’m not a css/php/etc.-savvy
: is there an “easy” way of including an icon next to the widget title? i searched around and saw most widgets don’t have this option, although, for example, putting a Picasa icon next to the title could be fun.
Thanks in advance,
July 24th, 2007 at 10:15 am
U’r Plug ini is nice, but i cannot configure it well,
would mine to give me a complete example ?
thanks before
July 27th, 2007 at 11:12 pm
forget my last question, sory i am just a beginner :).
after i set username to my gmail account, your code still cannot display my photos.
i use wordpress 2.2 on my page
July 28th, 2007 at 2:47 am
I hate to post a “me too”, but I would love to be able restrict the randomness to one album also.
July 28th, 2007 at 4:40 pm
David,
There is no way I can tell you what’s wrong with your configuration just by the information you are given. May be you can tell me what you entered, etc. BTW, make sure you don’t use “@gmail.com” part.
Topher,
Read the second passage of this post.
Thanks.
July 28th, 2007 at 10:06 pm
Hello,
I would like to enjoy your widget but it doesn’t work on ma page.
I have configured the widget, put the rss delay at 0, given my account without the @gmail.com but I only see on my page the logo with the red cross and when I click on it, it links to my homepage not to picassa.
Could you help me? I’m “furious” at seeing it on your pages and not on mine ;-))))
Thanks a lot
Dom
August 11th, 2007 at 1:26 pm
Hi Sandaruwan,
Thanks for taking the time to build this great widget! I’ve installed it on the home page of my blog and it works beautifully.
I downloaded and tried the five most popular Picasa widgets on Wordpress.org and yours is the best.
Cheers,
Clint
August 21st, 2007 at 5:39 pm
To everyone who asked about restricting the randomness to one album:
I’ve done something similar, if not exactly the same. I’ve hacked my installation to just turn the randomness off for now, the result being that the widget always displays the first X pics from my most recent gallery. Makes it more like a Flickr badge.
I replaced this one line of code:
$selected = $photos[rand(0,count($photos)-1)];
with this one:
$selected = $photos[$i];
Hope someone finds it helpful.
Cheers,
Clint
August 21st, 2007 at 6:07 pm
Cool stuff. Thanks!
August 22nd, 2007 at 7:52 am
Clint,
I am very sorry to bother you with this. I have installed your widget as instructed above (without @gmail.com, etc.) and no images are displaying. I made sure that the folder that I was to view is public. If you have any ideas based on what you can see from the code in the web page included in this form, I’d really appreciate it.
Best,
Bill
August 23rd, 2007 at 11:03 pm
Clint,
Please ignore last post. I just exited the Picasa desktop application, and lo-and-behold, it works!! Sorry to bother you and, again, thank you for this great widget.
Bill
August 23rd, 2007 at 11:05 pm
Is it possible to use that plugin without widgets?
August 26th, 2007 at 12:42 pm
Hey. Great Widget! Very simple to use, and it works great! If you want my thoughts for an updated version in the future, maybe some settings to change simple border settings would be nice. But well done, Thanks!
August 27th, 2007 at 10:06 am
The widget is great - good work.
My picassa account has a dot “.” between first last name. Even when I made one album public it displayed pictures from unknown albums / users to me.
Any ideas? I’ using WP2.2.
Thanks!
September 4th, 2007 at 12:18 pm
Hello Kostas,
Can you give me your web site url? or can you post the output of the widget? I can’t really guess anything without looking at the output.
- Sandaruwan
September 5th, 2007 at 9:51 am
Hi Sandaruwan,
Congratulations! It’s a great plugin. Work very well. I would like to know if is it possible to use that plugin without widgets?
Tanks,
Bruno
September 19th, 2007 at 8:17 pm
Hello Bruno,
Thanks. It’s not possible to use the plugin alone without code changes. However, if you know little PHP coding you can easily use the code. Since you are going to use it yourself you can get rid of the admin section and hard code the settings into the code.
- Sandaruwan
September 20th, 2007 at 7:58 am
[...] inte direkt för att börja använda många olika tjänster, därför var det skönt att hitta ett plugin som hämtar bilder från Picasa och låter dem presenteras där man vill ha dem på sin blog. Perfekt, förutom att programmet inte [...]
October 25th, 2007 at 1:38 am
hey,
thank you for this plugin. i tried many and this is the only one that really works!
October 26th, 2007 at 4:33 am
Hey Sandaruwan,
first of all great plugin and widget. The only problem I have is that I suddenly cannot open the option panel to configurate the plugin.
I deactivate all other plugins to check if that could be the reason but still the same problem.
I also upgrade this weekend to WP 2.3 but it still doesn’t open. All other plugins are opening, except another widget “top-commentator widget” it has the same problem.
I checked the source code of the widget page and found this
All other widgets have in the source code
style=”-moz-user-select: none;”
but your widget and the picasa one have
style=”-moz-user-select: none; display: block; position: relative;”
Do you know what can be the reason?
I’m using 2.3 but this happened in 2.2.3 too, the upgrade didn’t help, as I hoped to be
I really appreciate your help
Alex
November 4th, 2007 at 4:33 am
Sorry Sandaruwan,
I also recognized that the code also failed the validation.
In line 89 you had
\”target=\”_blank\” rel=”nofollow”>
November 4th, 2007 at 8:41 pm
Hello Alex,
It’s quite strange this happened. This has never happened before.
Do you think it’s a problem with CSS?
November 4th, 2007 at 8:55 pm
I don’t know, maybe. I also changed the code to make it valid from \”target=\”_blank\” rel=”nofollow”> to \target=\_blank\ rel=nofollow> but still doesn’t work.
Don’t know what the reason can be, any clue?
Thanks
Alex
November 4th, 2007 at 11:29 pm
Alex,
It can be caused by many problems. Most probably your problem is with CSS. I can’t really tell without looking at it.
November 4th, 2007 at 11:41 pm
I checked your code and the were some errors when I tried to check the validation. If you want I’ll send you the changes to be more valid. How can I put code in this comment form. Or send me an email to me and I will send it to you.
Thanks
Alex
November 5th, 2007 at 1:38 am
Is it possible to have a height and width on the pics in the code, depending if it’s horizontal or vertical. Right now the pics don’t have any height or width in the code, which would be also helpful fo r validation of the code.
thanks
Alex
November 6th, 2007 at 8:31 am
Alex,
The heights and widths vary from image to image. So, if you want to width and height, then you’ll have to use gd functions, which adds dependencies to the plugin.
Anyway, the validation couldn’t be the cause of your problem.
November 6th, 2007 at 8:48 am
thank you Sandaruwan, it wouldn’t be a validation problem, but would be a cleaner code.
But it’s not too important, just thought if it’s an easy thing to add, it would be nice.
Thanks
Alex
November 8th, 2007 at 6:39 am
Alex,
Thanks for the info. I’ll put that in the list for a future release
November 8th, 2007 at 8:24 am
Hello,
First of all thanks for providing a great widget! One thing tho, it is possible to change the dimensions of the pictures displayed on my blog? Could do with the pics being a little bit bigger, and the size options provided aren’t quite accurate enough. Cheers,
George
November 12th, 2007 at 10:16 am
George,
Those sizes are the options given by Picasa. It would be possible to resize the image using HTML parameters, but those would not be in good quality.
~ Sandaruwan
November 12th, 2007 at 10:37 am
So if I just grab the PHP code for the plugin I could probably hard code it into my theme somewhere right? The theme isn’t widget-ready yet.
:: efrain
November 13th, 2007 at 7:52 am
[...] to easy put some of those images I upload to picasaweb on this site. Today I found a plugin, which seems nice - I will try this out one of these [...]
November 13th, 2007 at 12:34 pm
Great plugin. Thanks.
If you are showing two or three photos with the plug-in, is there any chance that both, or two out of three will show the same photo? I think I saw this once when I was trying it out, but reloaded the page before taking a hard look at the two to tell if they were the same or just very similar. It may just be a rare coincidence, but it would be great if the plug-in prevented this from ever happening.
Thanks again.
November 20th, 2007 at 9:36 pm
Hello Brock,
Yes, it may show the same photo twice. Thank you for the suggestion, i’ll surely put that on my list
Regards,
Sandaruwan.
November 21st, 2007 at 10:29 pm
Hey Sandaruwan,
Excellent plugin that you’ve created. But is there a way to have the widget display more than one album picture at a time? and each album picture from a different user account?
I’m asking because my blog has multiple users and I’m looking for a way to display their albums on the sidebar using your widget.
Thanks in advance,
Gianne
December 3rd, 2007 at 12:08 pm
You can set the number of photos from the widget menu and type in all usernames separated by spaces. It’ll fetch photos from all those users’ albums and display those randomly. However, you can’t force each photo only displays photos from one user.
December 3rd, 2007 at 12:17 pm
[...] Picasa Photos – plugin care prin wiget iţi arată aliatoriu una sau mai multe fotografi din albumul tău foto oferit gratis de către google. [...]
December 3rd, 2007 at 9:33 pm
hey sandaruwan,
thanks for the quick reply. i pretty much figured… should have read the previous posts before asking so ignorantly. haha, works like a charm now.
thanks again,
gianne
December 4th, 2007 at 11:46 pm
[...] SolarCrash RSS - If you liked that, generates random links to related posts under each post - Picasa Photos, displays random photos on the sidebar from Picasa Web Albums - Subscribe to Comments, this one is [...]
December 11th, 2007 at 9:44 pm
[...] XML sitemaps con este plugin creamos un “mapa del sitio” compatible con wordpress. Picasa Photos coloca fotos del álbumes de picasa y los presenta aleatoriamente. Respaldo de base de datos de [...]
December 30th, 2007 at 3:31 am
[...] с уърдпресата стана много лесно, благодарение на Picasa Widget. Работи [...]
January 2nd, 2008 at 2:24 am
I’ll just add my kudos by saying “Great widget Sandaruwan!” I just tested out several other Picasa widgest/plugins and yours is the best of bunch - simply because yours actually randomizes pictures from multiple albums at once. The others I tested provided random pictures from a single album at one time.
However, like some others I see, I cannot force the widget to grab pics from only one album. If I add the album name to my Picasa username (as you state in your directions) nothing changes - it still randomly selects from multiple albums.
I have tried setting the RSS feed to 0 as suggested, but it has no affect.
The exact syntax I am using is: bwestbrook(OurAnniversaryTattoos)
While I like your widget best because of the random album pics, I would like the ability to pick a single album for my wife’s blog.
Any thoughts on what I’m doing wrong here?
January 4th, 2008 at 1:58 am
Sorry but can’t get it to work.
I am using 2.1 but the widget function does not come available when I go to Presentation…
January 17th, 2008 at 9:24 pm
thanks a lot, updated wordpress and got it to work
January 18th, 2008 at 10:55 am
thank’s great plugin, i am using wp 2.3.2 and work.
January 21st, 2008 at 4:54 pm
Is there a way to position the title above the image?
Thanks
January 28th, 2008 at 2:52 am
Or to format the title?
January 28th, 2008 at 3:24 am
[...] Picasa Photos Pick photos from picasa album and display them randomly By Sandaruwan Gunathilake. [...]
January 28th, 2008 at 8:36 am
Marquis, change the line 89 to this :
$str.=”<p style=\”text-align:center\”><a href=\”$selected[link]\” rel=”nofollow”>$selected[title]<br/><img border=\”0\” src=\”$photo\” alt=\”$selected[title]\”/></a></p>”;
January 28th, 2008 at 9:34 am
For some reason, picasa widget only displays the pics from the first album I created. I don’t know why, because there’s only my username in the config - I did not specify any album.
Any hint?
February 2nd, 2008 at 8:29 am
Check whether your albums are public - RSS feed only gives the public albums
February 2nd, 2008 at 1:27 pm
I checked that too, they are public… Still puzzled…
Where can I check the rss list that plugin downloaded?
February 2nd, 2008 at 5:27 pm
hello… i just downloaded the picasa widget to my mac, and when i opened the file it opened up in Dreamweaver…??? i am not sure what to do with that, how do i get it to be on my Wordpress blog page??
help please…
February 2nd, 2008 at 7:22 pm
Ivan, In picasa.php, picasa_get_photo function, put a
print_r($photos);
after line 79, which is $photos = (array) get_option…..
Carla, You have to upload the file to your web server’s “/wp-content/plugins/” directory. Then login to wordpress admin console and activate the plugin, then configure it.
February 2nd, 2008 at 7:54 pm
Still didn’t work. This only printed all photo names in that particular album, but ignored all other photographs.
I don’t know how exactly this widget works, I know it has to do with RSS. Well, my site is now using feedburner as a RSS and I have a feedburner plugin. When I installed my first album I used the built-in RSS feed for Wordpress, not FB.
Does this make any sense to you?
Thanks.
February 2nd, 2008 at 11:17 pm
It has nothing to do with wordpress RSS feed. It’s taking photos from picasa RSS feed.
May be you can try setting “rss delay” to “0″. It will download the photo information from picasa again then.
The RSS results are cached, and re-downloaded according to the delay. Make sure you reset “rss delay” to larger value after that, otherwise it’ll download RSS feeds from picasa each time the page is views, which will make the page loading very slow.
February 2nd, 2008 at 11:31 pm
Hi!
I’ve tried your plug in, but it didn’t work to me. I have Wordpress 2.3 and my Picasa Web Album address is this: http://picasaweb.google.com/julio.anguita
May be the period between name and last name is bothering, isn’t it?
I’ve been using this in the Widget as follows:
Picasa username: julio.anguita(FamiliaMiSobrinaMathilde)
Is that OK? Is my syntax all right?
Thank you very much and good job with that plug in!
Cordially,
Julio Anguita
Buenos Aires, Argentina
February 12th, 2008 at 5:12 am
Hi there, i love this plug in but for some reason it’s not working. When I had my original site it worked fine and I had to wipe it out and start clean. I downloaded and activated the plugin and put in my username for picasa - littlemustard but still no pics. If you look on my site you can see it is xxxx where the pics should be. Please let meknow if you have any idea why. Thanks! Beth
February 12th, 2008 at 5:29 am
Beth,
I tried your site, but it was a text widget with your picasa address.
Julio,
Try julio.anguita(Familia - Mi sobrina Mathilde). Make sure you change the RSS Delay to 0, when changing.
I’m going to fix some bugs and do a new release this weekend, anyway. I hope it’ll make configuration much easier.
~ Sandaruwan.
February 12th, 2008 at 10:20 am
I installed your plugin. Great, I just love it. But last week I added a whole new album http://picasaweb.google.com/SasaGercar/StareSkeniraneFotke and since than I’m desperately waiting when any of those photos would appear on my blog. Nothing up till now
What do I need to do in order random choose will come up to this album as well … and later on also some new ones?
February 12th, 2008 at 4:38 pm
Hey! Your widget looks promising, and it’s not giving me errors like the other 3 I’ve tried. But it’s not showing the pictures.
URL: http://www.oxnardtroop228.org/wordpress/
I’ve installed the widget sidebar plugin, and I’m using WP 2.0.5. My username for picasa is oxnardtroop228.
Any idea why it’s not working?
February 14th, 2008 at 6:59 am
Saska,
It should show up the photos after the number of days in RSS delay. You can set it low if you want.
Steven R,
I checked your site. Unfortunately, there is nothing much I can do without debugging. However, I think it might be because of the old wordpress version. It’ll be a good idea to upgrade.
~ Sandaruwan.
February 14th, 2008 at 12:11 pm
Sandaruwan; First I had it empty and since nothing happened 3 days after I uploaded new album, I put a number 1 in the box of number of days. Nothing again. Now I changed plugin and it works but I preffer yours. It takes photos randomly and widget is more user frendly …but …
February 14th, 2008 at 10:27 pm
Huh? That is wierd. The website is: http://www.beersandbeans.com is that where you looked? Whenever i look it up it works just fine. I got a different picase plug in to work on the pages (there is a teston the home page now) but I still can’t get your widget to work. Can you double check? Thanks again! Beth
February 15th, 2008 at 8:35 am
There an error into the second request (rss url fetch).
Remove “&alt=rss” from:
$rss2 = fetch_rss(str_replace(”entry”,”feed”,$item['guid']).”&kind=photo&alt=rss”);
write only (alt=rss is alredy added in the guid):
$rss2 = fetch_rss(str_replace(”entry”,”feed”,$item['guid']).”&kind=photo”);
This work great for me:
http://www.borgossina.it
Simohack
March 4th, 2008 at 8:50 pm
[...] Picasa Wordpress widget - Wordpress plugin allows users to publish random photos from then Picasa album. [...]
March 21st, 2008 at 1:52 pm
[...] Picasa wordpress widget is a wordpress plugin which allows users to publish random photos from picasa albums on their blogs. [...]
March 24th, 2008 at 11:25 am
[...] Picasa wordpress widget is a wordpress plugin which allows users to publish random photos from picasa albums on their blogs. [...]
March 24th, 2008 at 11:30 am
Relay great widget! Thanks for your work!
But, hove can I modify this to only display the photo then clicking, not open the picasa web page.
Just a link to the photo…
Thanks! Henrik
March 27th, 2008 at 8:38 pm
Hi, I’ve installed the plugin after upgrading to wordpress 2.5 and its not working. Any idea??
March 30th, 2008 at 10:11 pm
@Simohack - your code suggestion worked great. Before removing “&alt=rss” I wasn’t seeing any photos.
Thanks!
March 31st, 2008 at 3:22 am
Blamsa,
Did you get any error messages? I tested the plugin after wordpress 2.5, and works fine.
~ Sandaruwan
March 31st, 2008 at 6:06 pm
@bryanc - Thanks, it’s good.
Sandaruwan, have you updated the plugin with my info on xml url?
April 21st, 2008 at 9:18 pm
Simohack, yes thanks.
April 22nd, 2008 at 11:54 pm
[...] Сайт [...]
July 7th, 2008 at 10:13 pm
[...] Picasa Photos - I think the Picasa Photos look great compared to the Flickr Photos when they display on the sidebar, several options are available. [...]
July 20th, 2008 at 11:13 am