General > Support

Still not showing Group Online/Offline at Visitor's side

(1/2) > >>

owhweb:
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

Eddybaur:
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?

owhweb:
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.

Eddybaur:
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.

Inspirer:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version