|
For webpages that contain the live chat Standard HTML Code (the HTML Code option that contains JavaScript), when the page loads, perform various custom actions.
The callback feature was introduced with PHP Live! v.4.6.1. Previous versions will not be able to process the callbacks.
// when the chat icon is loaded, call this function, if exists phplive_callback_loaded( online_offline_status, department_id )
// when the chat icon is clicked, call this function, if exists
// when the chat status is online, call this function, if exists phplive_callback_online( department_id )
// when the chat status is offline, call this function, if exists phplive_callback_offline( department_id )
// when the embed window is minimized, call this function, if exists. there are no function parameters because the action is to simply minimize the embed chat window
// when the embed window is maximized, call this function, if exists. there are no function parameters because the action is to simply maximize the embed chat window
// when the embed window is popped out, call this function, if exists. there are no function parameters because the action is to simply popout the embed chat window
// when the embed window is closed, call this function, if exists. there are no function parameters because the action is to simply close the embed chat window
NOTE: Keep in mind, the live chat icon loads asynchronously, meaning the live chat icon may load before the entire page is actually loaded. To ensure the callback functions are called, place the above callback functions BEFORE the PHP Live! chat icon HTML Code.
NOTE: If there are multiple chat icons on the same page, the callback functions that contains the department_id parameter will be called for each chat icon HTML Code that has a different department ID. This is to ensure the proper ID is passed to the callback function. If the multiple chat icon HTML Code on the same page references the same department ID, the callback functions will be called only once. |
Was this helpful?
could be more helpful? send comment
![]() |