SocialBar Server Control

The SocialBar server control lets users of a community Web site bookmark colleagues, community groups, and content. The following table explains the details.

Item being
bookmarked
Description

Users

  • Sends colleague requests
  • Removes colleagues when a user visits another user’s profile page
Group
  • Join and leave community group
  • Invite others to join group
Content

Add or remove content and URLs from a user’s Favorites. See Also: Favorites Server Control

The Social Bar control also is used to bookmark Web pages with Social Bookmarking services, such as Digg.com or del.icio.us. By default, Digg.com and del.icio.us are loaded in the Items property of the server control.

In addition, the Social Bar control can print or email a Web page, and invite non-site users to become members of the site. Clicking Invite links to a Web page that hosts the Invite server control. See Also: Invite Server Control.

Adding a Web page URL to a favorites via the social bar

Adding a Web Page URL to a Favorites Via the Social Bar

You can let users add a Web page’s URL to their Favorites when they click Add to Favorites on the Social Bar. Typically, you would do this if more than one content item appears on a Web page, but you want only one Social Bar control on the page.

  1. Drag and drop a SocialBar server control on a Web form.
  2. Set the DefaultObjectID property to 0 (zero).
  3. Leave the DynamicObjectParameter property blank.
  4. If it is not already there, copy the comma-separated list of items from the Items property to the Addto item property.
  5. Set the ObjectType property to Content.

The image below shows a Web page with several content items. A Social Bar control is associated with each one. In this example, when a you click Add to Favorites, you add the associated content item to your Favorites.

In the second image, one Social Bar appears on the Web page with several content items. In this example, if you click Add to Favorites on the Social Bar, you add the Web page’s URL to your Favorites.

See Also: Adding a URL to Your Favorites

Sending a private message from the social bar

Sending a Private Message from the Social Bar

You can send private messages to another user or the community group administrator from the Social Bar control.

  1. Drop a SocialBar server control on a user’s profile or community group’s page.
  2. Set the ObjectType property to User or Group.
  3. Add either PrivateMessageUser or PrivateMessageAdmin to Items property.
    • Use PrivateMessageUser to let a user send a message to the user whose profile is being viewed.
    • Use PrivateMessageAdmin to let a user send a message to the group administrator.
  4. In the MessagingUrl property, identify a page that contains the Messaging server control. See Also: Messaging Server Control
  5. Make sure the DynamicObjectParameter is set, if necessary.
Tweeting the current URL

Tweeting the Current URL

You can let site visitors use Twitter to tweet their current browsing location by adding the Twitter item to the list of parameters in the SocialBar’s Items property. After the item is added, a Twitter icon and link appear in the Social Bar. When you click the link, Twitter is launched. After you log into your Twitter account, your current browsing location appears in the “What are you doing?” status box. You then can click Twitter’s Update button to post the status.

  1. Drag and drop a SocialBar server control on a Web form.
  2. Make sure the DefaultObjectID property is set to 0 (zero).
  3. Leave the DynamicObjectParameter property blank.
  4. If it is not already there, add the Twitter item to the comma-separated list in the Items property.
  5. Set the ObjectType property to Content, User or Group, depending on the type of page you are editing.
SocialBar server control properties

SocialBar Server Control Properties

The following are Ektron-specific server control properties. You can find information about native .NET properties such as font, height, width and border style in Visual Studio® help.

  • Authenticated (String)

    Indicates if you are logged into the CMS Explorer and can use it to browse to content, collections, and so on. See Also: Browsing Your Ektron Site Using CMS Explorer.

  • CacheInterval (Double)

    The number of seconds that the server control’s data is cached. The default is 0 (zero). For example, if you want to cache the data for 5 minutes, set to 300. See Also: Caching with Server Controls.

  • DefaultObjectID (Long)

    The default object ID for this control to use when there is no matching dynamic parameter value passed. If you set this property set to 0 (zero) and leave the DynamicObjectParameter blank, the social bar can be used to add Web pages to your favorites.

  • DisplayXslt (String)

    If desired, enter a relative or absolute path to an Xslt that determines the display of the page.

    WARNING! If you specify an external file, do not store this file in the Workarea folder. If you store this file in the Workarea folder, the file will be lost when you upgrade.

  • DoInitFill (Boolean)

    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 code-behind and have it render with your changes shown.

  • DynamicObjectParameter (String)

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

  • Hide (Boolean)

    Hides or displays the output of the control in design time and run time.

    • True—Hide the control output.
    • False—Display the control output.
  • IncludeIcons (Boolean)

    Select whether icons are displayed next to each item.

    • True—Display icons next to each item.
    • False—Do not display icons next to each item.
  • InviteURL (String)

    The URL to the Invite server control’s Web page. Two variables used within the URL.

    • {0}—object ID
    • {1}—object type

    The link must have both variables. The Web form can be relative or absolute. Below is an example.

    invitepage.aspx?id={0}&type={1}
  • Items(String)

    A comma separated list of items that you want to appear on the Social Bar.

    • Addto—
      • If this control is associated with a user, the Addto item appears as:
        • Add a Colleague—if you are viewing another user’s profile page and can add them as a colleague.
        • CancelColleague Request—if you are viewing another user’s profile page who you asked to be a colleague but the user has not yet accepted.
        • Remove From Colleagues—if you are viewing a current colleague’s profile page.
      • If the control is associated with a community group, the Addto item appears as:
        • Join Group—if you visit a community group that you have not joined.
        • Leave Group—if you already belong to a community group.
        • CancelRequest to Join—if you have tried join a restricted group and have not yet been accepted.
      • If the control is associated with content, the Addto item appears as:
        • Add to Favorites—if you view content that is not in your Favorites.
        • Remove Favorites—if you view content that is in your Favorites.
    • Invite—A link to the Web page that contains the Invite server control. This control lets you invite people to register on the site and become a colleague.

      WARNING! For the Invite item to be active, you must enter a link to the page hosting the Invite control into the InviteURL property.

    • GroupInvite—Opens a dialog that invites colleagues or people who are not registered on the site to join the group.
    • Email—Email this Web page. Clicking this item launches your email with the subject and body loaded with the information about the content, user or community group.
    • Digg—Appears as Digg It. Launches Digg.com, a social bookmarking service.
    • Delicious—Appears as Bookmark It. Launches del.icio.us, a social bookmarking service.
    • Facebook—Appears as Facebook. Launches Facebook, a social network service.
    • GoogleAppears as Google It. Launches Google’s social bookmarking service.
    • Furl—Appears as Furl It. Launches Furl, a social bookmarking service.
    • Technorati—Appears as Technorati. Launches Technorati, a social bookmarking service.
    • Twitter—Launches Twitter, a social network service, which lets you communicate with other Twitter users. If the Twitter link is clicked, and you log into a Twitter account, a link to the current page is inserted into the Status box. See Also: Tweeting the Current URL
    • Yahoo—Appears as Yahoo! It. Launches Yahoo’s social bookmarking service.
    • Print—Print the Web page.
    • PrivateMessageUser—Creates a link that lets you send a Private Message to a user. See Also: Sending a Private Message from the Social Bar
    • PrivateMessageAdmin—Creates a link that lets you send a Private Message to a community group’s administrator. See Also: Sending a Private Message from the Social Bar
  • Language (Integer)

    Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).

  • MarkupLanguage (String)

    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 LanguageControlling Output with Ektron Markup Language

  • MessagingUrl (String)

    The Web page that hosts the Messaging server control. This property is used when either PrivateMessageUser or PrivateMessageAdmin appears in the Items property.

    If a value appears in the ek_RedirectFromLoginKeyName key in the web.config file, the user is returned to the original URL after sending the message. By default, this value is RedirectUrl. If you remove this value and do not add another, the person sending a message sees a note stating “Your message has been sent.”

  • ObjectType

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

    • Content—this control is assigned to content.
    • User—control assigned to an individual
    • Group—control assigned to a community group
    • Data Type:—Ektron.Cms.Common.
      EkEnumeration.CMSSocialBarTypes
  • Stylesheet (String)

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

    WARNING! If you enter a valid EkML file at the MarkupLanguage property, the Stylesheet property is ignored.

  • SuppressWrapperTags (Boolean)

    Suppresses the output of the span/div tags around the control.

    • True—Suppress wrap tags.
    • False (default)—Allow wrap tags.
  • WrapTag (String)

    Lets a developer specify a server control’s tag.

    • Span (default)—designate an inline portion of an HTML document as a span element.
    • Div—apply attributes to a block of code.
    • Custom—Lets you use a custom tag.