Author Topic: "{username} / {operator} is writing" - Message  (Read 9059 times)

0 Members and 1 Guest are viewing this topic.

nickel

  • Jr. Member
  • **
  • Posts: 3
"{username} / {operator} is writing" - Message
« on: January 29, 2014, 03:59:23 PM »
Hey there,

in chat window there is the message:

typing.remote=Remote user is typing...

I'm looking for a solution to show each-others name within this message. I changed my template from this:

Code: [Select]
<div id="typingdiv" style="display:none;">${msg:typing.remote}</div>
to this:

Code: [Select]

<div id="typingdiv" style="display:none;">
                    ${if:agent}
                            ${page:ct.user.name}
                    ${endif:agent}
                    ${if:user}
                           ${????:????}
                    ${endif:user}
          ${msg:typing.remote}
</div>

This is working well for user-name in operator-chat, but what is needet to show operators name in users chat?

Regards

nickel

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: "{username} / {operator} is writing" - Message
« Reply #1 on: January 29, 2014, 06:42:27 PM »
Hi,

Content of the chat window for user is generated when there is no operator in the chat yet. So operator's name is unknown at that time.

nickel

  • Jr. Member
  • **
  • Posts: 3
Re: "{username} / {operator} is writing" - Message
« Reply #2 on: January 31, 2014, 11:35:15 AM »
Hey Simushev,

but, when the operator start's the Chat, there is a Message like "Operator <Username> is entering the chat". Is there any Chance to grab this value?

Regards and thanks for answering,

Sebastian

Dmitriy Simushev

  • Moderator
  • Native
  • *****
  • Posts: 345
Re: "{username} / {operator} is writing" - Message
« Reply #3 on: January 31, 2014, 01:03:41 PM »
When operator enters a chat, the page for user is _already_ rendered and shown to him.

The only option to achieve your aim is to create a custom JavaScript code.