Instructions for those who are using MODed version of OS Ticket (after all this is the MODS Forum)
1. In include/ajax.tickets.php change the following
a) In Function searchbyemail:
Search for:
$input = db_input(strtolower($params),false);
replace with:
$input = strtolower($params);
next
Search for:
$sql='SELECT DISTINCT email,name FROM '.TICKET_TABLE.' WHERE email LIKE \''.$input.'%\' ORDER BY created LIMIT '.$limit;
Replace with:
$sql='SELECT DISTINCT email,name,phone FROM '.TICKET_TABLE.' WHERE email LIKE \''.$input.'%\' ORDER BY created LIMIT '.$limit;
next
search for:
while(list($email,$name)=db_fetch_row($resp)) {
replace with:
while(list($email,$name,$phone)=db_fetch_row($resp)) {
next
search for:
$items ='{"id": "'.$email.'", "value": "'.$email.'", "info": "'.$name.'"}';
replace with:
$items ='{"id": "'.$email.'", "value": "'.$email.'", "info": "'.$name.'", "phone": "'.$phone.'"}';
b) In Function search($params):
search for:
$input = db_input(strtolower($params),false);
replace with:
$input = strtolower($params);
**NOTE** For some reason the releaseLOCK function has been removed from the file attached
2. In include/staff/newticket.inc.php change the following
Search for:
<td><input type="text" name="phone" size="25" value="<?=$info?>">
Ext <input type="text" name="phone_ext" size="6" value="<?=$info?>">
<font class="error"> <?=$errors?></font></td>
replace with:
<td><input type="text" id="phone" name="phone" size="25" value="<?=$info?>"> <font class="error"> <?=$errors?></font></td>
next
search for:
callback: function (obj) { document.getElementById('email').value = obj.id; document.getElementById('name').value = obj.info; return false;}
replace with:
callback: function (obj) { document.getElementById('email').value = obj.id; document.getElementById('name').value = obj.info; document.getElementById('phone').value = obj.phone; return false; }
2. In SCP/JS/bsn.AutoSuggest_2.1.3.js change the following:
search for:
Vthis.aSug.push( { 'id'.results.id, 'value'.results.value, 'info'.results.info } );
replace with:
this.aSug.push( { 'id'.results.id, 'value'.results.value, 'info'.results.info, 'phone'.results.phone } );
next
search for:
span.appendChild(small);
below it add:
span.appendChild(br);
var small2 = _b.DOM.cE("small", {}, arr.phone);
span.appendChild(small2);
Enjoy