aresman Posted August 15, 2004 Share Posted August 15, 2004 (edited) Okay, so we have multiple sites that use a live chat feature. The feature works by incorporating javascript into the page at some defined place and adding the "online" or "offline" image - depending on which is which. Well, I thought incorporating this into a box would be easy, just change the text area to the script - but no such luck. Does anyone have any suggestions on what I need to do to make this work? Here's the box text that I thought would work, but instead halts my site. <?php /* ?$Id: reviews.php,v 1.37 2003/06/09 22:20:28 hpdl Exp $ ?osCommerce, Open Source E-Commerce Solutions ?http://www.oscommerce.com ?Copyright (c) 2003 osCommerce ?Released under the GNU General Public License */ ?> <!-- warrantyregistration //--> ? ? ? ? ?<tr> ? ? ? ? ? ?<td> <?php ?$info_box_contents = array(); ?$info_box_contents[] = array('text' => 'Chat Live'); ?new infoBoxHeading($info_box_contents, false, false); ?$info_box_contents = array(); ?$info_box_contents[] = array('text' => '<!-- BEGIN PHP Live! code, (c) OSI Codes Inc. --> <script language="JavaScript" src="http://www.mysite.com/phplive/js/status_image.php?base_url=http://www.mysite.com/phplive&l=mysitename&x=1&deptid=0&btn=1"><a href="http://www.phplivesupport.com"></a></script> <!-- END PHP Live! code : (c) OSI Codes Inc. --><br>'); ?new infoBox($info_box_contents); ?> And here is the code I inserted into the sts_user_code as instructed: // Live Chat Box $sts_block_name = 'livechat'; require(STS_START_CAPTURE); require(DIR_WS_BOXES . 'livchat.php'); require(STS_STOP_CAPTURE); $template['livechat'] = strip_unwanted_tags($sts_block['livechat'], 'livechat'); Thank you. Nick Edited August 15, 2004 by aresman Quote Link to comment Share on other sites More sharing options...
aresman Posted August 17, 2004 Author Share Posted August 17, 2004 Anyone? 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.