Posts tagged ‘picasaweb’

Picasa web album slideshow – Development guide

I was looking for a application to embed slideshow using pictures from picase web album. I found some plugins which can be used in blog or myspace. Some of them uses the picasa slide show url opened in a iframe or div. Then you will have less control on the slideshow as it is controlled by the slideshow application of picasa. But I required more control on the images from picasa.

I was looking for some application which will fetch/store all the images for an album in picasa and create a slideshow with more control on the images. I found nothing thats suites my requirement. So I started to design an application of such kind. On the basis of functionality I sub devided it into two major part. First is fetch the image related information for an album and store it if required. Second is display the slideshow using those image information.

In picasa you can view the pictures as set or individual but you won’t get actual picture name or its location. So I found now simple way to get the pictures name and their location. While searching more for such option I found there is a RSS feed for each album. The RSS feed provides image names and its location details. It makes my job easier. Now objective became to process the RSS feed to get the image related information. For this purpose I used XML-RSS package from PEAR. Here is snapshot of the code I wrote to process the feed:

[code lang=”php”]
parse();
$rssArray = $rss->getStructure();
$PicasaDataArray = array();
$InfoArray = array();
for($C=0; $C $rssArray[$C][‘title’],
‘image’ => $rssArray[$C][‘enclosures’][0][‘url’],
‘link’ => $rssArray[$C][‘link’],
‘description’ => $rssArray[$C][‘description’],
);
}
elseif($rssArray[$C][‘type’] == ‘image’)
{
$AlbumTitle = $rssArray[$C][‘title’];
$AlbumPicture = $rssArray[$C][‘url’];
$CreateDate = $MetaInfo[‘lastbuilddate’];
}
}
// this $PicasaDataArray contains all the picture related information of an album from picasa web.
?>
[/code]

Continue reading ‘Picasa web album slideshow – Development guide’ »