Plugin Gadgets


Plugin Gadgets
Extension to add Open Social, UWA or iframe gadgets
to your pages

Authors

Anyware Services

Most recent version

1.1.0

Tracking issues

https://issues.ametys.org/browse/GADGETS

Download

Lastest version 

  1. Presentation
  2. Screenshots

Presentation


This plug-in provides services to add Web widgets, such as iGoogle or Netvibes gadgets, to your pages.

This plug-in use the open source project Shindig which provides an implementation of OpenSocial standard to render the gadgets.

This plug-in supports Open social and UWA gadgets. It also allows to add RSS feeds or HTML pages into a gadget.

Screenshots

User manual

Gadgets' library

Your application defines a list of gadget's available for contributors and visitors.
See to see how to create a gadgets' library.

Add a pre-set gadget

Go to Add service menu to add the "Gadget" service.

This service allows you to insert in your page a gadget whose settings (user preferences) are set by the contributor.

In service settings, choose gadget to add among the library of gadgets, and fill the settings required by the selected gadget.

Service's parameters

Parameters

Description

Mandatory

Title

The service title.
Leave empty if you do not want any title.

no

Gadget

Select the gadget to insert. The available gadgets are those defined in your library of gadgets.
The list depends on your application.

yes

Gadget settings

The settings required by the selected gadget.
These settings depends on the chosen gadget.

yes

Width

The width of gadget corresponding to the i-frame width.

yes

Height

The height of gadget corresponding to the iframe height.

yes

Display

Select the view to use for the service rendering.

yes

Sample of rendering : weather of London city

Add a gadgets' container

Go to Add service menu to add the "Gadgets' container" service.

This service allows you to insert a "free zone" in your page so that visitors can add gadgets of their choice.

Service's parameters

Parameters

Description

Mandatory

Title

The service title.
Leave empty if you do not want any title.

no

Columns

Number of columns used for the gadgets' layout

yes

Max number of gadgets

The maximum of authorized gadgets in container.
Leave empty for no limitation

no

Allow drag&drop

Check the box to allow visitors to move gadgets' position by drag&drop

no

Allow deletion

Check the box to allow visitors to remove gadgets.

no

Allow toggle

Check the box to allow visitors to toggle gadgets.

no

Allow free insertion

Check the box to allow visitors to add their own gadgets, not necessary from the gadgets' library.

no

Service id

This field is used to link or separate instances of this service.
Examples:

  • if you want to insert this service twice in same page and each service has its own gadgets, use this field with two different identifiers.
  • if you want to insert this service on two different locations but want these two areas share the same gadgets, use this field with the same identifier for the 2 services.

no

Display

Select the view to use for the service rendering.

yes

Service's rendering

Sample of gadget's library

Visitors choose the gadgets to add among those defined in gadget's library.

If free insertion was allowed in service's settings, visitors can add his own gadget specifying the gadget URL.

Sample of gadgets' layout with two columns

Samples of gadgets' settings (user preferences)

If gadget has user preferences, visitor can edit his own preferences by clicking on configure button on top bar of the gadget.

The settings are saved for the visitor next visit.

Move gadgets by drag&drop

If drag & drop was allowed in service's settings, visitor can modified gadget position by drag & drop.

Download and Installation

Download

Installation

  • Add the plug-in JAR in the WEB-INF/lib directory of your Ametys application
  • Download this zip file, and extract the librairies in the WEB-INF/lib directory of your Ametys application
  • The gadgets plugin also depends on javax.el package. Depending on your servlet engine, it may or may not be included by default (if you are using Tomcat it should be ok).
  • Defines the gadgets' library in WEB-INF/param/gadgets.xml file (See )
  • Restart the server

Integration

Gadgets library

You need to define your own library of gadgets you want to provide to your visitors and contributors.

The gadgets' library is defined in the WEB-INF/param/gadgets.xml file of your application.
The gadgets are grouped by categories.

The i18n values are in the file WEB-INF\i18n\application.xml

For each gadget you need to give the Open Social or UWA url definition, or the HTML url of your own gadget, or the url of a RSS feed

  • for UWA gadget add the attribute type="UWA"
  • for your own iframe gadget add the attribute type="HTML"

    <gadget url="http://localhost:8080/samplecontainer/iframe.html" type="HTML"/>
    
  • for RSS feed add the attribute type="RSS"

    <gadget url="http://www.nytimes.com/services/xml/rss/nyt/GlobalBusiness.xml" type="RSS"/>
    

Sample of library :

<library>
	<group>
   	    <label i18n="true">application:GADGETS_GROUP_OFFICE_TOOLS</label>
   	    <gadget url="http://www.google.com/ig/modules/dictionary.xml"/>
	    <gadget url="http://bbs.cnnas.com/igoogle/datetimemulti.xml"/>
	    <gadget url="http://www.labpixies.com/campaigns/converter/converter.xml"/>
	    <gadget url="http://www.netvibes.com/modules/multipleFeeds/multipleFeeds.php?provider=ft_india" type="UWA"/>
   	</group>

   	<group>
   	    <label i18n="true">application:GADGETS_GROUP_GAMES</label>
   	    <gadget url="http://www.google.com/ig/modules/horoscope.xml"/>
	    <gadget url="http://hosting.gmodules.com/ig/gadgets/file/102462998830435293579/dradio.xml"/>
	    <gadget url="http://throttled.org/googlegadgets/youtubesearch.xml"/>
	    <gadget url="http://hosting.gmodules.com/ig/gadgets/file/117375892785445698801/flickr-photos-search.xml"/>
	    <gadget url="http://hosting.gmodules.com/ig/gadgets/file/100080069921643878012/facebook.xml"/>
	    <gadget url="http://www.labpixies.com/campaigns/trio/trio.xml"/>
	    <gadget url="http://www.programme.tv/webmaster/google/tv.xml"/>
   	</group>

   	<group>
   	    <label i18n="true">application:GADGETS_GROUP_NEWS</label>
   	    <gadget url="http://bbcnewsgadget.googlecode.com/svn/trunk/Gadget/bbc_igoogle_ukedition12.xml"/>
	    <gadget url="http://hosting.gmodules.com/ig/gadgets/file/116551734240963456629/cnn-tech.xml"/>
	    <gadget url="http://www.weatheronline.co.uk/rss/igoogle"/>
	    <gadget url="http://widget.pagesjaunes.fr/uwa/index.html" type="UWA"/>
	    <gadget url="http://localhost:8080/samplecontainer/iframe.html" type="HTML"/>
	    <gadget url="http://www.netvibes.com/modules/multipleFeeds/multipleFeeds.php?provider=lefigaro" type="UWA"/>
            <gadget url="http://www.nytimes.com/services/xml/rss/nyt/GlobalBusiness.xml" type="RSS"/>
   	</group>
</library>

If you changed the library, the server must be re-started.

UWA Gadgets

Now there are 3 ways to handle height for UWA gadgets (in WEB-INF/param/gadgets.xml file):

  • Dynamic: This can not work for some gadgets.

    <gadget url="http://www.voyages-sncf.com/design/daily/deals/widget/uwa/expbooking/uwa_expbooking.html" type="UWA" dynamic_height="true"/>
    
  • Fixed: To use if you know the gadget width.

    <gadget url="http://www.voyages-sncf.com/design/daily/deals/widget/uwa/expbooking/uwa_expbooking.html" type="UWA" height="270"/>
    
  • Default

    <gadget url="http://www.voyages-sncf.com/design/daily/deals/widget/uwa/expbooking/uwa_expbooking.html" type="UWA"/>
    

I-frame gadget of your own

You can define your own gadget : a such gadget consist of a XHTML page, accessible by http:// protocol, and started with <?xml version="1.0" encoding="UTF-8"?>

The page must contains <title> and the following <meta> tags for describing the gadget :

  • title : the widget's title
  • description : a optional description of the widget
  • thumbnail : used for library
  • height : the preferred height in pixel for displaying widget
  • author : the author of the widget
  • author_email : the email of the author
  • screenshot : a optional screenshot of the widget

Sample of i-frame gadget :

<?xml version="1.0" encoding="UTF-8"?>
<html>
   <head>
	<title>Ametys Smart Web CMS</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta content="A simple gadget provided by Anyware Services" name="description"/>
	<meta content="Anyware Services" name="author"/>
	<meta content="250" name="height"/>
	<meta content="support@anyware-services.com" name="author_email"/>
	<meta content="http://localhost:8080/samplecontainer/ametys.jpg" name="screenshot"/>
	<meta content="http://localhost:8080/samplecontainer/ametys.jpg" name="thumbnail"/>

	<style>
        body {
          font-size: 11px;
          font-family: Arial,Helvetica,sans-serif;
        }
	h1 {color: #812281;}
	</style>
    </head>
    <body>
        <h1>Ametys Smart Web CMS</h1>
	<img src="ametys.png" style="float:left; margin-right: 10px"/>
        <p>Ametys is an open source project distributed under the Apache open source license.
        The developers and users community has a set of tools allowing them to contribute to the project</p>
        <ul>
           <li>If you have any questions, go and ask the community on <a target="blank" href="http://www.ametys.org/forum">forum</a> (in french)</li>
           <li>The <a target="blank" href="https://wiki.ametys.org">Wiki</a> stores documentations and initiatives related to Ametys</li>
           <li><a target="blank" href="https://issues.ametys.org/secure/Dashboard.jspa">JIRA</a> allows issues and suggestions gathering and tracking</li>
        </ul>
        <p>All this information and other on <a target="blank" href="http://www.ametys.org">www.ametys.org</a>.</p>
    </body>
</html>
  • Gadget rendering when adding it to container

Compatibility

Plugin version

1.0.x

1.1.x

Ametys 3.0.x

 

 

Ametys 3.1.x

 

 

Ametys 3.2.x

 
Ametys 3.3.x 

Back to top