At my full time job we often reference the ticket ID that we are working on in our daily log, notes or when just when referencing it from person to person. The following will allow for showing the external ticket ID in the browser title.
First we need a new function to reference, find the following in
include/class.ticket.php
/*============== Functions below do not require an instance of the class to be used. To call it use Ticket::function(params); ==================*/
And add the following right after it:
function getExtIdById($id){ $sql ='SELECT ticketID FROM '.TICKET_TABLE.' ticket WHERE ticket_id='.db_input($id); $res=db_query($sql); if($res && db_num_rows($res)) list($extid)=db_fetch_row($res); return $extid; }
Now open up
include/staff/header.inc.php and add the following just after your <title> tag:
<?if(Ticket::getExtIdById($id)){ echo Ticket::getExtIdById($id)." - "; }?>
Update!
There are a couple of pages you may be on (like “My Preferences”) where the ticket class is not loaded. In order to make sure it’s loaded for use you can added the following just before the title tag:
require_once('../include/class.ticket.php');