This MOD will allow you to view the original email message headers. The headers also take alot of screen space so we have them “hidden” by default but you can click a link to expand and view them.
1.6ST: If you have not yet modified include/staff/viewticket.inc.php or scp/js/scp.js then you can simply download the following files and replace them. As always, make backups of your local files first.
Download
Hidden | Shown |
Find the following in include/staff/viewticket.inc.php
<tr><th nowrap>Last Message:</th> <td><?=Format::db_datetime($ticket->getLastMessageDate())?></td> </tr> </table> </td> </tr> </table>
Add AFTER that:
<? $query='SELECT headers,created FROM '.TICKET_MESSAGE_TABLE.' WHERE ticket_id='.db_input($id).' ORDER BY created DESC LIMIT 1'; $result=mysql_query($query); while ($row = mysql_fetch_assoc($result)) { $headers=htmlentities($row['headers']); } ?> <?php if($headers!=''){ ?> <span class="msg"><a href="#" onclick="ShowHeaders();">Show/Hide Headers</a></span> <table align="center" id="headerTable" style="display:none" class="ticketinfo" cellspacing="1" cellpadding="3" width="100%" border=0> <tr> <td><?=nl2br($headers);?> </td> </tr> </table> <?php } ?>
Add the ability to show/hide it
scp/js/scp.js
function dispHidden(obj) { if(obj.style.display == "none") { obj.style.display = ""; } else { obj.style.display = "none"; } } function ShowHeaders() { dispHidden(headerTable) }
Great mod! Implemented it this morning, works as desired. Thanks a lot!
Awesome! Thanks for the feedback! 🙂
Very nice — just put the mod in — worked fine.
Thanks,
leon …
Awesome, glad it worked for you. Thanks for the feedback!
This is excellent — It even works on emails previously submitted!
One thing I’ve noticed is I now cant view the info in the system log of admin panel on 1.6ST
Not sure whats going on there, I can still view my system log info just fine — this MOD doesn’t touch that code. You sure you haven’t implemented anything else recently and are just now noticing it?
Doesn’t work….
Thomas, can you be more specific? What isn’t working? Do you not see the headers at all, do they always show but can’t be hidden, are they always hidden, do you get an error message?
Can you send over your files with this mod and I can compare.?
You have my email in your inbox.
Hello
I have a problem:
There is no data in the “Headers” in table “ticket_message” hence the above shows no information.
Could you please help me.
Greetings
Its not going to show any headers unless the ticket was created via email. Was this tickets sent in via email?
Thanks for your quick response, the ticket has been made by the ticket system. I think it was created via mail
Could you give me an example of how this would create a ticket via.
I hope not to bother with these questions
No worries, how did you, your staff, or the user come to create the ticket? What steps did you take?
Did you browse to a webpage of your tickets installation or did you setup email and someone sent an email to it?
I will tell you how
I have always wanted a mod like this, but sadly just found it after I had upgraded to osTicket Core, v1.8.0.1
Any chance you could look into making this mod work in the latest osTicket version?
It would be great if this could be updated to work with the latest osTicket. I think this mod would be a great feature to have to troubleshoot when user’s emails come in and create multiple tickets.