Chat button installation

Now when the presence code is in place we can add chat request buttons. Links / buttons for new chat can be installed on any page of your website, the most common areas are user profile page, search result page, online users list, etc.

Put the following code to the link/button

javascript:z5messenger.SendInvitation('targetUserId');

Where targetUserId is ID of the user the chat request goes to. Here is an example of a simple "Chat now" link

   <a href="void(0);" onClick="z5messenger.SendInvitation('5748');">Chat now</a>

"Chat now" link should appear only for those users who are currently on the site. You can use your own "who is online" system or use data sent by Presence Feed. To learn more refer to "Online Presence Feed" section of the manual.