Mo6432 Posted January 2, 2019 Share Posted January 2, 2019 Hi. I can't seem to find anything about the knowledgebase in the API, is it only possible to retrieve it using a direct connection to the mysql database? 0 Quote Link to comment Share on other sites More sharing options...
cdeese8 Posted January 3, 2019 Share Posted January 3, 2019 Just use what is already available and find a creative way to recycle it. There is a helpful snippet of code that is used in \templates\six\supportticketsubmit-steptwo.tpl file. <div id="autoAnswerSuggestions" class="well hidden"></div> \templates\six\js\whmcs.js and whmcs.js /** * Get automatic knowledgebase suggestions for support ticket message. */ var lastTicketMsg; function getTicketSuggestions() { var userMsg = jQuery("#inputMessage").val(); if (userMsg != lastTicketMsg && userMsg != '') { jQuery.post("submitticket.php", { action: "getkbarticles", text: userMsg }, function (data) { if (data) { jQuery("#autoAnswerSuggestions").html(data); if (!jQuery("#autoAnswerSuggestions").is(":visible")) { jQuery("#autoAnswerSuggestions").hide().removeClass('hidden').slideDown(); } } }); lastTicketMsg = userMsg; } setTimeout('getTicketSuggestions()', 3000); } Happy New year buddy... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.