Kayako Logo
Developers & Code Interested in customizing your Kayako products? Discuss modifications and develop your own mods with the community.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
sws Offline
Member
 
Posts: 42
Join Date: Aug 2006

Talking WYSIWYG Html Emails - DONE !!!! - 17-12-2006, 01:57 AM

MOD NOW DONE, FULLY WORKING AND IN CONSTANT USE

Please read my new post below

including instructions on how to integrate the WYSIWYG Edittor back into Kayako !!!
Attached Images
File Type: jpg html.jpg (23.1 KB, 495 views)

Last edited by sws : 20-12-2006 at 01:19 AM.
   
Reply With Quote
  (#2) Old
sws Offline
Member
 
Posts: 42
Join Date: Aug 2006

Smile WYSIWYG - Integrated Successfully !!!! - 19-12-2006, 02:35 AM

I have finally after painstaking hours managed to integrate the HTML edittor myself.

Using the option above will break the KB editor and problems such as the text area will not define correctly, leaving no input box.

The way I have it now is the html box only intialises when you click the reply tab, the Predefined replies can be used if you click < > source code first then insert them...

Pretty cool, and now I am happy !

If you guys want the instructions for this please let me know, no point me typing a list out if nobody else wants it !

So far I have had NO issues with it sending as html, so I have no idea why Kayako are adament to leave it out !

Integrating will require an OWNED version, so you can edit the .php files
theres not too much to be done and worth while in the end.

So far I have it working on the REPLY to a ticket tab, and also CREATE NEW EMAIL...

Ive not tackled the "forwarding" part yet.
   
Reply With Quote
  (#3) Old
User Name Offline
Member
 
Posts: 116
Join Date: May 2005

19-12-2006, 06:46 AM

Well, I'm interested...


PHP 5.1.5
MySQL 5.0.24
eSupport 3.04.10 (Zend, self-hosted)
   
Reply With Quote
  (#4) Old
sws Offline
Member
 
Posts: 42
Join Date: Aug 2006

19-12-2006, 10:04 AM

Here Goes....

TESTED ON KAYAKO E-Support V3.04.10

BACKUP THE FILES BEFORE YOU EDIT THEM ! I WILL NOT BE HELD RESPONSIBLE FOR ANY PROBLEMS, If an error occurs you will then be able to re-upload your original files !!!



EDIT FILE : themes/admin_default/cpheader.tpl

Locate the following lines (41 - 58)

CHANGE the following code

Code:
<{if $htmlarea eq true}>
var _editor_lang = "en";
var _editor_url = "<{$swiftpath}>includes/htmlArea/";
var editor = null;
<{if $htmlareanotable neq true}>var loadTablePlugin = false;<{else}>var loadTablePlugin = true;<{/if}>
<{/if}>
</script>
<{if $htmlarea eq true}>
<script type="text/javascript" src="<{$swiftpath}>includes/htmlArea/htmlarea.js"></script>
<{/if}>
<{processCPMenu area=$area}>
<script language="Javascript">
//HTMLArea.loadPlugin("TableOperations");
function loadAllData() { preloadMenuImages(); <{if $htmlarea eq true}>
  editor = new HTMLArea("contents");
//  editor.registerPlugin(TableOperations);
  editor.generate();
<{/if}>
to this (this will allow the new html editor area defined for the reply box to be used

Code:
 
  <{if $htmlarea eq true || $htmlarea2 eq true }>
      var _editor_lang = "en";
      var _editor_url = "<{$swiftpath}>includes/htmlArea/";
      var editor = null;
      <{if $htmlareanotable eq true}>var loadTablePlugin = false;<{else}>var loadTablePlugin = true;<{/if}>
  <{/if}></script>

<{if $htmlarea eq true  || $htmlarea2 eq true}>
     <script type="text/javascript" src="<{$swiftpath}>includes/htmlArea/htmlarea.js"></script>
<{/if}>

<{processCPMenu area=$area}>
<script language="Javascript">
//HTMLArea.loadPlugin("TableOperations");
function loadAllData() { preloadMenuImages(); 

<{if $htmlarea eq true}>
   editor = new HTMLArea("contents");
//  editor.registerPlugin(TableOperations);
   editor.generate(); 
<{/if}>

Next you need to add the following lines between :

Code:
</script>
</head>
so you end up with : (this allows your custome Javascript function to initialise the window only when required
otherwise the size will not be defined correctly.

Code:
</script> // script as shown above


<script language="Javascript">
  function EDITORON(){
 editor = new HTMLArea("replycontents");
//  editor.registerPlugin(TableOperations);
   editor.generate(); 
}
</script>

</head> // head as shown above
*****************************************

EDIT FILE : modules/tickets/staff_viewticket.php

On or around Line 84

$template->assign("isviewticket", true);

Add this code Above that line
Code:
$template->assign("htmlarea2", true);
On or around Line 478 add the following code as highlighted in RED

Code:
	printDescRow($_SWIFT["language"]["contents"]);
	$colarray = array();
	$colarray[0]["align"] = "left";
	$colarray[0]["valign"] = "top";
	$colarray[0]["colspan"] = "2";
	$colarray[0]["nowrap"] = true;
	$colarray[0]["value"] = '<textarea style="WIDTH:100%;" name="replycontents" class="swifttextarea" id="replycontents" cols="100" rows="15" tabindex="99" onselect="javascript:storeCaret(this);" onclick="javascript:storeCaret(this);" onkeyup="javascript:storeCaret(this);">'. htmlspecialchars(iif(!empty($_ticket["draft"]), $_ticket["draft"], $_POST["replycontents"])) .'</textarea>'.SWIFT_CRLF;
	$colarray[0]["class"] = getRowBG();
	printDataRow($colarray);
Just below above code add the following highlighted in RED
This creates a link to initialise the HTML editor, so its not ALWAYS ON

Code:
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><a href="javascript:voide(0);" OnClick="EDITORON();">| Editor |</a></td><td width="180" nowrap><span class="smalltext">'. $_SWIFT["language"]["pdue"] .'<input type="text" name="opt_due" id="f_date_c" size="12" readonly="1" value="" class="swifttext"/>&nbsp;
If you would like it always on, find the line approx 146 and add the code in RED
IF YOU ADD THIS, SKIP THE STEP ABOVE AS THE LINK WILL NOT BE REQIREd

Code:
	<li><a href="#" onClick="this.blur(); switchGridTab(\'ttpostreply\', \'tickets\'); document.replyform.replycontents.focus(); EDITORON();" id="ttpostreply" title="'. $_SWIFT["language"]["tabpostreply"] .'">'. $_SWIFT["language"]["tabpostreply"] .'</a></li>';

That will enable you to use the HTML Edittor on Ticket Replies either automaicalyy or using a new link set up next to the Due Date .

I will add the instructions for the other areas soon.

Please let me know if you integrate this, of course any problems let me know !

Last edited by sws : 05-03-2007 at 06:34 PM.
   
Reply With Quote
  (#5) Old
sws Offline
Member
 
Posts: 42
Join Date: Aug 2006

Talking 19-12-2006, 10:21 AM

Once integrated above, to also add the same WYSIWYG area to NEW tickets
created by your staff follow the same procedure


EDIT FILE : modules/tickets/staff_newticket.php

Add the code in RED :

Code:
* ###############################################
* NEW TICKET
* ###############################################
*/
if ($eventaction == "newticket")
{	

$template->assign("htmlarea2", true);

Then near the bottom find this line and add the code in red

Code:
$colarray[0]["value"] = '<textarea style="WIDTH:100%;" name="replycontents" class="swifttextarea" id="replycontents"  cols="100" rows="15" tabindex="99" onselect="javascript:storeCaret(this);" onclick="javascript:storeCaret(this);" onkeyup="javascript:storeCaret(this);">'. htmlspecialchars($_POST["replycontents"]) .'</textarea>'.SWIFT_CRLF;
	$colarray[0]["class"] = getRowBG();
Then add the following code in RED (just underneath above)

Code:
echo '<tr class="'. getRowBG() .'">
	<td width="100" align="left"><span class="tabletitle">'. $_SWIFT["language"]["options"] .'</span></td>
	<td align="left"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><a href="javascript:voide(0);" OnClick="EDITORON();">| Editor |</a></td><td width="170" nowrap><span class="smalltext">'. $_SWIFT["language"]["pdue"] .'<input type="text" name="opt_due" id="opt_fdue" onclick="return showCalendar(\'opt_fdue\', \'%d/%m/%Y\');" size="12" readonly="1" value="" class="swifttext"/>&nbsp;<img src="'. $_SWIFT["themepath"] .'calendar.gif" id="opt_fduet" onclick="return showCalendar(\'opt_fdue\', \'%d/%m/%Y\');" style="cursor: pointer;" align="absmiddle"/></span></td><td nowrap><span class="smalltext">'. $_SWIFT["language"]["ptimeworked"] .'<input type="text" name="opt_timeworked" size="12" value="'. $_SWIFT["language"]["inminutes"] .'" onclick="javascript:if(this.value==\''. $_SWIFT["language"]["inminutes"] .'\') { this.value=\'\'; }" class="swifttext"/>&nbsp;
	&nbsp;&nbsp;'. $_SWIFT["language"]["tdispatch"] .' <label for="emailautoresponder"><input type="checkbox" id="emailautoresponder" style="MARGIN: 0px; PADDING: 0px; MARGIN-TOP: 4px;" name="emailautoresponder" value="1"'.$_emailautoresponder.' /> '. $_SWIFT["language"]["tnautores"] .'</label> <label for="emailcontents"><input id="emailcontents" type="checkbox" name="emailcontents" style="MARGIN: 0px; PADDING: 0px; MARGIN-TOP: 4px;" value="1"'.$_emailcontents.' /> '. $_SWIFT["language"]["tncontents"] .'</label></span></td></tr></table>
</td>
Instructions are more basic above, but if you integrated the first steps then this is almost identical !

Clicking the new EDITOR button multiple times will load new instances of the html editor... only click once . Other than that

GET HTML EMAILING YOUR CUSTOMERS


HAPPY CHRISTMAS FROM SWS SOLUTIONS

www.sws-solutions.co.uk


Screenshots show this MOD in action on my live Kayako System (Excuse my spelling, I think I may have had one too many !)
Attached Images
File Type: gif screen1.gif (34.2 KB, 194 views)
File Type: gif screen2.gif (50.8 KB, 203 views)
File Type: gif screen3.gif (47.3 KB, 185 views)

Last edited by sws : 19-12-2006 at 01:18 PM. Reason: Just adding Screenshots
   
Reply With Quote
  (#6) Old
User Name Offline
Member
 
Posts: 116
Join Date: May 2005

20-12-2006, 01:31 AM

Thanks!!


PHP 5.1.5
MySQL 5.0.24
eSupport 3.04.10 (Zend, self-hosted)
   
Reply With Quote
  (#7) Old
sws Offline
Member
 
Posts: 42
Join Date: Aug 2006

20-12-2006, 01:52 AM

Any problems, let me know !

Nothing would please me more than to help the handfull of people who have requested this and had to listen to Kayako say NO - NEVER !
   
Reply With Quote
  (#8) Old
elrafei Offline
New Member
 
Posts: 20
Join Date: Nov 2006

09-01-2007, 08:40 PM

thanx SWS for ur efforts but i have some questions

does that mean that guest and members can't cause any troubles when allowing them to use html tags in the posts?

and is this option only for admins or staff ?

or members can use same options too ?

thanx
   
Reply With Quote
  (#9) Old
sws Offline
Member
 
Posts: 42
Join Date: Aug 2006

10-01-2007, 09:35 AM

This is currently a mod for staff replies only

It wouldnt be too difficult to integrate anywhere else required, just let me know what areas.

This basically means you can turn on HTML emails for incoming & outgoing
and then use HTML tags, or the WYSIWYG edittor for staff replies or new staff emails.
   
Reply With Quote
  (#10) Old
elrafei Offline
New Member
 
Posts: 20
Join Date: Nov 2006

31-01-2007, 09:03 PM

sir

i have problem if i try to relpy any post the three file Attach Files plz help if u can edit to us or till me why the error is occurred >>

Attached Images
File Type: jpg untitled.JPG (51.9 KB, 57 views)
Attached Files
File Type: zip kayako.zip (20.7 KB, 60 views)
   
Reply With Quote
  (#11) Old
elrafei Offline
New Member
 
Posts: 20
Join Date: Nov 2006

01-02-2007, 12:55 AM

sws plz help
   
Reply With Quote
  (#12) Old
elrafei Offline
New Member
 
Posts: 20
Join Date: Nov 2006

02-02-2007, 12:09 AM

any help plz
   
Reply With Quote
  (#13) Old
elrafei Offline
New Member
 
Posts: 20
Join Date: Nov 2006

06-02-2007, 06:06 PM

help
   
Reply With Quote
  (#14) Old
elrafei Offline
New Member
 
Posts: 20
Join Date: Nov 2006

12-02-2007, 08:32 PM

help
   
Reply With Quote
  (#15) Old
sws Offline
Member
 
Posts: 42
Join Date: Aug 2006

12-02-2007, 10:11 PM

Sorry I no longer visit this forum often, as it seems to be a useless place, nobody replies, nobody cares and nobody listens !

However, to contradict myself a little, what version of kayako are you running ? I have not come across this problem but will find a resolution for you.
   
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outgoing HTML Emails Need Staff To Code HTML in Tickets? Elite SupportSuite, eSupport and LiveResponse 7 08-01-2008 07:51 PM



Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

Kayako provides online help desk software and support solutions; enabling companies to improve their support and reduce costs.

Our three main products include: SupportSuite, eSupport and LiveResponse



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46