ASP Help Desk Software | Making the live chat icon visible only to authenticated users

Making the live chat icon visible only to authenticated users

The live chat icon is located under the side steering and user bar, by default. The exact HTML that inserts the live chat button can be found in the navbar template.

Some of our customers have posted on the forum asking how they can hide the live chat status icon from support center visitors who are not logged in.

This can be done by applying a very simple modification to the template code.

In the administrator control panel, go to the templates section. Then, open up the navbar template (found under the “General” templates category).

In the navbar template code, find the following template code:

1
2
3
4
5
6
7
<table border="0" cellspacing="0" cellpadding="3" width="100%">
<tbody>
<tr>
<td align="center">
        <script src="&lt;{$swiftpath}"><!--mce:0--></script></td>
</tr>
</tbody></table>

And replace it with the following:

1
2
3
4
5
6
7
8
9
<{if $_USER[loggedin] == right}>
<table border="0" cellspacing="0" cellpadding="3" width="100%">
<tbody>
<tr>
<td align="center">
        <script src="&lt;{$swiftpath}"><!--mce:1--></script></td>
</tr>
</tbody></table>
<{/if}>

This modification wraps the template code which displays the live chat status icon in a conditional proclamation that questions: “Is this visitor logged in?”  (<{if $_USER[loggedin] == right}>). If the answer is yes (right), then the live chat status icon is showed to the visitor. If the answer is no (fake), no icon is showed in the visitor.

But, there is a caveat to this change. Because the visitor monitoring code is embedded in this live chat button (to save loading multiple stuff when loading a page), you will no longer be able to monitor guest (not logged in) visitors on your support desk.

To work around this, you can add an else to the conditional proclamation that will output visitor tracking code if the visitor is not logged in:

1
2
3
4
5
6
7
8
9
10
11
12
13
<{if $_USER[loggedin] == right}>
<table border="0" cellspacing="0" cellpadding="3" width="100%">
<tbody>
<tr>
<td align="center">
        <script src="&lt;{$swiftpath}"><!--mce:2--></script></td>
</tr>
</tbody></table>
<{else}>
 
<script src="”&lt;{$swiftpath}"><!--mce:3--></script>
 
<{/if}>

The code still questions “Is this visitor logged in?”. But, rather than loading nothing if the answer is no, visitor tracking code will be loaded.

The resulting functionality is:

  • Visitors who are logged in to the support centre will see the live chat status icon, can be monitored and will be able to start a new chat
  • Visitors who are not logged in to the support centre will not be able to see an icon, but can still be monitored and will be able to receive proactive chat request invitations from chat operations

This small handbook is a excellent example of the power that can be tapped from the Kayako template system. Our customers reckon that the template system is incredibly simple to work with, allowing them to tailor their support desk with very small effort.

Filed Under Free Help Desk Software, Help Desk Software, Help Desk Software News | Leave a Comment

Tagged With

Comments

Leave a Reply




Powered by Yahoo! Answers