Tips & Tricks: Open Chat via CSS

If you already have the PHP Live! chat icon HTML code on your webpage, you can reference the open chat function using the CSS class phplive_link.
<span class="phplive_link" style="text-decoration: underline; cursor: pointer;">Click for live chat</span>
The above code will produce the following link to open the chat window: Click for live chat
All spans, divs or links on the page containing the phplive_link class will open the chat window. For those wanting to open the chat via JavaScript, the function phplive_link_function() will open the chat window, it is the function that is called by the phplive_link class.
Tips & Tricks
  • Custom Variables - Pre-populate the name, email and question or send your custom variables to the chat request window.
  • Callbacks - Process your custom JavaScript code when the chat icon has loaded, has been clicked and more.
  • Transcript Action - When the chat session ends, process your custom PHP code to performan your custom actions.
  • Custom Console - Inject custom code to the operator console to add your custom widgets, actions and more.