Demandbase Connect

Echo Community Wiki / Use Case - Community Stream
View
 

Use Case - Community Stream

Page history last edited by Andrew 1 year, 3 months ago

 

 

Use Case - Community Stream

 

The Echo Community Stream use case is designed to be installed on your home page and sidebar. It is intended to reveal the volume and velocity of your site activity in real-time. In this stream, one might expect the following items:

 

  • New articles as they get published 
  • Major updates/edits to articles as they get made
  • Announcements of new Journalists joining the site
  • New users joining the site
  • Site wide announcements
  • Comments on content
  • Other reactions about content from the rest of the social web
  • Any proprietary events that might be supported by the site - e.g. Liking Stories, Following Journalists, Users friend each other etc. 

 

 


Live demo

 

A live demo of the Commenting use case is located in Demo Center.

 

Basic installation

 

In order to install the Echo Community Stream use case the following code should be placed into the page source: 

<script src="http://cdn.echoenabled.com/clientapps/v2/jquery-pack.js"></script> 

<script src="http://cdn.echoenabled.com/clientapps/v2/stream.js"></script>

 

<div id="echo-site-reactions" style="padding: 0 10px 10px 10px; height: 400px; overflow-y: scroll; overflow-x: hidden; border: solid 1px lightgrey; background-color: white"></div>

<script type="text/javascript">

    new Echo.Stream({

        "target": document.getElementById("echo-site-reactions"),

        "appkey": "test.echoenabled.com",

        "query": "scope:http://www.echosandbox.com/* itemsPerPage:6 -state:ModeratorDeleted,SystemFlagged,ModeratorFlagged children:0",

        "maxBodyCharacters": 300,

        "viaLabel": {"icon": true,"text": true},

        "streamStateLabel": {"icon": false,"text": false},

        "aggressiveSanitization": true

    });

</script>

 

Additional information about customizing and implementing the Echo Stream Client (the client used above) can be found on its Application Page. The data set can be changed by reformulating the "query" parameter value. You can find the necessary information on how to do it and many useful examples on the Echo Query Language page.

 

Publishing your own Community data

 

To submit your own site/community activity to the Echo Platform, the "submit" API method can be used. Also you can order the service from our partner Arktan, which provides establishing the data bridges between your information channels and Echo Platform. You can find additional information about this service here.

 

Enabling additional features

 

Authentication

 

In order to add features which expect users to be authenticated, first of all you should enable the Backplane client library on the page as shown below:

<script src="http://cdn.echoenabled.com/clientapps/v2/backplane.js"></script>

<script type="text/javascript">

        Backplane.init({

                "serverBaseURL" : "http://api.js-kit.com/v1",

                "busName": "jskit"

        });

</script>

 

Now if a user was logged into any Echo application on the page, all Echo applications employed in this use case will also use the same login status and other extra features available for the logged in users become enabled.

 

Likes

 

To allow users say that they like an item you can add the "Like" plugin to the Echo.Stream parameters hash:

"plugins": [{"name": "Like"}]

 

and include the following script into the page source:

 

Please note: Even if the  "Likes" are enabled the Like control will appear only for the authenticated users.

 

Flags

 

To allow users mark items which they consider inappropriate or offensive, you can add the "CommunityFlag" pluigin to the Echo.Stream parameters hash:

"plugins": [{"name": "CommunityFlag"}]

 

and include the following script into the page source:

 

Please note: Even if the "Flags" are enabled the Like control will appear only for authenticated users.

 

Moderation

 

In order to add inline moderation controls to the stream, please include the "Curation" plugin for the Echo.Stream config hash:

"plugins": [{"name": "Curation"}]

 

and include the following script into the page source:

 

As a result when the moderator logs into the application, the following UI components will appear:

 

  • the Approve/Spam/Delete controls are added to each item in the Echo Stream Client which allows to change the item state
  • the status indicator and bulk actions controls are added under the actor avatar to each item
  • the "Curate" link is added to the header area of the Echo Stream Client which allows to open the Curation Palette to manage the queries information

 

Also "UserBan" and "UserPrivileges" plugins might be very helpful for moderation purposes, because they provide UI for granting/revoking admin permissions and marking/unmarking user as banned. In order to install these plugins, the following construction should be included into the Echo.Stream config hash:

"plugins": [{"name": "UserBan"}, {"name": "UserPrivileges"}]

 

and the scripts should be included into the page source:

 

Additionally you can enable the "Edit" stream plugin which allows to change the item body and update the markers and tags. In order to install this plugin, the following code should be added to the Echo.Stream application config hash:

"plugins": [{"name": "Edit"}]

 

and the following script should be included into the page source:

 

Please note: moderation UI will be available only for logged in users with the "moderator" or "administrator" roles.

 

Also please refer to the Moderation use case page to find additional information about Echo items moderation possibilities.

 

Customization

 

Each use case component is the Echo application. The look and feel of the applications can be customized by including custom CSS rules to the page source. Also the logic of each Echo application can be easily extended using the Extensions Framework functionality, described here and the guide for creating plugins can be found here.

 

Also visiting Echo.Stream application page where you can find additional information might be very helpful as well.

 

Further Reading