Integration & Importer for Kayako 3
These instructions apply to Kayako version 3. Click here for Kayako 4 instructions.
Integration is for those of you that just want the Tutorial Viewer to be integrated seamlessly with your helpdesk. You will essentially be wrapping your existing Kayako theme around the Tutorial Viewer.
Or, you might prefer to use our new Importer, which creates an article in Kayako for every series / tutorial.
All DemoWolf customers receive full access to the integration options and importer. The importer has been added to the Tutorial Viewer ZIP file you download from the Client Area. Purchasers will need to be sure to set their Tutorial Viewers to Dynamic mode; the Static Tutorial Viewer does not provide you with the importer.
You do not need to perform the Kayako Integration steps if you simply want to run the Importer.
Kayako Integration
1. Set your Tutorial Viewer’s run mode to Kayako Integration.
2. Download the latest Tutorial Viewer files from the Client Area and upload them to your server.
3. For the purpose of these instructions, we have Kayako installed in /kayako and the tutorial viewer in a subfolder of Kayako, /kayako/viewer/
4. Within the Tutorial Viewer files, you will see a folder named “resources”. This contains a folder named “integration” and in it, another folder, “kayako3″.
a. The only file in here is named dw-tutorials.php. This is what your clients will use to access the Tutorial Viewer. You can rename the file to whatever you want.
i. If you rename this file, be sure to update the $tutorials_php variable near the top of the file; it should always match the name of that file.
ii. Below $tutorials_php, you’ll see another variable: $path_to_dw. This variable must contain the relative path from Kayako to the Tutorial Viewer; in our case, that’s viewer/. Be sure to put a trailing slash on the end of the path. You should never put a filesystem path here (such as /home/user/public_html/).
5. After making any modifications to dw-tutorials.php, upload the file to the root directory of Kayako.
6. You will need to modify your Kayako theme’s header template. Go to your Admin Dashboard, then in the Options menu at left, click Templates, then Manage Groups.
a. View the Templates for whichever template group you’re using.
b. Under General, you’ll see a template named header. Edit it.
c. Before this line:
<{if $ismodernbill == false && $ismodernbillv5 == false && $iswhmcs == false}></head>
Add:
<{if $dw_head}><{$dw_head}><{/if}>
7. You will also need to add an entry to Kayako’s index page linking to dw-tutorials.php (or whatever you’ve called it). You’d do this by editing one of Kayako’s files: includes/Widgets/widgets.php. Open this file. Roughly halfway down the page, you will see code similar to the following. You will need to add everything after:
// DemoWolf Integration
// ======= KNOWLEDGEBASE =======
if ($module->isRegistered(MODULE_KNOWLEDGEBASE) && $_SWIFT["settings"]["kb_enableclient"] == 1 && $_SWIFT["user"]["permissions"]["perm_canviewknowledgebase"] != "0")
{
$_widgets[$index]["icon"] = $_SWIFT["themepath"]."knowledgebase.gif";
$_widgets[$index]["title"] = $_SWIFT["language"]["knowledgebase"];
$_widgets[$index]["description"] = $_SWIFT["language"]["desc_knowledgebase"];
$_widgets[$index]["link"] = iif(defined("ISMODERNBILL"), "user.php?op=menu&tile=faq&_m=knowledgebase&_a=view", "index.php?_m=knowledgebase&_a=view");
$template->assign("cansearch", true);
$template->assign("kbcansearch", true);
$index++;
// DemoWolf Integration
$_widgets[$index]["icon"] = $_SWIFT["themepath"] . "tutorials.gif";
$_widgets[$index]["title"] = $_SWIFT["language"]["tutorials"];
$_widgets[$index]["description"] = $_SWIFT["language"]["desc_tutorials"];
$_widgets[$index]["link"] = "dw-tutorials.php";
$index++;
}
a. Customize $_widgets[$index]["icon"] to whatever image you’d like to use. It should go in your theme’s image folder, i.e. themes/your_theme/.
b. We’ve provided you two possible icons in several different sizes and formats, on either a transparent or white background. You might want to use one of those, or feel free to use your own. See the resources/integration/icons/ folder.
c. Customize $_widgets[$index]["link"] to whatever you named dw-tutorials.php.
8. Finally, you must enter the text to show for the Widget you just added to your Kayako homepage. Return to the Admin panel, then go to Options > Languages > Manage Phrases.
a. Click Insert Phrase.
b. Create a new phrase with Identifier set to tutorials. Section should be default. Text is whatever title you want, such as “Video Tutorials”.
c. Then create another new phrase. Identifier: desc_tutorials, Section: default. Text could be something like “Watch video tutorials on a variety of topics.”
9. That’s it! Your Tutorial Viewer should now look just like any other area of your Kayako installation.
DemoWolf Importer
Within the Tutorial Viewer files, you will see a folder named “resources”. In it, there is a folder called “importer”. This is what you will run to import your demos into your knowledgebase.
Note: If you’d like to insert identical text before and/or after every tutorial, you can do so by editing the resources/importer/templates/demo.tpl file. Make sure you leave {{demo}} in there somewhere or else the demos will not show up.
1. Upload the entire resources/ folder to the Tutorial Viewer folder on your server.
2. Before you can run the Importer, you must remove the importer.lock file (in the importer folder).
3. Then, navigate to the resources/importer/ folder in your web browser.
4. The importer is a four-step process. Read over the instructions and fill out the fields appropriately.
a. Step One asks you where you’ll be importing and where your tutorial files are located.
b. Step Two lets you customize the way the tutorials will show up, etc.
c. Step Three is where you choose which series to import. We recommend you only import one series at first, in case of any problems and to ensure you like your chosen settings.
d. Step Four is the importing phase. Barring any errors, after this step your demos should have been imported into your knowledgebase.
5. If you chose the Play Button option, you will need to ensure there is an image within the Kayako folder named images/play.png. There are a few .png images in the resources/importer/images/ folder that you might want to use, or feel free to use your own.
6. If you’ve chosen to use the Colorbox option, you will need to perform one more step.
a. Be sure to replace any instances of /clients/viewer/ below with whatever you entered for “URI to the Tutorial Viewer” in Step One of the import process.
b. For Kayako: Go to your Admin Dashboard, then in the Options menu at left, click Templates, then Manage Groups.
c. View the Templates for whichever template group you’re using.
d. Under General, you’ll see a template named header. Edit it.
e. Before this line:
<{if $ismodernbill == false && $ismodernbillv5 == false && $iswhmcs == false}></head>
Add:
<link type="text/css" rel="stylesheet" href="/clients/viewer/js/colorbox.css" />
<script type="text/javascript" src="/clients/viewer/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/clients/viewer/js/jquery.colorbox.js"></script>
<script type="text/javascript" src="/clients/viewer/request.php?type=js"></script>
If you have imported your tutorials and are also using the Kayako Integration option described above, you should use the following code instead:
<{if $dw_head}>
<{$dw_head}>
<{else}>
<link type="text/css" rel="stylesheet" href="/clients/viewer/js/colorbox.css" />
<script type="text/javascript" src="/clients/viewer/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/clients/viewer/js/jquery.colorbox.js"></script>
<script type="text/javascript" src="/clients/viewer/request.php?type=js"></script>
<{/if}>
That’s it! Your demos should now be imported into Kayako.