Depending on which template you want to add the capabilities to, you'll have to add these lines of code to \include\class.ticket.php I added them to the staff alerts. Which is around line 990 after if($resp && list($subj,$body)=db_fetch_row($resp)){
$subj = str_replace("%email", $ticket->getEmail(),$subj);
$subj = str_replace("%name", $ticket->getName(),$subj);
$subj = str_replace("%dept", $dept?$dept->getName():'',$subj);
If you want to include the subject and ticket number, add this code as well.
$subj = str_replace("%ticket", $ticket->getExtId(),$subj);
$subj = str_replace("%subject", $ticket->getSubject(),$subj);