Kayako – Uploading Images into a Knowledgebase Article


From time to time I blog on a non television issue.  Namely when I solve a complex tech issue in my life.

Often the whole reason for the article is so that I can remember how to do it again later.

Kayako 4 is a huge disappointment so far.  The app was clearly rushed before being completed and is missing several vital features including the ability to report on your support activity or the ability to upload images in an easy way for inclusion in knowledgebase articles.

Having solved my reporting issue by writing a series of MYSQL statements (seriously…) I have moved on to the knowledgebase.

I am going to write down what I had to do in order to make this work.  The reason being, is that the directions on the forums, although complete and accurate make a few assumptions about the enduser’s level of knowledge of javascript and php.

If you want to include the filebrowser to upload images in Kayako (which uses TinyMCE) you must first download the PDW Filebrowser from here.

Once you’ve downloaded it extract it to your kayako install folder here: “__swift/thirdparty/TinyMCE/plugins/pdw_file_browser”

Then you want to edit your core.js file to allow the new file browser to be called.  The core.js file is located in : “\__swift\themes\admin_default\core.js”

First backup this file.

Do a search for LoadTinyMCE and enter the red text.  Note the BLUE text below is the location of your Kayako install so you’ll need to modify that part to match your site.

function LoadTinyMCE() {
if (!$(‘.tinymce’).length) {
return false;
}

$(‘.tinymce’).tinymce({
// General options
script_url : swiftpath + ‘__swift/thirdparty/TinyMCE/tiny_mce_gzip.php’,
theme : “advanced”,
plugins : “safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template”,

// Theme options
theme_advanced_buttons1 : “formatselect,fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,backcolor”,
theme_advanced_buttons2 : “cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,insertdate,inserttime,preview”,
theme_advanced_buttons3 : “tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,advhr,pagebreak|,ltr,rtl,|,fullscreen”,
theme_advanced_toolbar_location : “top”,
theme_advanced_toolbar_align : “left”,
theme_advanced_statusbar_location : “bottom”,
theme_advanced_resizing : true,
//        force_br_newlines : true,
force_p_newlines : true,
forced_root_block : ”,
content_css : swiftpath + ‘__swift/themes/admin_default/tinymce.css’,file_browser_callback : “filebrowser”
});
};

function filebrowser(field_name, url, type, win) {

fileBrowserURL = “/kayako/__swift/thirdparty/TinyMCE/plugins/pdw_file_browser/index.php?editor=tinymce&filter=” + type;

tinyMCE.activeEditor.windowManager.open({ title: “PDW File Browser”, url: fileBrowserURL, width: 950, height: 650, inline: 0, maximizable: 1, close_previous: 0 },{ window : win, input : field_name }
);
}

function MoveCommentReply(_commentID) {
    $(‘#commentsformcontainer’).appendTo(‘#commentreplycontainer_’ + _commentID);
    $(‘#commentformparentcommentid’).val(_commentID);
};

You then want to save this file and open the config file for the file browser.  It is located in  “/__swift/thirdparty/pdw_file_browser”

First do a search for UPLOAD path and replace the path there with the location on your server that you would like to upload your images to.

/*
* UPLOAD PATH
*
* absolute path from root to upload folder (DON’T FORGET SLASHES)
*
* Example
* —————————————
* http://www.domain.com/images/upload/
* $uploadpath = ‘/images/upload/’;
*
*/
$uploadpath = “/path/to/upload/folder/“; // absolute path from root to upload folder (DON’T FORGET SLASHES)

You can also change the upload file size here as well.  I left mine at a max of 1 meg.

You can then save this.

Make sure you also DELETE your CACHE files on both your local machine as well as the server.  The cache files are located in: __swift/cache

Be careful when you delete these files not to accidentally delete the __swift/config folder (thats what I did) which will require you to rebuild those files (presumably from a backup)

Another thing to keep in mind is that your browser likes to cache the page you are on.  Which is why I used private browsing mode in Firefox while doing this worked.  This ensured I was viewing the live page instead of an older cached one.

Once done, the last thing you’ll want to do is actually UPLOAD a picture.  All of that javascript editing was done to basically add a small icon to the screen

Image1

image2

Image3

A very special thank you to the cool guy that wrote the plugin Neele.    And a HUGE thank you to Nathan Kelly who posted the original instructions in the Kayako Forums.

If this is helpful to you please leave a comment saying so.  If you notice any mistakes, or have anything that should be added/included please let me know.

Watch the Dana Carvey Show Online


I thought I was gonna die… In the Spring of 1996 Dana Carvey began a short eight episode run on ABC.  Of course ABC (always bein’ cancelled) let the show die, and I thought I was never going to see the show again.  I was shocked and THRILLED when I found this on Crackle the other day.  All eight episodes of the Dana Carvey show are now available online HERE.

The Dana Carvey Show saw actors including a young Stephen Colbert and Steve Carell.  You’ll also catch some of the original Robert Smigel cartoons.  If you’ve never seen it and you love to laugh check it out!

Watch I Dream Of Jeanie Online


I Dream of Jeanie Intertitle

Crackle.com seems to be adding some pretty fun stuff.  I Dream Of Jeanie is now available in their TV shows selection.  It would appear that 96 of the 139 episodes are now up for viewing.  If you’re a fan of Jeanie and her Master check it out HERE.

Crackle.com requires a user to sign up to watch the shows and movies, however once signed up everything seems to be free, and currently commercial free.  Check it out!

 

Watch Action Online


Action was a biting sarcastic and often nasty look at the movie business.  It aired on Fox for only 13 episodes and was then cancelled.  In all my years I have never seen a show like it, and sadly, I fear I never will again.  I just discovered it available on Crackle.  Episodes are even available to us Canadians, check it out HERE.  Crackle requires you create an account to view the shows and movies, but once you do you are free to watch what you’d like.

For those of you who remember, check out the intro below.

And for those of you who’ve never seen it, check it out here.

Watch Haven Online


Fan’s of the Syfy Channel’s Haven are no doubt looking forward to the start of season 2 set to kick of July 15, 2011!  This Canadian / US Production shot in Nova Scotia returns to the airwaves soon, but in the meantime for Canadians you can still catch season 1 on Showcase’s website here.

You can also catch up in the US on Syfy’s website here.

Season 1 Promo

Season 2 Promo

Watch Bewitched Online


Growing up my cousins and I used to wake up in the summer just in time to watch Bewitched.  So I was just tickled pink when I discovered you can watch nearly every episode online at Crackle!  Crackle requires you to create a login but it works from Canada so go on in and give it a try!

To watch full length episodes of Bewitch click HERE.

Watch Weeds Online


For those of you catching up on your Weeds watching, or discovering the show for the first time.  Showcase now has seasons 3, 4, 5 & 6 of Weeds online for viewing with some episodes available in HD.  Canadians can click HERE to watch.

Netflix is has acquired the rights to seasons one and two in Canada.  These episodes can be watched here.

Watch CBC TV on your iPad


Canadian television stations and networks are embracing the iPad and iPod touch faster than they ever did for streaming video.  But, the past is the past.  The CBC now have an App in the Apple App store for watching all of their video content on your iPad, iPod Touch, or iPhone.  You can download it HERE.

Watch Global TV on iPad iPhone and iPod Touch


GlobalTV not to be outdone by Rogers has released their own iPad app for watching their content directly on your iPod, iPad or iPhone.  You can read all about it HERE, or better yet, download it directly from iTunes HERE.

Watch City TV on iPad


CityTV now has an iPad app that you can download to watch City TVs programs right from your iPad.  To download it jump over to iTunes and search for City TV.  Or if you’re on your iPad now click HERE.

Follow

Get every new post delivered to your Inbox.