Resource CenterHow to Add User Experience Features to Any App with the eXo Platform WidgetThe eXo Platform widget allows developers to add the rich social and collaboration capabilities of eXo Platform 3 to external applications. The widget can display activity streams embedded within your application; it can also create a dedicated collaboration space for specified objects, allowing you to bring activities from other apps into an instance of eXo Platform. Since this widget is hosted locally on eXo Platform, it can display personalized information as well. An activity stream of the most recent user actions will display to the group's members. To other users who are not already a member of the space, a link with information on joining the group is displayed. RequirementsEnabling the eXo Platform WidgetThe widget is not distributed in the current package of eXo Platform, but adding it simply involves copying 2 files.
Now you can start eXo Platform and integrate your app. InstallationThe widget has two options, depending on the level of integration and amount of information you want to display. The basic version of the widget is an iFrame. The more advanced version is a button that you can insert in a page; this will display a small popup with the information about the space. Basic VersionInserting the basic version is simple; you only need an iFrame to insert on your site. <iframe scrolling="no" height="180" frameborder="no" width="220" src="http://URL_OF_YOUR_EXO_INSTALLATION.COM/rest/private/spaces/portal/space_info?spaceName=NAME_OF_YOUR_SPACE&description=DESCRIPTION_OF_THE_SPACE&portalName=PORTAL_NAME"> </iframe> To install this in your application, replace all the uppercase text below:
Advanced VersionTo install a more sophisticated version of the widget, you will need to insert a code snippet in your page. This includes some HTML and JavaScript; the necessary CSS will be added dynamically. Insert the following code at the position where you want the button to be displayed:
<div class="exoSpacesContainer">
</div>
<script>
spaces.createPopup("exoSpacesLink", "MyAppName - my social object", "my cool description");
</script>
The important function here is: spaces.createPopup(link, spaceName, description)
Configuration
If you want to change any part of this configuration, it is best to do so before creating the popup. For example:
<div class="exoSpacesContainer">
<a href="#" id="exoSpacesLink" class="exoSpacesLink" target="_blank">Space</a></div>
<script> spaces.setServerURL("http://192.168.2.100:8080");
spaces.createPopup("exoSpacesLink", "My cool new space", "my cool description");
</script>
|
Subscribe to our newsletter and keep up with the latest eXo news and events.