Setting up chat in redirection mode

Many web parts related to the Chat application have the Redirect URL property. This property defines the URL of the page where chat users are redirected when performing the action the web part is intended for. For example, in the Chat room list web part, you set the Redirect URL to the page that contains the Chat room messages web part.

Let’s presume that you want to set up chat consisting of the following pages:

  • Logon page
  • Page with list of chat rooms
  • Chat room page with messages

The following is a step-by-step tutorial how to set up chat on the pages.

Unless instructed otherwise, you can leave all the web part properties with their default values.

Preparation

  1. Create a new blank page named Chat under your website root. This is the starting page where users enter the chat.
  2. Under the Chat page, create two blank pages called Room list, and Room.
  3. On the Room list page, select the Properties -> Template tab, click Edit template properties and select All ancestor pages in the Page nesting section. Then save the template.
  4. Repeat the previous step on the Room page.

Basic setup

  1. On the Chat page, add the Chat login web part. Set its properties as follows:
  • Redirect URL after entering chat: ~/Chat/Room-list
  • Redirect URL after logout: ~/Chat

This ensures that users are redirected to the correct page when logging in and out.

  1. Place the Chat notifications web part on the Chat page.

This allows users to see notifications about invitations to rooms and private conversations, as well as other system messages addressed specifically to the current user.

  1. Place the Page placeholder web part on the Chat page.

The web part, along with the template settings defined previously, causes the Chat login web part to appear on all subpages, allowing users to log out at any time.

  1. On the Room list page, add the Chat rooms web part. Set the following property:
  • Redirect URL after join: ~/Chat/Room

When a user clicks a room in the list, the web part tries to join the user to the room. If that action is successful, the system redirects the user to the specified URL.

  1. Place the Chat send message web part on the Room page.

This allows sending messages to the room and its members.

  1. Place the Chat room messages web part on the Room page.

This web part displays messages from other users in the room, as well as system messages and announcements.

  1. Place the Chat leave room web part on the Room page. Set the following property:
  • Redirect URL after leaving: ~/Chat/Room-list

This provides user a way to exit the room and return to the page with the list of rooms.

Extended setup

After completing the preceding procedure, you will have implemented a functioning multi-page chat with all the basic features. However, this configuration can be extended with additional features. The process is described in the following step-by-step tutorial.

  1. Place the Chat on-line users web part on the Room list page.

This enables users to see the list of users online in the chat regardless of the room they are in, if any. They can also start a private conversation with any of the online users.

  1. Add the Chat room name web part on the Room page.

This web part displays the name of the room the user is in.

  1. Place the Chat room users web part on the Room page.

This allows users in a room to see who else is online in the particular chat room and initiate a one-to-one chat session with them.