| ||||||||||||
![]() |
| Notices |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Rating: | Display Modes |
(#1)
|
| Member Posts: 195 Join Date: Oct 2007 Location: Jakarta, Indonesia | HTML/Outlook Tickets and Queue Signature Problems - Solved! -
05-10-2008, 07:45 PM
Well, hopefully solved, anyway. Enough to be usable.Does your helpdesk workflow require you to receive and view emailed posts with HTML formatting? Has it been a real pain getting Kayako to handle HTML tickets well? Have you been to these threads recently...?
These problems have been around long enough. Kayako thinks they are merely 'cosmetic' and seems to push them to the backburner. The fact is, issues like this affect how our clients see us--literally. Signature lines that run together, clients that need to submit tables and other HTML formats that end up looking like garbage in the Staff CP and in the client ticket list... all these things make SupportSuite managers look bad in a big way. It's a pain having to spend so many hours pouring over forums and code for things like this. Argghh! </Rant> I do not claim that all of these fixes are pretty, or the most efficient way to do things. They work for me; they could work for you too, but don't blame me if you break anything. These fixes are for SupportSuite v3.11.02; I haven't tried them in any version later than that. The following settings and fixes will allow you to:
You'll be modifying the following files, so back them up:
Having the correct settings is critical. Settings->CPU Optimization & Server
This is an issue where plaintext queue signatures get their end-of-line characters stripped when included as part of an HTML mail. See Kayako Bug Tracker - Viewing Issue #595 - Newline stripping in plaintext signatures. What we need to do is make sure that line feeds get replaced by <br> tags for the HTML templates. In functions_ticketmain.php, locate the following code: PHP Code: PHP Code: Fix for 'Style Creep' Issue This issue and my fix is mentioned in Display HTML ticket posts properly (without breaking text-only posts). When SupportSuite displays an HTML post originating in Outlook, the surrounding menu styles will be overridden by the styles embedded in the HTML post, causing colored underlines to appear everywhere. In functions_ticketmain.php, locate the function getTicketPosts, and the following code around line 537: PHP Code: PHP Code: To get a good and reasonably consistent display for ticket mouseover previews, we're going to split off the HTML tag-stripping function and customize it a bit. We'll also cut out some 'fat' in the ticket details displayed by the mouseover. 1. In functions_html.php, locate the stripHTMLTags function near the end of the file, and place this modified version right after it: PHP Code: PHP Code: PHP Code: If you don't want/need to use 'No Processing' to show all the HTML in ticket posts, you can enable 'Strip Tags' to get a more uniform appearance in your tickets. I hacked the stripHTMLTags function to make this work. (I didn't have much luck with Sheep's fix.) In functions_html.php, locate the stripHTMLTags function (yes, again), and the following lines: PHP Code: PHP Code: Clean <IMG> Tags From Alerts This is optional. New ticket and client reply alerts sent to staff normally contain the contents of the ticket post. By default any <IMG> tags included in the post (a corporate logo, for example, included as an in-line attachment) will be there as well. Since SupportSuite does not have the ability to forward these in-line images, the <IMG> tag remains in the post, but width and height attributes may cause it to take up screen space, or an alt attribute causes it to display default text, such as the filename of the image. I would just as soon not see these things. To filter them out, you need to add a regular expression in two different files to strip these <IMG> tags completely out of the forwarded message text. 1. In functions_ticketmain.php, around line 1438, locate this code: PHP Code: PHP Code: PHP Code: PHP Code: Customizing Templates Now that your HTML emails are working great, you might want to think about customizing your templates to show off that pretty formatting. I recommend having a look at this article: [HOWTO] Show detailed ticket history in staff replies that looks good. Using this as a starting point, I customized all my HTML templates to display the company logo, and much more. Here's a quick hint: All these templates have the same basic structure, which as a beginner you should look for: <{if $ishtml == true}>Breaklines If you have lots of clients using Outlook, and if you allow replies to tickets or ticket alerts via email, then you've probably seen plenty of reply posts that have fragments of the original message attached as a result of the person hitting 'Reply' and typing their message without first deleting the old text. This is where breaklines come in. If the user has HTML enabled in their Outlook as the default format for new messages, then there should be no need for the breakline to kick in, as the <div> tags that contain the message separator will be stripped out by the email parser as a result of our settings. However, if the client uses plain text by default and replies to a SupportSuite staff post, then we need to think about the breakline. Other threads have dealt extensively with breaklines, so I won't go into this in detail. It can get complicated. I'll only note that most of our clients are English speakers who use MS Outlook 2007, and so the most common breakline we see in plain text messages is: > -----Original Message-----or simply -----Original Message-----If you decide to go with plain text message templates instead of HTML, then I recommend manually inserting a 'standard' breakline at the beginning of the plain text content for the autoresponder, staffreply, and various alert templates. Something along the lines of: ====== Please reply above this line ====== Referring to the structure mentioned above in Customizing Templates, this will go in the following location: Code: <{if $ishtml == true}>
<!-- HTML content goes here -->
<{else}>
====== Please reply above this line ======
The rest of the plain test message goes here.
<{/if}>
All Done! That's a lot to do, but hopefully you've now got a SupportSuite that displays HTML emails beautifully, doesn't mess up HTML email replies to ticket alerts, and doesn't break any plain text formatting either. Just like I have! ![]() + Free: Ticket List & Search Mods | Dept. Display Names + Free: (Almost) Perfect Outlook/HTML Tickets + Tutorials: SLA System Explained | Using Template Groups Kayako v3.20.02 | PHP: 5.2.6 | MySQL: 5.0.58 | CentOS 4 |
| | |
(#2)
|
| Member Posts: 195 Join Date: Oct 2007 Location: Jakarta, Indonesia |
05-10-2008, 07:50 PM
I wanted to further mention one 'bug' that I haven't been able to resolve. Bug prevents body of New Ticket Alerts from appearing in plain text format when alert is triggered by new ticket in HTML format received via email. This bug occurs when HTML Email is set to 'No', which should cause all emails to be in plain text. Incoming HTML email tickets are processed correctly as HTML, but any New Ticket Alerts are issued with the 'contentstext' variable full of HTML tags, producing a garbled message. This is issue is not seen when a new ticket is created via the web interface. New ticket alerts (and the 'contentstext' variable) are generated by /modules/functions_ticketcore.php at about line 512: PHP Code: + Free: Ticket List & Search Mods | Dept. Display Names + Free: (Almost) Perfect Outlook/HTML Tickets + Tutorials: SLA System Explained | Using Template Groups Kayako v3.20.02 | PHP: 5.2.6 | MySQL: 5.0.58 | CentOS 4 |
| | |
(#3)
|
(#4)
|
| Member Posts: 195 Join Date: Oct 2007 Location: Jakarta, Indonesia |
07-10-2008, 08:45 AM
Quote:
![]() + Free: Ticket List & Search Mods | Dept. Display Names + Free: (Almost) Perfect Outlook/HTML Tickets + Tutorials: SLA System Explained | Using Template Groups Kayako v3.20.02 | PHP: 5.2.6 | MySQL: 5.0.58 | CentOS 4 | |
| | |
(#5)
|
| Senior Member Posts: 3,858 Join Date: Aug 2006 Location: Mumbai, India |
07-10-2008, 12:05 PM
Alot of clients are having issues with this. I am sure this is more than useful for them! Professional and Affordable Kayako Skins - Specialists in Kayako Skinning & Customization - Professional Paid Support Our Skins and Services - http://www.supportskins.com/store/ SupportSkins.com - http://www.supportskins.com/ |
| | |
(#6)
|
(#7)
|
| Member Posts: 195 Join Date: Oct 2007 Location: Jakarta, Indonesia |
29-10-2008, 03:49 PM
Quote:
![]() + Free: Ticket List & Search Mods | Dept. Display Names + Free: (Almost) Perfect Outlook/HTML Tickets + Tutorials: SLA System Explained | Using Template Groups Kayako v3.20.02 | PHP: 5.2.6 | MySQL: 5.0.58 | CentOS 4 | |
| | |
(#8)
|
| Member Posts: 146 Join Date: May 2007 Location: Denmark |
29-10-2008, 04:26 PM
I must be blind. We are talking about the file includes/fucntions_html.php right? These are the last lines from my file: PHP Code: |