Антон Шевчук // Web-разработчик

Google Picasa on your site // Google

Google Photogallery Gadget

I created small JavaScript for view Photos from PicasaWeb, you can use it for your Google Pages Site or for any another site.
This javascript allows you to incorporate a “smoothgallery” slide show of photos generated from a picasa web album in your site.

Google Gadget

You can use “Google Photogallery” as gadget, use link:
http://photogallery.hohli.com/photogallery.xml

For configure gadget you need your Google Id and album alias, you can get it from URL:
http://picasaweb.google.com/116535900041679154752/DigitalPhotoRu/
In this example 116535900041679154752 – my Google Id, DigitalPhotoRu – alias for album Digital-photo.ru

Installation with out gadget

Step 1

For Google pages
Upload all files from archiv to Google pages.
Open ‘page editor’, click on link ‘edit html’ and past next code (you can see example in index.html):

<link rel="stylesheet" href="jd.gallery.css" type="text/css" media="screen" />
<script src="mootools.js" type="text/javascript"></script>
<script src="jd.gallery.js" type="text/javascript"></script>
<script src="picasa.gallery.js" type="text/javascript"></script>

For all another sites
Open HTML file in any editor (e.g. notepad) and paste next code beetwen tags ‘head’:

<link rel="stylesheet" href="css/jd.gallery.css" type="text/css" media="screen" />
<script src="scripts/mootools.js" type="text/javascript"></script>
<script src="scripts/jd.gallery.js" type="text/javascript"></script>
<script src="scripts/picasa.gallery.js" type="text/javascript"></script>

Step 2

Insert this is code… (change params ‘user’ and ‘album’):

<script type="text/javascript">
    var userid = 'AntonShevchuk';
    var album = 'DigitalPhotoRu';
    var maxres = 5; // 0 - for all;
    
    var url = 'http://picasaweb.google.com/data/feed/api/user/' + userid + '/album/' + album + '?kind=photo&alt=json-in-script&callback=renderer&access=public&start-index=1';
    
    if (maxres != 0) {
        url = url + '&max-results=' + maxres;
    }
    loadJS(url);
</script>

and this…:

<div id="myGallery"></div>

Download links

Download 0.1.3 Google Photogallery

© Антон Шевчук 2007-2017