What does each of the variables do in the settings file?

$mstrKayakoURL = "";
This is the Kayako API URL. You get this from the Kayako admin area when the API is enabled. This is a string and should look something like:
$mstrKayakoURL = "http://support.mydomain.com/api/index.php?";

$mstrAPIKey = "";
This is the Kayako API Key. You get this from the Kayako admin area when the API is enabled. This is a string and should look something like:
$mstrAPIKey = "5555553f09-5555-5555-5555-2309t528905";

$mstrSecretKey = "";
This is the Kayako API Secret Key. You get this from the Kayako admin area when the API is enabled. This is a string and should look something like:
$mstrSecretKey = "4ij2gi84gtw555555555555t29jt2opqc4u9m02u3D502u0d5asdioa89vas89g210234d5023452dst892ytcmq2y30u";

$mstrOpenTicketStatuses = "";
This variable contains all the ticket statuses you wish to display in WHMCS. These would be the title of each status found in the Kayako admin area and separated by a comma. If you only have one status, then put a comma at the end. This is a string and should look something like:
$mstrOpenTicketStatuses = "open,in progress";

$mstrNewTicketStatus = "";
This variable contains the ticket status that is used when a new ticket is created and is displayed in WHMCS. This is a string and should look something like:
$mstrNewTicketStatus = "open";

$mblnDisableKayakoEmailExistsOnChangeCheck = False;
This variable tells the module to check if the email address exists in Kayako when a user in WHMCS changes their email address via a WHMCS hook. If it does exist, then it prevents the user from changing their WHMCS account from their current email address to the new email address. This value should either be True or False.

$mblnDisableKayakoEmailExistsOnRegisterCheck = False;
This variable tells the module to check if the email address exists in Kayako when a user in WHMCS creates a new account such as during a new order via a WHMCS Hook. If it does exist, then it prevents the user from creating the user account using the email address submitted. This value should either be True or False.

$mstrDateTimeFormat = "m/d/Y h:i A";
This variable tells the module how to display the date and time when showing tickets. This is a string and must be in PHP date format.

$mstrStaffReplyNameOverride = "";
This variable overrides the staffs' name when displaying a ticket in WHMCS. If you leave this blank then it will display the staffs name who did the ticket reply, if you fill this in then it will show this name in every ticket post from a staff user. This is a string and should look something like:
$mstrStaffReplyNameOverride = "Customer Support";

$mblnDisplayTicketIDInTicketList = True;
This variable will tell the module to display the ticket ID along with the Ticket subject when displaying the tickets in a list. If its set to true it displays the Ticket ID as well as the Ticket subject, if its set to false then it just displays the Ticket subject. This value should either be True or False.

$mintDefaultTicketsPerPage = 5;
This variable tells the module how many tickets to display per page in the ticket list. This should be a number.

$mintMaxFileUploadSizeInBytes = 5242880;
This variable tells the module how big of a file is allowed to be uploaded as a file attachment to a ticket. This should be a number and its in bytes. The default is 5MB.

$mblnUseFileForTicketAttachmentConversion = True;
This variable tells the module how to handle a file attachment that is part of a ticket. When set to true it downloads the file attachment data and saves it as a temporary file and then downloads it to the user. If its set to false, then it downloads the file attachment data to RAM and streams it as a download to the user without creating a file first. The default value is false. This value should either be True or False.

$mstrKayakoGroupTitleToCreateNewUsersIn = "";
This variable tells the module which Kayako User group to create new Kayako accounts in, when the email address doesnt already exist in Kayako. This should be the user group title retrieved from the Kayako admin area. This is a string and should look something like:
$mstrKayakoGroupTitleToCreateNewUsersIn = "Registered";

$mblnCreateNewUserInKayakoWhenNotFound = False;
This variable tells the module to create the user in Kayako when the email address is not found in Kayako. This value should either be True or False.

$mblnSendWelcomeEmailOnNewUserCreation = True;
This variable tells the module to have Kayako send a new user welcome email when creating a new user in Kayako. This value should either be True or False.

$mblnCreateUserOrganizationOnNewUserCreation = False;
This variable tells the module to create a new user organization for the user when a new user is created. This value should either be True or False.

$mstrClosedTicketStatusName = "";
This variable contains the ticket status that is used when a ticket is closed. This is used when the user manually closes a ticket from within WHMCS when viewing a ticket. This is a string and should look something like:
$mstrClosedTicketStatusName = "closed";

$mblnDisableTicketTypeField = False;
This variable disables the ticket type field that is used in kayako, although this is not used in WHMCS by default. This value should either be True or False.

$mblnUseEmailAddressOfAccountOwnerForTickets = True;
This variable tells the module how to handle account contact logins. When set to true it will use the main WHMCS account email address for looking up and displaying tickets, if set to false then it will use the contacts' email address when a contact is logged in to look up tickets. This value should either be True or False.

$mblnGetUserDataIntoArrayInsteadOfXML = False;
This variable is used if there are Kayako API issues and normally should be set to false. This value should either be True or False.

$mstrAnnouncementsXMLNewsFeed = "";
This variable is the Kayako Announcments XML News Feed URL. This is a string and should look something like:
$mstrAnnouncementsXMLNewsFeed = "http://support.mydomain.com/newsupport/rss/index.php?/News/Feed/Index/0";

$mintAnnouncementsNumberOfNewsItemsToShow = 10;
This variable tells the module how many Kayako Announcements to display. This should be a number.

$mintAnnouncementsMaxArticleDisplayLength = 500;
This variable tells the module how many characters to display when showing the list of available Kayako Announcements. This should be a number.

$mblnUseWHMCSBuiltInKB = False;
This variable tells the module if it should use the built in WHMCS Knowledgebase system or when set to false if it should use the Kayako Knowledgebase. This value should either be True or False.

$mblnDisableSSLVerification = False;
This variable tells the module if it should try to validate SSL certificates. If you are having an issue and have an SSL certificate on the Kayako API URL, then try setting this to false. This value should either be True or False.

$mblnNewWHMCSv5TemplateEnabled = False;
This variable tells the module if it should use the new client area template format that comes with WHMCS v5 or use the old WHMCS v3-v4 template format. This value should either be True or False.

$mblnDontCountClosedTicketsAsOpenTickets = True;
This variable tells the module if it should count closed tickets as open tickets, if you put the closed ticket title in the open ticket variable $mstrOpenTicketStatuses. The default value for this is true and will only be false if you set this variable to False. This value should either be True or False.

$mblnFixCurlExpectHeaderIssue = False;
This variable tells the module to issue a fix for an issue that occurs with curl when it does HTTP calls to certain web servers. The default value for this is false. This value should either be True or False.

$mblnOverrideWHMCSv5NewClientAreaHomePageSubjectDisplay = False;
This variable tells the module how to display the subject for tickets on the client area home page. The default value for this is false. This value should either be True or False.

$mblnUseWHMCSAnnouncements = False;
This variable tells the module if it should use the built in WHMCS Announcements system or when set to false if it should use the Kayako Announcements. This value should either be True or False.

$mblnDisableTicketNewFileAttachments = False;
This variable tells the module if ticket file attachments are disabled for new tickets or new ticket posts. It will still display the ticket attachments of tickets that already have attachments or if the attachments are created via email. The default value for this is false. This value should either be True or False.

$mintDefaultTicketOrder = 0;
This variable tells module what is the default order to sort tickets. If you set it to 0 then the order is ascending, if you set it to 1 then the order is descending. The default value for this is 1. This value should either be 1 or 0.

$mintDefaultTicketSortField = 1;
This variable tells module what is the default field to sort tickets. Options are: 1 for Creation Date, 2 for Department, 3 for Subject, 4 for Status, 5 for Last Activity.

$mblnEnableWHMCSDownloadSupport = False;
This variable tells module to enable the WHMCS download area support.

$mblnEnableFastUserSearchingAPI = False;
This variable tells module to use the new Kayako User Search API to speed up login load times and other areas when your Kayako install has thousands of users. Must have Kayako version 4.40.1148 or higher to enable.

$mstrKayakoKBURLRedirect = "";
This variable redirects the user when they click on the Knowledgebase in WHMCS will be redirected to the URL you put here. This is work around until the Kayako API supports KB access.

$mblnEnableKayakoCustomFields = False;
This variable enables Kayako custom field support for display when creating a new ticket.

$maryKayakoCustomFieldsGroupToDepartmentMapping = array("Support"=>2,"Billing"=>1);
This variable tells the module what Kayako Custom Field Group to display with what department. The value is an array that contains the department name as they key and the Kayako Custom Field Group ID as the value. The Custom Field Group ID can be found in the Kayako admin area under Custom Field Groups. Mouse over the group title and observe the link URL in your browser, the number at the end is the Custom Field Group ID.

$mstrWHMCSServiceCustomFieldTitle = "";
This variable is a string and tells the module which kayako custom field to replace with a WHMCS service list dropdown.

$mstrServiceListDropdownDisplay = "";
This variable is a string and tells how the WHMCS service list dropdown should display the WHMCS services the client has. Possible values are {domain} to show the domain from the service, {username} to show the username from the service, {product} to show the product that the service is assigned to, and {serviceid} to show the service ID.

$mstrServiceListDropdownValue = "";
This variable is a string and tells how the WHMCS service list dropdown should put as the value that is submitted with the ticket as the custom fields value. It is required to have both this variable and $mstrServiceListDropdownDisplay filled in for it to work. Possible values are {domain} to show the domain from the service, {username} to show the username from the service, {product} to show the product that the service is assigned to, and {serviceid} to show the service ID.

The below field is optional and not used unless needed.

$maryCustomTicketFieldsToDisplay = Array("Department" => Array("Field Name" => Array("Type" => "text", "Size" => "10", "Required" => "Yes/No")));
This variable tells module what fields to add to the new ticket page. The first array contains an array of each Departments custom fields. The custom fields array within each department is an array of field type data. Type options are: select, text, selectservice, and clientip. See examples below.
Department Billing has a customer fields called Invoice Number that is a text fields with a size of 7 and is required.
$maryCustomTicketFieldsToDisplay = array("Billing" => array("Invoice Number" => array("Type" => "text", "Size" => "7", "Required" => "Yes")));
Billing department and Support department each having their own custom fields that are text with a length and requirement.
$maryCustomTicketFieldsToDisplay = Array("Billing" =>
Array("Domain Name" =>
Array("Type" => "text", "Size" => "20", "Required" => "Yes"),
"Username" =>
Array("Type" => "text", "Size" => "7", "Required" => "Yes")
)
,"Support" =>
Array("Domain Name" =>
Array("Type" => "text", "Size" => "20", "Required" => "Yes"),
"Plan Name" =>
Array("Type" => "select", "Values" => "Hosting,Dedicated Servers,VPS", "Size" => "20", "Required" => "Yes"),
Array("Service" =>
Array("Type" => "selectservice", "Required" => "No"),
),
Array("Client IP Address" =>
Array("Type" => "clientip", "Required" => "No"),
)
,"Domains" =>
Array("Domain Name" =>
Array("Type" => "text", "Size" => "20", "Required" => "Yes")
)
);

$mblnKayakoWHMCS53HookReturnFix = False;
This variable tells module to enable a fix for the hook file return results. Some whmcs installations need to return a variable instead of a string, causing the Error: 1 issue during checkout or other parts of WHMCS. To fix this Error: 1 issue, just set this variable to True instead of False.

$mstrWHMCSServiceSQLSortText = "";
This variable allows you to sort the WHMCS service field drop down on the submit new ticket page. You can use fields in either the WHMCS table tblproducts or tblhosting when sorting. When left blank it will be auto-filled in with the following ORDER BY text: tblhosting.id ASC

$mstrDefaultTicketTypeName = "Issue";
This variable if not defined will default to the kayako ticket type name of Issue. You can add this variable into the config file and put a kayako ticket type name into this variable value to override the ticket type for new ticket creation in WHMCS if you do not have a kaykao ticket type by the name of Issue.

$mblnCreateNewUserInKayakoWhenClientIsAdded = False;
This variable when set to true will create the user in kayako when the user is created in WHMCS.

$mblnUseAnnouncementsFromTwitter = False;
This variable when set to true will display the twitter feed in the announcements sections of WHMCS. The twitter handle it pulls from is defined in WHMCS Setup -> General Settings -> Social tab.

$mblnSanitizeKayakoInput = True;
This variable when set to true will sanitize WHMCS input

$mblnSanitizeKayakoOutput = False;
This variable when set to true will sanitize Kayako's output for WHMCS dispaly

$mintKayakoCleanInputType = "1";
This variable when set allows you to set which sanitize function should run. The options are 1 for default preg_replace, 2 for htmlentities, 3 for htmlentities with ENT_COMPAT, 4 for htmlentities with ENT_QUOTES, 5 for htmlentities with ENT_NOQUOTES, 10 for htmlspecialchars, 11 for htmlspecialchars with ENT_COMPAT, 12 for htmlspecialchars with ENT_QUOTES, 13 for htmlspecialchars with ENT_NOQUOTES, 15 for htmlentities and htmlspecialchars, 16 for htmlentities and htmlspecialchars with ENT_COMPAT, 17 for htmlentities and htmlspecialchars with ENT_QUOTES, 18 for htmlentities and htmlspecialchars with ENT_NOQUOTES, and 20 for just replacing all double quotes with URL encoded double quotes.

$mstrKayakoAPITicketListSortOrder = "DESC";
This variable when set will tell the Kayako API during a ticket list to sort the results either in ascending or descending. The possible options are either ASC or DESC. NOTICE: If you use this variable or $mstrKayakoAPITicketListSortField you must set variables $mintDefaultTicketOrder and $mintDefaultTicketSortField to 0

$mstrKayakoAPITicketListSortField = "lastactivity";
This variable when set will tell the kayako API during a ticket list to sort the results by the ticket field specified here. the possible options are displayid, departmentid, statusid, priorityid, typeid, creationtime, lastactivity, laststaffreply, lastuserreply, replies. NOTICE: If you use this variable or $mstrKayakoAPITicketListSortOrder you must set variables $mintDefaultTicketOrder and $mintDefaultTicketSortField to 0

$mblnStaffReplyNameShorting = false;
This variable when set to true will change a staff name of User Test to show in WHMCS as User T. or a staff name of User Doe Test to User T. If set to false or not in config file it will show complete staff name.

$mintSanitizeKayakoOutputNL2BRPosition = 1;
This variable when set to 1, which is the default, it will run the nl2br php function before the sanitize function is run, if sanitize functions are enabled. If both input and output sanitize functions are disabled, then the nl2br function will still run unless you set this variable to 2. If it is set to 2 and $mblnSanitizeKayakoOutput is set to true, then it will run the nl2br function after the sanitize function runs.

Print Article

Add Bookmark


Was this article helpful?

Yes, it was helpful.

No, it was not helpful.