wabson

New Additions to Share Extras

Blog Post created by wabson Employee on Apr 8, 2011
In the run-up to Alfresco's Kick Off event in Orlando at the end of March, I spent a bit of time adding some new items into Share Extras and tweaking some of the existing add-ons. Now with the presentation done and the slides up on SlideShare, I thought it would be useful to post a summary of some of the new additions, which bring the total number of add-ons to 19.



Site Geotagged Content Dashlet



The Site Geotagged Content dashlet embeds a map  display in the dashboard, with geotagged content marked on the map. Currently Google Maps  is used to render the map, based on the method used by the map dashlet  distributed with the Calais Integration forge project.







When I originally blogged about the 0.1 version of the dashlet, the map zoom was fixed in the code and the centre was auto-calculated as the mean of all the content item coordinates. Version 0.2 changed this, defaulting to a zoom level of 1 (the whole world) and allowing the user to change the zoom and centre using the map controls, but ensuring that the settings are saved in your user preferences.



So now you can change the view as needed, navigate to another page and then come back to the same map view on your dashboard. The bounds of the map are also now sent with the query to get the list of geotagged items, so even on sites with large numbers of geotagged items only items which will be visible on the map are returned.



Train Times Dashlet



The new Train Times dashlet displays train status information from the National Rail Enquires web site. It's designed to provide another example of a dashlet loading third-party data (similar to the existing BBC Weather dashlet), but also to demonstrate the use of a few of the more advanced YUI widgets such as DataTables and AutoComplete controls.







Data is loaded from the National Rail Enquiries web site as JSON, but the dashlet uses a second web-tier web script to act as a proxy, loading the data and performing some minor reformatting to better work with the YUI DataSource used by the client-side code.



As well as departure times the web service also provides details of any service disruptions reported at the selected station(s), which are displayed at the top of the dashlet.



Flickr Slideshow Dashlets



The Flickr Slideshow dashlets will display a slideshow  display of photostreams sourced from Flickr's public API. The dashlets  are able to display public photos from three types of feed.



  • User photos


  • User contacts photos


  • User favourite photos







The dashlets show how rich effects such as those provided by YUI's Animation module can be used to display images on the dashboard.



iCalendar Feed Dashlet



The new iCalendar Feed dashlet complements the RSS dashlet provided with Share, displaying upcoming events from any public iCalendar feed. The dashlet has been well-tested with the Alfresco Events feed, but it should also work with other public feeds such as those exposed by Google Calendar.







Wiki Rich Content Customisations



Hopefully a slight change from all these custom dashlets! The Wiki Rich Content add-on provides a number of customisations to the Alfresco Share  wiki component to improve it's visual appearance, and add support for  dynamic tables of contents and syntax-highlighted code using Google Code Prettify.







Node Browser Administration Console Component



This is the first example on Share Extras of an additional Admin Console component. The Node Browser component defines a Share administration console component to  navigate and view information on nodes stored in the repository stores,  similar to its namesake in Alfresco Explorer.







Document Geographic Details Component



Like the Site Geotagged Content dashlet, the Document Geographic Details component displays a map view, this one being designed to integrate into the Document Details page in Share's Document Library to show the location of that item on the map, when Latitude and Longitude values are available.







Define Your Own Projects





All of the add-ons I've mentioned in this post, along with a range of others, are available from the Share Extras project site. The aim of the project is to demonstrate how different types of Share extensions can be developed using scripting and templating, following best practices.



All of the dashlets and other add-ons can be downloaded from the site in JAR format and easily installed into an existing Share installation, so please grab a copy of any that you find interesting and let us know how you get on. For any problems that you find, please use the Issues section on the site.



But really the ultimate aim of the project is to inspire other contributors to come up with their own ideas for dashlets. To make this as easy as possible I've created a Sample Dashlet project, which bundles a few files from a basic Hello World dashlet in a basic structure that you can re-purpose to define your own dashlets. Kudos to Erik for the idea.



For now I'll be focusing myself as I get time on tidying up a few known issues with the existing 19 add-ons. But if you have a great idea for a dashlet or other add-on, please file an issue, use the sample project to get going with the implementation yourself, and consider contributing it to the project if you think others could benefit from it.



Erik Winlöf



Outcomes