wiszmaster Posted August 16, 2010 Share Posted August 16, 2010 Hello Peers, I'm having an issue with the WHMCS Live Chat module where it will omit the /modules/ part of the URL, thus not opening the pop-up window with the chat after click on the button. It works fine within WHMCS, however when i take it outside of the system and use the code provided it will not. I'm just wondering if someone else has come across this, and if I missed a line of code or setting somewhere. test page: #cat test.html <head> <!-- stardevelop.com Live Help International Copyright - All Rights Reserved //--> <!-- BEGIN stardevelop.com Live Help Messenger Code - Copyright - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> <script language="JavaScript" type="text/JavaScript" src="https://DOMAIN/modules/livehelp/include/javascript.php"></script> <!-- END stardevelop.com Live Help Messenger Code - Copyright - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> </head> <body> <!-- stardevelop.com Live Help International Copyright - All Rights Reserved //--> <!-- BEGIN stardevelop.com Live Help Messenger Code - Copyright - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> <div id="floatLayer" align="left" style="position:absolute; left:10px; top:10px; visibility:hidden; z-index:5000;"> <map name="LiveHelpInitiateChatMap" id="LiveHelpInitiateChatMap"> <area shape="rect" coords="50,210,212,223" href="http://livehelp.stardevelop.com" target="_blank" alt="stardevelop.com Live Help"/> <area shape="rect" coords="113,183,197,206" href="#" onclick="openLiveHelp();acceptInitiateChat();return false;" alt="Accept"/> <area shape="rect" coords="206,183,285,206" href="#" onclick="declineInitiateChat();return false;" alt="Decline"/> <area shape="rect" coords="263,86,301,104" href="#" onclick="declineInitiateChat();return false;" alt="Close"/> </map> <div id="InitiateText" align="center" style="position:relative; left:30px; top:145px; width:275px; height:35px; z-index:5001; text-align:center; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #000000">Do you have any questions that I can help you with?</div> <img src="https://DOMAIN/modules/livehelp/locale/en/images/InitateChat.gif" alt="stardevelop.com Live Help" width="323" height="229" border="0" usemap="#LiveHelpInitiateChatMap"/></div> <!-- END stardevelop.com Live Help Messenger Code - Copyright - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> <!-- stardevelop.com Live Help International Copyright - All Rights Reserved //--> <!-- BEGIN stardevelop.com Live Help Messenger Code - Copyright - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> <a href="#" target="_blank" onclick="openLiveHelp(); return false"><img src="https://DOMAIN/modules/livehelp/include/status.php" id="LiveHelpStatus" name="LiveHelpStatus" border="0" alt="Live Help"/></a> <!-- END stardevelop.com Live Help Messenger Code - Copyright - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> </body> When I click on the live chat button... From outside of WHMCS: https://DOMAIN/livehelp/index.php?LANGUAGE=en From within WHMCS: https://DOMAIN/modules/livehelp/index.php?LANGUAGE=en Within the desktop application I have the following settings: Settings -> General Domain Name: MYDOMAIN.TLD Site Address: https://MYDOMAIN.TLD/modules WHMCS is installed in the root of MYDOMAIN.TLD, no subfolder. Thanks, Marco 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 16, 2010 Share Posted August 16, 2010 If you want to use it as a WHMCS addon then you have to install it within /module directory and i think if you get it as a WHMCS Addon then you can ONLY use it as WHMCS Addon 0 Quote Link to comment Share on other sites More sharing options...
wiszmaster Posted August 16, 2010 Author Share Posted August 16, 2010 Slum Host, It is installed in the modules directory, and no, it can be used throughout your site. I've found the fix. It appears the WHMCS wiki article is either is off on the code. I found the correct code on the Stardevelop site. WHMCS wiki: http://wiki.whmcs.com/Live_Chat_Addon Outside WHMCS You can of course also add the visitor tracking and live help buttons to pages outside of WHMCS (for example on your main website). For visitor monitoring only, you only need to add this line to the <head> section of your page: <script language="JavaScript" type="text/JavaScript" src="http://www.yourdomain.com/whmcs /modules/livehelp/include/javascript.php"></script> And then to display a live chat button you will also need to add this code to your file where you want the button to display: <a href="#" target="_blank" onclick="openLiveHelp(); return false"><img src="http://www. yourdomain.com/whmcs/modules/livehelp/include/status.php" id="LiveHelpStatus" name="LiveHelpStatus" border="0" alt="Live Help" /></a> If you prefer a text link will also work to initiate a chat as below: <a href="#" target="_blank" onclick="openLiveHelp(); return false">Chat With Us Live</a> Stardevelop wiki: http://livehelp.stardevelop.com/kb/article/290/ If you have setup Live Help Messenger as a WHMCS module then you need to install different HTML code on your web pages to avoid any issues. You will need to edit the bold text within the HTML code so that the HTML code points to your WHMCS installation folder. An absolute path is required for the HTML code to work as expected. Step 1. The following lines should be added on each page after your <title> tag and just before your </head> tag (this should be added once per page): <!-- stardevelop.com Live Help International Copyright - All Rights Reserved //--> <!-- BEGIN Live Help Code - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> <script type="text/javascript" src="http://www.yourdomain.com/whmcs/includes/jscript/jquery.js"></script> <script type="text/javascript" src="http://www.yourdomain.com/whmcs/modules/livehelp/plugins/whmcs/jquery.livehelp.js"></script> <!-- END Live Help HTML Code - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> Note: You don’t need to include the <script> tag to /whmcs/includes/jscript/jquery.js if your web site already includes the jQuery JavaScript library. Step 2. The following lines need to be added where you wish to display the Live Help status indicator button (you may display many Live Help status buttons on a single page): <!-- stardevelop.com Live Help International Copyright - All Rights Reserved //--> <!-- BEGIN Live Help HTML Code - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> <a href="#" onclick="openLiveHelp(); return false"> <img src="http://www.yourdomain.com/whmcs/modules/livehelp/include/status.php" id="LiveHelpStatus" name="LiveHelpStatus" border="0" alt="Live Help" /> </a><!-- END Live Help HTML Code - NOT PERMITTED TO MODIFY IMAGE MAP/CODE/LINKS //--> Please note: The above second step is optional and should only be added to web pages that you wish to display the Live Help button. I've opened a ticket, maybe Matt or one of the other fine Admins can have a look at the WHMCS wiki and correct the code if it needs correcting. Hope this helps someone else out. --marco 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.