Grails Picasa Plug-in
Dependency :
compile ":picasa:0.6.6"
Summary
Installation
Installation
Install Command
To install the Grails Picasa plug-in type in this command in your project's root folder:grails install-plugin picasa
Upgrading from an earlier release
There shouldn't be any issues upgrading from an earlier release.Configuration
Before running your application with the Picasa plug-in, make sure you perform the following configuration steps.URL Mappings
Once installed your new contact form will be available at the following URL:http://{HOSTNAME}:{PORT}/{APPLICATION-NAME}/picasa"/album/list/feed/$feed" { controller = "album" action = "list" }"/photo/list/$albumId" { controller = "photo" action = "list" }"/photo/list/$albumId/feed/$feed" { controller = "photo" action = "list" }"/photo/ajaxList/$albumId" { controller = "photo" action = "ajaxList" }"/photo/ajaxList/$albumId/feed/$feed" { controller = "photo" action = "ajaxList" }"/photo/show/$albumId/$photoId" { controller = "photo" action = "show" }"/photo/ajaxShow/$albumId/$photoId" { controller = "photo" action = "ajaxShow" }"/tag/show/$id/feed/$feed" { controller = "tag" action = "show" }"/tag/list/feed/$feed" { controller = "tag" action = "list" }"/comment/list/$albumId/$photoId" { controller = "comment" action = "list" }"/comment/ajaxList/$albumId/$photoId" { controller = "comment" action = "ajaxList" }"/comment/list/$albumId/$photoId/feed/$feed" { controller = "comment" action = "list" }"/comment/ajaxList/$albumId/$photoId/feed/$feed" { controller = "comment" action = "ajaxList" }"/comment/list/feed/$feed" { controller = "comment" action = "list" }"/comment/ajaxList/feed/$feed" { controller = "comment" action = "ajaxList" }
Picasa configuration
The next step is to provide the Picasa plug-in your Google Picasa web album account details, and the Google Picasa OAuth URLs. These details should be inserted into the grails-app/conf/Config.groovy file. The following shows an example Picasa configuration block:picasa {
// Required
username = "joe.bloggs@gmail.com"
password = "password"
imgmax = 800
thumbsize = 72
maxResults = 500 // Optional
max = 10
maxSteps = 5
maxKeywords = 100
maxComments = 10
maxCommentSteps = 5
showPrivateAlbums = false
showPrivatePhotos = false
allowComments = true
allowCache = true
cacheTimeout = 86400000
backgroundRetrieveLimit = 5
useGridListing = false // Feeds
rssManagingEditor = "Joe Bloggs" // Google Maps
maps {
width = 250
height = 250
zoom = 14
}
}oauth {
picasa {
requestTokenUrl = "https://www.google.com/accounts/OAuthGetRequestToken"
accessTokenUrl = "https://www.google.com/accounts/OAuthGetAccessToken"
authUrl = "https://www.google.com/accounts/OAuthAuthorizeToken?hd=default"
scope = "http://picasaweb.google.com/data/feed/api/"
consumer.key = "anonymous"
consumer.secret = "anonymous"
signed = true
}
}Configuration properties
- username - Your Google Picasa web album username.
- password - Your Google Picasa web album password.
- imgmax - The maximum width of each photo viewed through the photo controller.
- thumbsize - The maximum width of each album's and photo's thumbnail.
- maxResults - The maximum number of results to be returned when performing queries. This is used when making requests through the tag controller.
- max - The maximum number of listing displayed per page.
- maxSteps - The maximum number of steps displayed in the pagination block.
- maxKeywords - The maximum number of keywords displayed in the tag listing result set.
- maxComments - The maximum number of comments displayed in the show photo view.
- maxCommentSteps - The maximum number of steps displayed in the comment pagination block.
- showPrivateAlbums - Whether to include private albums in all album requests.
- showPrivatePhotos - Whether to include private photos in all photo requests.
- allowComments - Allow users to post photo comments.
- allowCache - Stores locally the responses returned from the Google Picasa web service. Reduces web service calls to the Google GData API and increases performance.
- cacheTimeout - How long the cache is valid before being purged.
- backgroundRetrieveLimit - Used by the background thread to limit the number of previous and subsequent photos retrieved.
- useGridListing - By default, display albums and photos using a grid layout.
- rssManagingEditor - Name of author managing the RSS feed.
- maps.width = Width of the Google Maps tiles used when showing photo / album GEO locations.
- maps.height = Height of the Google Maps tiles used when showing photo / album GEO locations.
- maps.zoom = Zoom of the Google Maps tiles used when showing photo / album GEO locations.
Note: The properties imgmax and thumbsize are subject to a valid set of values detailed by the API's reference guide.
Further Documentation
The picasa plug-in is driven through the Google Picasa Web Album API. For additional configuration and feature information please refer to the following documentation:- http://picasaweb.google.co.uk
- http://code.google.com/apis/picasaweb/overview.html
- http://code.google.com/apis/picasaweb/docs/2.0/reference.html#Parameters
- http://oauth.net
- http://code.google.com/apis/gdata/docs/auth/oauth.html
- http://www.grails.org/plugin/oauth
Contribute
If you wish to contribute to the project you can find the latest source code on GitHub:Description
Description
A simple plug-in which provides a photo gallery driven through the Google Picasa Web Album API.The plug-in only requires the user's Google Picasa account credentials which will instantly pull down all the available public albums and photos and display the relevant listings. The views are also generate from the "remote-forms" skin provided by the Grails Skin Loader plug-in. This will scaffold Ajax based forms which provides a smoother experience when traversing through an album.The views don't contain any JavaScript visual effects allowing the developer to integrate their own effects as required.If you find any issues, please submit a bug on JIRA: http://jira.codehaus.org/browse/GRAILSPLUGINSPlease look at the CHANGES file to see what has changed since the last official release.Configuration
The following shows an example Picasa configuration block which should be inserted into the grails-app/conf/Config.groovy file:picasa {
// Required
username = "joe.bloggs@gmail.com"
password = "password"
imgmax = 800
thumbsize = 72
maxResults = 500 // Optional
max = 10
maxSteps = 5
maxKeywords = 100
maxComments = 10
maxCommentSteps = 5
showPrivateAlbums = false
showPrivatePhotos = false
allowComments = true
allowCache = true
cacheTimeout = 86400000
backgroundRetrieveLimit = 5
useGridListing = false // Feeds
rssManagingEditor = "Joe Bloggs" // Google Maps
maps {
width = 250
height = 250
zoom = 14
}
}oauth {
picasa {
requestTokenUrl = "https://www.google.com/accounts/OAuthGetRequestToken"
accessTokenUrl = "https://www.google.com/accounts/OAuthGetAccessToken"
authUrl = "https://www.google.com/accounts/OAuthAuthorizeToken?hd=default"
scope = "http://picasaweb.google.com/data/feed/api/"
consumer.key = "anonymous"
consumer.secret = "anonymous"
signed = true
}
}Note: The properties imgmax and thumbsize are subject to a valid set of values detailed by the API's reference guide.For more detailed configuration please view the installation tab.