Kayako logo
Modifications & Addon Releases Modification guides and addons are posted here to share with the community. Do not post requests in here!

Notices

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
NovaHost Offline
New Member
 
Posts: 7
Join Date: Oct 2007
Custom Department LiveSupport Selections - 04-10-2007, 02:03 PM

I had an issue where i wanted to only display help for certain departments within specific sections of my website. The current release of the product only lets you either have all departments available or only lets you choose a single department per support link.

The modification i have made allows you to now multiselect departments when you use the Tag Generator. From here you now have a list of departments in the <SCRIPT> block used to generate the live chat popup window link. When this window pops up it now only displays the departments chosen in the tag instead of the current all or one senerio.

From this, it will only detect and display the correct status for the selected departments.

:: EXAMPLE SENERIO ::

Your site sells car audio and car performence products. In the car audio section of your website you can now have a support link that only deals with "Car Audio Sales" and "Car Audio Support".

In turn, in the performence products section you could then have a seperate support link to deal with "Ask a pro", "Performence Parts Sales" and so on.

When a visitor click on the support link created through the Tag Generator, they will only be shown the appropriate departments for that section of your website.

:: File Modifications ::

I am by no means an established PHP developer but i know my way around it enough.

There are 9 changes in 2 files to be made.
Code:
 
 
:: FILE ::
 
/modules/livesupport/function_livesupport.php
 
change (line 342)
- else if ($dbCore->Record["departmentmodule"] == MODULE_LIVESUPPORT && $departmentid == $dbCore->Record["departmentid"])
change to
- else if ($dbCore->Record["departmentmodule"] == MODULE_LIVESUPPORT && in_array($dbCore->Record["departmentid"], explode(",", $departmentid))) {
 
change (line 289)
- if ($dbCore->Record["departmentid"] == $departmentid)
change to
- if (in_array($dbCore->Record["departmentid"], explode(",", $departmentid)))
 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
:: FILE ::
 
/modules/livesupport/staff_tags.php
 
change (line 50)
- $htmlcode .= '<script language="javascript" src="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=htmlcode&departmentid='. $departmentid .'"></script>'.SWIFT_CRLF;
change to
- $htmlcode .= '<script language="javascript" src="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=htmlcode&departmentid='. implode(",", $departmentid) .'"></script>'.SWIFT_CRLF;
 
change (line 80)
- printSelectRow("departmentid", $_SWIFT["language"]["fordepartment"], $_SWIFT["language"]["desc_fordepartment"], $options);
change to
- printSelectMultipleRow("departmentid", $_SWIFT["language"]["fordepartment"], $_SWIFT["language"]["desc_fordepartment"], $options);
 
change (line 108)
- $htmlcode .= '<a href="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=emailchat&departmentid='. $departmentid .'"><img src="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=emailimage&departmentid='. $departmentid .'" border="0" /></a>'.SWIFT_CRLF;
change to
- $htmlcode .= '<a href="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=emailchat&departmentid='. implode(",", $departmentid) .'"><img src="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=emailimage&departmentid='. implode(",", $departmentid) .'" border="0" /></a>'.SWIFT_CRLF;
 
change (line 137)
- printSelectRow("departmentid", $_SWIFT["language"]["fordepartment"], $_SWIFT["language"]["desc_fordepartment"], $options);
change to
- printSelectMultipleRow("departmentid", $_SWIFT["language"]["fordepartment"], $_SWIFT["language"]["desc_fordepartment"], $options);
 
change (line 164)
- $htmlcode .= '<script language="javascript" src="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=htmlcode&departmentid='. $departmentid .'&custom='.urlencode($custom).'"></script>'.SWIFT_CRLF;
change to
- $htmlcode .= '<script language="javascript" src="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=htmlcode&departmentid='. implode(",", $departmentid) .'&custom='.urlencode($custom).'"></script>'.SWIFT_CRLF;
 
change (line 201)
- printSelectRow("departmentid", $_SWIFT["language"]["fordepartment"], $_SWIFT["language"]["desc_fordepartment"], $options);
change to
- printSelectMultipleRow("departmentid", $_SWIFT["language"]["fordepartment"], $_SWIFT["language"]["desc_fordepartment"], $options);
 
change (line 229)
- $htmlcode .= '<script language="javascript" src="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=htmlcode&nolink=1&departmentid='. $departmentid.'"></script>'.SWIFT_CRLF;
change to
- $htmlcode .= '<script language="javascript" src="'. $_SWIFT["swiftpath"] .'visitor/index.php?_m=livesupport&_a=htmlcode&nolink=1&departmentid='. implode(",", $departmentid).'"></script>'.SWIFT_CRLF;
I really think that this is a valuable modification and that the Kayako guys consider including this in the next release.

Thanks
Steve
   
Reply With Quote
  (#2) Old
tom@ecentralsto Offline
New Member
 
tom@ecentralsto's Avatar
 
Posts: 14
Join Date: Sep 2007
Location: Florida
Good idea Steve - 26-02-2008, 12:08 AM

Have you had any issues with the script changes?

I would love to give this modifaction a try, keep up the good work.

Thomas


Thomas Pursifull
tom@ecentralstores.com
   
Reply With Quote
  (#3) Old
tom@ecentralsto Offline
New Member
 
tom@ecentralsto's Avatar
 
Posts: 14
Join Date: Sep 2007
Location: Florida
Awesome Adding Function - 27-02-2008, 04:57 PM

This has been added to our support suite and I would highly recommend added this to version 4. It allows you to give your users a more manageble Live chat selection. Our online support has more than 50 departments. So this is a great solution to our issue with having such a large selection to choose from. Now can offer only the chat for the correct categories on a perticular page. Great added feature, I would highly recommend this alteration to the PHP code.

Thanks Steve for this wonderful tip, and very good instuctions.

Thomas Pursifull
Ecentralstores.com


Thomas Pursifull
tom@ecentralstores.com
   
Reply With Quote
  (#4) Old
bionhosting Offline
Member
 
Posts: 52
Join Date: Jul 2007
29-02-2008, 03:42 PM

very nice!
   
Reply With Quote
  (#5) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,284
Join Date: Apr 2007
Location: Toronto Canada
29-02-2008, 03:45 PM

Has this mod been testing with the new stable build?


Siora Solutions Inc.
www.sioraIT.com
   
Reply With Quote
Reply

Tags
custom, department, livesupport, selections

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

BB 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
Custom Field Doesn't Work!! caitlyntw SupportSuite, eSupport and LiveResponse 9 06-04-2007 05:16 PM
Unique template group for each Department and to list the same in department list sureshkumar.mr SupportSuite, eSupport and LiveResponse 2 29-09-2006 02:06 PM
Merging Custom Fields in ViewTicket of Staff Mick SupportSuite, eSupport and LiveResponse 0 21-09-2006 04:48 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


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