Mibew Messenger Community

General => Support => Topic started by: owhweb on June 06, 2009, 04:19:19 AM

Title: Still not showing Group Online/Offline at Visitor's side
Post by: owhweb on June 06, 2009, 04:19:19 AM
Hi,

First of all, thanks for updated version. It is awsome. I liked the new theme as well. There is still some problems described below.

I created creating two groups, Group A and Group B and assigning 1 - 1 operator to them respectively. The problem is that whether there is any operator online / offline, visitor can't know which group user is online or offline. Visitor should be notified which operator or department is currently online and which is offline so that visitor can think what to do before entering chat. Also, I'm unable to know which operator is doing what. I can's see online chatting of my operators from my admin account.

Hope, you'll help me in this asap.


Thanks

Vikas
Title: Re: Still not showing Group Online/Offline at Visitor's side
Post by: Eddybaur on June 06, 2009, 11:20:15 AM
Wow, that's a very good point ;)
When you use the drop down "Code for group" does it still show up as online weather someone's online from a different group?
Title: Re: Still not showing Group Online/Offline at Visitor's side
Post by: owhweb on June 06, 2009, 11:57:09 AM
No, it's only show the group names. It does not show any offline/online status. My suggestion is that drop down should be wider and status (online / offline) should be shown along with the group name in bracket or you can change the drop down option to radio button option and can present online / offline status after the group name.
Title: Re: Still not showing Group Online/Offline at Visitor's side
Post by: Eddybaur on June 06, 2009, 12:42:36 PM
Maybe your mis-understanding me cause i tried it, and it worked.

Operator 1-Online -Sales          Operator-2 offline -support
BUtton shows online        button shows offline

That's what i'm assuming ur trying to do?  Group examples: Support and sales
If so, You change the group to sales, it should say that that person is online. If you change the group to SUpport, it should say that it's offline.
Title: Re: Still not showing Group Online/Offline at Visitor's side
Post by: Inspirer on June 08, 2009, 11:09:05 PM
Though for usual cases like Support / Sales it is not so important, if you map group to operator one to one it makes sense.
Here is the patch. You need to replace two methods:

in libs/chat.php:

function setup_survey($name, $email, $groupid, $info, $referrer) {
   global $settings, $page;
   
   $page['formname'] = topage($name);
   $page['formemail'] = topage($email);
   $page['formgroupid'] = $groupid;
   $page['forminfo'] = topage($info);
   $page['referrer'] = urlencode(topage($referrer));

   if($settings['enablegroups'] == '1' && $settings["surveyaskgroup"] == "1") {
      $allgroups = get_groups(false,true);
      $val = "";
      foreach($allgroups as $k) {
         $groupname = $k['vclocalname'];
         if($k['ilastseen'] !== NULL && $k['ilastseen'] < $settings['online_timeout']) {
            $groupname .= " (online)";
         }
         $val .= "<option value=\"".$k['groupid']."\"".($k['groupid'] == $groupid ? " selected=\"selected\"" : "").">$groupname</option>";
      }
      $page['groups'] = $val;
   }
   
   $page['showemail'] = $settings["surveyaskmail"] == "1" ? "1" : "";
   $page['showmessage'] = $settings["surveyaskmessage"] == "1" ? "1" : "";
   $page['showname'] = $settings['usercanchangename'] == "1" ? "1" : "";
}


and in libs/operator.php:

function get_groups($countagents, $checkonline=false) {
   $link = connect();
   $query = "select chatgroup.groupid as groupid, vclocalname, vclocaldescription".
         ($countagents
               ? ", (SELECT count(*) from chatgroupoperator where chatgroup.groupid = chatgroupoperator.groupid) as inumofagents"
               : "").
         ($checkonline
               ? ", (SELECT min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time ".
                  "from chatgroupoperator, chatoperator where chatgroup.groupid = chatgroupoperator.groupid ".
                  "and chatgroupoperator.operatorid = chatoperator.operatorid) as ilastseen"
               : "").
               
          " from chatgroup order by vclocalname";
   $result = select_multi_assoc($query, $link);
   mysql_close($link);
   return $result;
}

Also, I've attached the file with it.
Title: Re: Still not showing Group Online/Offline at Visitor's side
Post by: zytep on June 09, 2009, 11:36:33 AM
I think what he really means is:

When he joins a chat to "all operators", and is able to select a prefered support group - those groups dosnt show offline/offline status.
(replicated)