Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2015-11-20 08:52:14

LabBuddy
Member
Registered: 2015-11-19
Posts: 7

How to add username to embed code?

We use this module in our CMS. The Javascript of this CMS knows the username. So, when the user starts a chat, I want to know his/her name.

(How) can I add it in the embed code? Now I only get 'Visitor'

This is the code:

[== JavaScript ==]
var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500};
(function() {
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
  var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
  po.src = '//mydomain.livehelperchat.com/index.php/eng/chat/getstatus/(click)/internal/(position)/bottom_right/(hide_offline)/true/(top)/500/(units)/pixels/(leaveamessage)/true?r='+referrer+'&l='+location;
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);

Last edited by LabBuddy (2015-11-20 08:59:04)

Offline

#2 2015-11-24 17:51:17

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: How to add username to embed code?

Offline

Board footer