Ektron CMS400.Net Reference

>>Managing User Communities > Activity Streams > ActivityStream Server Control

ActivityStream Server Control

The ActivityStream server control displays notification messages generated by Ektron CMS400.NET’s Notification system. For background information on the Activity Streams, see Activity Streams.

Below are some pages where you might use this control.

The image below shows an intranet Home page with the ActivityStream server control highlighted. Whenever a user logs into the site, he sees a list of his colleagues’ activities.

How the Control Determines which Activities to Display

When this control is added to a Web page, Ektron CMS400.NET looks for a DefaultObjectID defined in server control properties. If one is found, the activity stream is based on that user or group. If none is found, notifications are based on the pages’s dynamic query string parameter, which typically identifies the logged-in user.

How to Exclude a User or a Group from the Activity Stream

You can exclude any user or a group from the activity stream. To achieve this, open the page that hosts the Activity Stream server control, find the control, and add the following to the control’s codebehind.

//activityStream
cmsActivityStream.ExcludeUserIds.Add(this.ProfileId);
You can also exclude groups.
cmsActivityStream.ExcludeGroupIds.Add(GroupId1);
cmsActivityStream.ExcludeGroupIds.Add(GroupId2);
:
cmsActivityStream.ExcludeGroupIds.Add(GroupIdN);

Quick Setup Instructions

To add this control to a page, drag and drop it on a Web form and set the following properties.

ActivityStream Server Control Properties

The ActivityStream server control properties are described in this table.

Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width and border style. For documentation of these properties, see Visual Studio help.

Property

Description

Data Type

Authenticated

Indicates if you are logged in to the CMS

Explorer and can use it to browse to Content, Collections, etc. See Also: Using CMS Explorer to Browse Your Ektron CMS400.NET Site

String

CacheInterval

Sets the amount of time the server control’s data is cached. The default is 0 (zero). This is the amount of time, in seconds, a control’s data is cached. For example, if you want to cache the data for five minutes, set this property to 300 (three hundred). See Also: Caching with Server Controls

Double

DefaultObjectID

The ID of the object whose activity stream will appear where you place this server control.

For example, if you want this control to display Scott Markey’s activities, and his USER ID is 142, place 142 here, and set the ObjectType property to User.

To display the activity stream for the logged-in user, enter zero (0).

Long

DisplayXslt

Determines how information is displayed on the page. Enter the path to the XSL file. It can be relative or absolute.

Warning! If you specify an external file, it is strongly recommended that you do not store this file your site’s Workarea folder. If you store this file in the Workarea folder, the file will be lost when you upgrade.

String

 

DoInitFill

By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, FIll is automatically called during the Page Render event.

You might do this if you need to set or change a property on the control in codebehind and have it render with your changes shown.

Boolean

DynamicObjectParameter

Gets or sets the QueryString parameter to read a object ID dynamically. To use the default object ID, leave blank.

For example, if you are passing the ID value of a community group, you might enter ‘gid’ for this property. So, if you passed
http://~yoursite~/CGHome.aspx?gid=21 on the Query Strings to a page containing this control, you would see the activity stream for the group with an ID of 21.

String

EnablePaging

This property, in conjunction with the MaxResults property, lets site visitors view an unlimited number of notifications while controlling the amount of screen space. To accomplish this, the display is limited to the number set in the MaxResults property.

If you set this property to true, and the number of items exceeds the MaxResults number, navigation aids appear below the last item.

Boolean

Hide

Used to hide output of the control in design time and run time.

True = Hide control

False = Display control

Boolean

Language

Set a language for viewing the ActivityStream control. This property shows results in design-time (in Visual Studio) and at run-time (in a browser).

Integer

MarkupLanguage

Identify the template markup file that controls the display of the server control. For example, mymarkup.ekml. If the *.ekml file is located in the same folder as the Web form containing the server control, just enter its name. Otherwise, the path to the file can be relative or absolute. See Also:  Controlling Output with Ektron Markup Language

String

MaxResults

The Maximum number of notifications to fetch. 0 (zero) = unlimited.

Integer

ObjectType

The type of object to which this control is assigned. Choices are:

User—control is assigned to an individual

Group—control is assigned to a community group

ActivityFeedType

ProfileParamName

The parameter name to pass in the QueryString to the TemplateUserProfile page, if you want it to be anything other than id.

For example, you may prefer userid, because it is more descriptive, as shown in the following example.

String

Stylesheet

Specify the path to a style sheet for use with the Documents server control. The location can be relative or absolute. Leave blank to use the default style sheet.

String

Suppress

WrapperTags

Suppresses the output of the span/div tags around the control. The default is False.

True—Suppress wrap tags.

False—Allow wrap tags.

Boolean

TemplateActivity

The URL path to a page that contains another ActivityStream server control.
When this property contains a path and the destination page has an ActivityStream control whose ObjectType property is set to Activity, a user can click an Activity Stream’s time span on the first page to open a second page that contains just that activity. See Also: Viewing an Activity Stream Event in a Browser Window

String

Template

UserProfile

The URL path to a page that contains the UserProfile server control. This path can be relative or absolute.

If you enter a path, a user can click any user’s name or avatar from the Message Board server control and be forwarded to his profile page. See illustration below.

 

Note that user templates can be defined in the Ektron CMS400.NET Workarea > Settings > Community Management > Templates screen.

However, if you assign a template in this field, this setting takes precedence over the setting on the Workarea Template screen.

String

WrapTag

Allows a developer to specify a server control’s tag.

The default is Span.

Span—The <span> tag is used to designate an inline portion of an HTML document as a span element.

Div—The <div> tag is used when you want to apply attributes to a block of code.

Custom—Allows you to use a custom tag.

String


Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.