Hi all,
i was installing the Live support contrib of dayanahost.com and its working ok but then i notices that the infobox of them that is made for
OSC doesnt work with BTS template and guess what the side where it has to go is different then the other side of my website so i thought ok ill make it BTS and added all the dynamic links but then the infobox stopt working.
My question is can BTS handle arrays because that is used by that box
here is the orignal code
PHP Code:
<?php
/*
phpOnline Infobox, v 1.0 21-APR-2005 by Dayana Networks Ltd.
Compatible with phpOnline v 1.5 and above
Copyright 2005 Dayana Networks Ltd.
osCommerce
http://www.oscommerce.com/
Copyright (c) 2000,2005 osCommerce
Released under the GNU General Public License
*/
//////////// Configuration ///////////////
// Please change these variables
// Full URL to phpOnline Main directory (without trailing slash)
$phpOnline_base_url = "http://www.YOURDOMAIN.com/live_support";
// Type of Status Indicator:
// 1 -> Dynamic (Flash Based)
// 2 -> Statis (image based)
// Note that image based indicator has added on phpOnline 1.5.1
$phponline_status_indicator_type = 2;
//////////////////////////////////////////
?>
<script language="javascript"><!--
function phpOnlinePopupWindow() {
var url = "<?php echo $phpOnline_base_url.'/client.php';?>";
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=550,height=400,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
</head>
<!-- phpOnline Info Box //-->
<tr><td>
<?php
$phponline_info_box = array();
$phponline_info_box[] = array('align' => 'left',
'text' => BOX_HEADING_PHPONLINE
);
new infoBoxHeading($phponline_info_box, false, false);
$phponline_info_box = array();
if($phponline_status_indicator_type==1)
{
$phpOnlineFlashIndicator = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" HEIGHT="60" WIDTH="120" id="status" ALIGN="" border="0">';
$phpOnlineFlashIndicator .= '<param name="base" value="'.$phpOnline_base_url.'/"><PARAM NAME=movie VALUE="'.$phpOnline_base_url.'/status.swf"><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff><param name="salign" value="TL"><param name="scale" value="NoBorder">';
$phpOnlineFlashIndicator .= '<EMBED base="'.$phpOnline_base_url.'/" src="'.$phpOnline_base_url.'/status.swf" menu=false quality=High bgcolor=#ffffff NAME="status" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" salign="TL" width="120" height="60" scale="NoBorder"></EMBED></OBJECT>';
$phponline_info_box[] = array('align' => 'center',
'text' => $phpOnlineFlashIndicator
);
}
if($phponline_status_indicator_type==2)
{
$phponline_info_box[] = array('align' => 'center',
'text' => '<a href="javascript:phpOnlinePopupWindow()">' . tep_image($phpOnline_base_url.'/statusimage.php' , BOX_INFORMATION_PHPONLINE ). '</a><br>'
);
}
?>
</td></tr>
<!-- card_eof //-->
and here is my code that i already done
PHP Code:
<?php
/*
phpOnline Infobox, v 1.0 21-APR-2005 by Dayana Networks Ltd.
Compatible with phpOnline v 1.5 and above
Copyright 2005 Dayana Networks Ltd.
osCommerce
http://www.oscommerce.com/
Copyright (c) 2000,2005 osCommerce
Released under the GNU General Public License
*/
//////////// Configuration ///////////////
// Please change these variables
// Full URL to phpOnline Main directory (without trailing slash)
$phpOnline_base_url = "http://localhost/live_support";
// Type of Status Indicator:
// 1 -> Dynamic (Flash Based)
// 2 -> Statis (image based)
// Note that image based indicator has added on phpOnline 1.5.1
$phponline_status_indicator_type = 1;
//////////////////////////////////////////
?>
<script language="javascript"><!--
function phpOnlinePopupWindow() {
var url = "<?php echo $phpOnline_base_url.'/client.php';?>";
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=550,height=400,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
<!-- phpOnline Info Box //-->
<?php
$boxHeading = BOX_HEADING_LIVE_SUPPORT;
$corner_left = 'square';
$corner_right = 'square';
$boxContent_attributes = ' align="center"';
$box_base_name = 'live_support'; // for easy unique box template setup (added BTSv1.2)
$box_id = $box_base_name . 'Box'; // for CSS styling paulm (editted BTSv1.2)
$boxContent= '';
$phponline_info_box = array();
if($phponline_status_indicator_type==1)
{
$phpOnlineFlashIndicator = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" HEIGHT="60" WIDTH="120" id="status" ALIGN="" border="0">';
$phpOnlineFlashIndicator .= '<param name="base" value="'.$phpOnline_base_url.'/"><PARAM NAME=movie VALUE="'.$phpOnline_base_url.'/status.swf"><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff><param name="salign" value="TL"><param name="scale" value="NoBorder">';
$phpOnlineFlashIndicator .= '<EMBED base="'.$phpOnline_base_url.'/" src="'.$phpOnline_base_url.'/status.swf" menu=false quality=High bgcolor=#ffffff NAME="status" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" salign="TL" width="120" height="60" scale="NoBorder"></EMBED></OBJECT>';
$phponline_info_box[] = array('align' => 'center',
'text' => $phpOnlineFlashIndicator
);
}
if($phponline_status_indicator_type==2)
{
$phponline_info_box[] = array('align' => 'center',
'text' => '<a href="javascript:phpOnlinePopupWindow()">' . tep_image($phpOnline_base_url.'/statusimage.php' , BOX_INFORMATION_PHPONLINE ). '</a><br>'
);
}
include (bts_select('boxes', $phponline_info_box)); // BTS 1.5
?>
<!-- card_eof //-->
what am i doing wrong ?