- Edited
Hello all,
This is a very simple change, but has been very effective for our staff when they have several tickets open at one time. Currently if a user opens several tickets the tabs in IE, Firefox or Chrome only display the standard page title and it makes it difficult to determine which tab is which ticket.
This small modification will check if the page being displayed is a ticket and will display the Ticket # and Subject as the page title. If there is no ticket open it will default to the standard page title.
Step 1
Open include\staff\header.inc.php
Find
<title>YOUR CUSTOM PAGE TITLE</title>
This may still be the default:
<title>osTicket :: Staff Control Panel</title>
Replace with:
<?php
if($ticket && is_object($ticket)){ ?>
<title>Ticket #<?=$ticket->getExtId()?> - <?=Format:($ticket->getSubject())?></title>
<?}else{?>
<title>YOUR CUSTOM PAGE TITLE</title>
<?}?>
That's it. Now when you open a ticket the page title with be the Ticket # + Subject.
Of course you can change the information display to whatever you like by replace the get******* commands with others such as:
Status: getStatus
Priority: getPriority
Dept Name: getDeptName
Assigned Staff:
<?=$staff?Format:($staff->getName()):'- unassigned -'?>
etc etc.
There are other, which you can find in \include\staff\viewticket.inc.php if needed.
Hope this comes in handy to somebody. And remember to back up your code before attempting!