Author Topic: Close client's chat window, when the operator closes the thread  (Read 5770 times)

0 Members and 1 Guest are viewing this topic.

Helios89

  • Jr. Member
  • **
  • Posts: 2
Hello everyone,

So i have that client, who uses Mibew Messenger 1.6.4 for his website and he want me to make some changes.
For all of them I found solutions in the forum, but except one - close client's window, when the operator closes thread.

I found the functions which close the thread, but it seems that  window.close() doesn't work both ways.

I will be very grateful if someone gives tips how make this possible.

Best regards!
« Last Edit: April 02, 2014, 01:05:17 PM by Helios89 »

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: Close client's chat window, when the operator closes the thread
« Reply #1 on: April 02, 2014, 05:14:52 PM »
Mibew Messenger 1.6.4 is outdated, vulnerable and officially unsupported.  :-\

Also one should understand that the feature you want to implement is not so trivial for Mibew 1.6.x.

I'd recommend to modify function print_thread_messages in libs/chat.php to add into the resulting xml document the information that the thread is closed. And to modify updateContent method in chat.js to make use of that information. Also, in that case it will be necessary to store the actual state of the thread on the client side, so it will be possible to do some actions (close the window) only on change of the state.

But that's only a kind of general idea excluding possible pitfalls. And you'll have to implement it yourself.

Helios89

  • Jr. Member
  • **
  • Posts: 2
Re: Close client's chat window, when the operator closes the thread
« Reply #2 on: April 03, 2014, 11:38:08 AM »
Thank for the quick reply!

I noticed that their Mibew version is old, but their website wasn't made by us. They said they want some changes to be made including in the chat system functionality.

Best regard!