| getting somewhere -
23-06-2006, 05:24 AM
Hello again everyone (anyone?!). I may be getting somewhere with this. Kayako support advised to add a custom field to the user registration BUT this does not allow it to be searched upon when creating a call well ... I added an extra field in kayako_suite.swuseremails table called businesstelephonenumber (to keep to the same standard as the contacts table) then added the following code as stated:
File: modules\core\functions_userlookup.php - Inserted at line 82 // Additional from Bryan Grant to add phone numbers from kayako_suite.swuseremails.businesstelephonenumbers
// This will add another section in the search field for any phone numbers which are not null
// Bryan Grant 2006-06-23
$usersnode = &$menu->addItem(new HTML_TreeNode(array('text' => " ". $_SWIFT["language"]["users"], 'icon' => "icon_ticketphone.gif", 'expandedIcon' => "icon_ticketphone.gif", 'expanded' => true)));
foreach ($_userlist as $key=>$val)
{
$businesstelephonenumbercount = count($val["business"]);
if ($businesstelephonenumbercount > 1)
{
$usericon = 'icon_redbigdot.gif';
} else {
$usericon = 'icon_yellowbigdot.gif';
}
$_usernode = &$usersnode->addItem(new HTML_TreeNode(array('text' => " ". addslashes($val["fullname"]) ." ". iif($businesstelephonenumbercount>1, '('.intval($businesstelephonenumbercount).')'), 'link' => "javascript:windowPlacebusinesstelephonenumber(\'" . addslashes($val["business"][0]) ."\', \'".addslashes($_GET["formname"])."\', \'". addslashes($_GET["formfield"]) ."\')", 'icon' => $usericon, 'expandedIcon' => $usericon, 'expanded' => true)));
if ($businesstelephonenumbercount > 0)
{
foreach ($val["business"] as $businesstelephonenumberkey=>$businesstelephonenum berval)
{
if ($businesstelephonenumberval > 0)
{
$_businesstelephonenumbernode = &$_usernode->addItem(new HTML_TreeNode(array('text' => " ". addslashes($businesstelephonenumberval), 'link' => "javascript:windowPlacebusinesstelephonenumber(\'" . addslashes($businesstelephonenumberval) ."\', \'".addslashes($_GET["formname"])."\', \'". addslashes($_GET["formfield"]) ."\')", 'icon' => "icon_ticketphone.gif", 'expandedIcon' => "icon_ticketphone.gif", 'expanded' => true)));
}
}
}
}
// end Bryan Grant's entries
Still working to try and have loginshare map the phone number from active directory to the database in this field. I have got as far as the LDAP field is called telephoneNumber and I'm looking at the AD loginshare php file. If you come accross anything then please let me know! |