README

changeset 49
6d46d2518705
child 60
35a99353d907
equal deleted inserted replaced
48:12b42931151a 49:6d46d2518705
1 Support chat
2 ============
3
4 Requirements
5 ------------
6
7 Server:
8 - An XMPP server with support for:
9 - Multi-User Conferences (may be an external service, e.g. mu-conference, Palaver)
10 - BOSH (may be an external service, e.g. Punjab)
11 - SASL ANONYMOUS
12
13 - A web server:
14 - To serve the scripts, stylesheets and images
15 - To redirect requests for a selected URL to the BOSH server
16
17 Users:
18 - A Javascript-enabled web browser
19
20 Installation
21 ------------
22
23 Upload the 'support-chat' directory to your site. In the page(s) in
24 which you intend to enable the support box to be launched, add the
25 following snippet of HTML to the <head> section of the page:
26
27 <script type="text/javascript" src="support-chat/js/jquery-1.4.2.min.js"></script>
28 <script type="text/javascript" src="support-chat/js/strophe.js"></script>
29 <script type="text/javascript" src="support-chat/js/xmpp_muc.js"></script>
30 <script type="text/javascript" src="support-chat/js/supportchat.js"></script>
31 <script type="text/javascript" src="support-chat/js/jquery-ui-1.8rc3.custom.min.js"></script>
32 <link rel="stylesheet" href="support-chat/ui/supportchat.css" />
33 <link rel="stylesheet" href="support-chat/ui/start/jquery-ui-1.8rc3.custom.css" />
34
35 (amending the paths as necessary to point to the correct files).
36
37 Configuration
38 -------------
39
40 On your XMPP server you need to create a new host for users to connect to. This host
41 should be configured to allow SASL ANONYMOUS logins. You also need to create a host
42 to hold the user-created support rooms using MUC. This will either be provided by
43 your server, or by configuring an external component.
44
45 On your web server the only tricky part is setting up a proxy for the scripts on the
46 site to access the BOSH server. Apache, lighttpd, nginx and other servers support this.
47 There are many ways to achieve this, but one method in Apache2 would be to use its
48 mod_rewrite and a configuration line similar to:
49
50 RewriteRule /bosh http://localhost:5280/http-bind/ [P]
51
52 This assumes your BOSH server is on the same machine as the web server, and is serving
53 BOSH at /http-bind (the default path in most servers). You should in the end be able
54 to visit http://yourdomain/bosh and see the BOSH page of your server.
55
56 Finally you need to configure and customise support-chat itself. Open up
57 support-chat/supportchat.js in an editor, and review and modify the configuration
58 options at the start of the file. Each one is described below:
59
60 login_domain: This should be the XMPP hostname that is configured to allow anonymous
61 logins.
62
63 bosh_url: This should be /bosh, or the path you proxied from your web server to
64 the BOSH server.
65
66 muc_server: The XMPP hostname of the Multi-User Conference server where users shall
67 create their temporary rooms.
68
69 team_rooms: A list of pairs of assistant team names and team MUC addresses. The
70 example should give you enough guidance on how to structure the list.
71 You can define as many or as few teams as you want.
72
73 send_invites: May be true or false. If false, online assistants will receive messages
74 alerting them to new queries. If true, they will receive a MUC invitation
75 to the query's room (may not work in all XMPP clients).
76
77 offline_support: An XMPP address to which queries should be sent when no assistants on
78 the selected team are available. Should have offline message storage
79 in order to be sure never to lose a query.
80
81 alternative_url: If the support application encounters an issue connecting to the XMPP
82 server (whether it be down, or the user's network policy or browser
83 prevents such) the user will be directed to the given URL to obtain
84 support.
85
86 Usage
87 -----
88 Anywhere you want to provide a link to open the support interface, direct the link to
89 #support-chat, for example:
90
91 <a href="#support-chat">Live Support</a>
92
93 On clicking this link the user would be presented with a form to enter their query.
94
95 License
96 -------
97 support-chat is licensed under the University of Illinois/NCSA Open Source License,
98 see the LICENSE file that accompanies this project for more information.

mercurial