Help me please,
I am new with Oscommerce and PHP, I bought this template from monster templates
http://osc.template-help.com/osc_23816/index.php
and i want to replace the main banner "the pink with single download message (banner_02.gif)"
with another one in swf format "flash banner", and i don't know what i have to do?
I need your help please.
Latest News: (loading..)
Flash Banner
Started by zytoon, Mar 19 2010, 21:34
8 replies to this topic
#1
Posted 19 March 2010, 21:34
#2
Posted 20 March 2010, 02:09
Nabeel,
here is the code for flash banners:
<table style="width:1000px; height:200px" align="center">
<tr>
<td width="1000px" height="200px" valign="top" cellpadding="0" cellspacing="0" border="0">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="1000" height="200">
<param name="movie" value="http://yourdomain.com/store/images/yourbanner.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<!--[if !IE]> <-->
<object data="http://yourdomain.com/store/images/yourbanner.swf"
width="1000" height="200" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]>
</object>
</td>
</tr>
</table></a>
Chris
here is the code for flash banners:
<table style="width:1000px; height:200px" align="center">
<tr>
<td width="1000px" height="200px" valign="top" cellpadding="0" cellspacing="0" border="0">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="1000" height="200">
<param name="movie" value="http://yourdomain.com/store/images/yourbanner.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<!--[if !IE]> <-->
<object data="http://yourdomain.com/store/images/yourbanner.swf"
width="1000" height="200" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]>
</object>
</td>
</tr>
</table></a>
Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:
:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:
:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:
:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:
:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:
#3
Posted 20 March 2010, 04:38
Thank you Chris,
But where i have to add this code please? which file?
Nabeel
But where i have to add this code please? which file?
Nabeel
#4
Posted 20 March 2010, 04:42
Nabeel,
You insert it into the header.php file in this section:
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="header">
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td>
<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td>
</tr>
</table>
Chris
You insert it into the header.php file in this section:
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="header">
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td>
<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td>
</tr>
</table>
Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:
:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:
:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:
:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:
:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:
#5
Posted 20 March 2010, 05:50
Thank you again Chris, I inserted the code into my header.php, after that i got 2 banners gif and flash banner in the same page.
here is my header.php code:
<?php
/*
$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
Released under the GNU General Public License
*/
// check if the 'install' directory exists, and warn of its existence
if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
}
// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
}
// check if the session folder is writeable
if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
if (!is_dir(tep_session_save_path())) {
$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
} elseif (!is_writeable(tep_session_save_path())) {
$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
}
}
}
// check session.auto_start is disabled
if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
}
if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
}
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
?>
<!-- start -->
<?php
if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
</tr>
</table>
<?php
}
if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
</tr>
</table>
<?php
}
?>
<!-- start -->
<table cellpadding="0" cellspacing="0" border="0" align="center" class="width_table">
<tr><td class="width_td">
<table cellpadding="0" cellspacing="0" border="0" class="bg_right"><tr><td class="bg_left">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="height:100%;">
<tr><td class="row_1">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="logo"><a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image(DIR_WS_IMAGES.'logo.gif')?></a></td>
<td style="width:100%;padding:0px 18px 0px 0px; vertical-align:middle;">
<table cellpadding="0" cellspacing="0" border="0" class="header">
<tr>
<td style="width:100%;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" align="center" style="width:179px;">
<tr><td><?php echo BOX_HEADING_CURRENCIES?>: </td><td style="width:100%;"><?php
echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');
reset($currencies->currencies);
$currencies_array = array();
while (list($key, $value) = each($currencies->currencies)) {
$currencies_array[] = array('id' => $key, 'text' => $value['title']);
}
$hidden_get_variables = '';
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
$hidden_get_variables .= tep_draw_hidden_field($key, $value);
}
}
echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" class="select"') . $hidden_get_variables . tep_hide_session_id();
echo '</form>';
?></td>
</tr>
</table>
</td>
<td><?php echo tep_draw_separator('spacer.gif', '16', '1'); ?></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" align="center" style="width:88px;">
<tr><td style="width:100%;"><?php
if (!isset($lng) || (isset($lng) && !is_object($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
}
$languages_string = '';
reset($lng->catalog_languages);
$i = 0;
while (list($key, $value) = each($lng->catalog_languages)) {
if ($i) $languages_string .= tep_image(DIR_WS_IMAGES.'spacer.gif','','','',' style="margin:0px 2px 0px 2px;"');
$languages_string .= '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name'],'','','') . '</a>';
$i++;
}
echo $languages_string;
?></td>
</tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" style="margin-bottom:2px;">
<tr>
<td style="width:25%; background:#e4008b;"><?php echo tep_draw_separator('spacer.gif', '1', '4'); ?></td>
<td style="width:25%; background:#fd6c06;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td style="width:25%; background:#06c6ec;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td style="width:25%; background:#adde25;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0"><tr><td class="menu">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<?php
switch($tab_sel){
case 2:
$item_menu_01 = 'id="over_m1" onMouseOut="this.id=\'over_m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 3:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="over_m2" onMouseOut="this.id=\'over_m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 4:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="over_m3" onMouseOut="this.id=\'over_m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 5:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="over_m4" onMouseOut="this.id=\'over_m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 6:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="over_m5" onMouseOut="this.id=\'over_m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 7:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="over_m6" onMouseOut="this.id=\'over_m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
default:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
}
?>
<tr>
<td <?php echo $item_menu_01;?> onClick="document.location='<?php echo tep_href_link('index.php')?>'" nowrap="nowrap"><? printf(BOX_MANUFACTURER_INFO_HOMEPAGE,"")?></td>
<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
<td <?php echo $item_menu_02;?> onClick="document.location='<?php echo tep_href_link('products_new.php')?>'"><?php echo BOX_HEADING_WHATS_NEW?></td>
<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
<td <?php echo $item_menu_03;?> onClick="document.location='<?php echo tep_href_link('specials.php')?>'"><?php echo BOX_HEADING_SPECIALS?></td>
<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
<?php if (tep_session_is_registered('customer_id')) {
$acc_link = tep_href_link('account.php');
$acc_title= HEADER_TITLE_MY_ACCOUNT;
} else{
$acc_link = tep_href_link('create_account.php');
$acc_title= HEADER_TITLE_CREATE_ACCOUNT;
}
?>
<td <?php echo $item_menu_04;?> onClick="document.location='<?php echo $acc_link;?>'" nowrap="nowrap"><?php echo $acc_title;?></td>
<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
<td <?php echo $item_menu_06;?> onClick="document.location='<?php echo tep_href_link('contact_us.php')?>'"><?php echo BOX_INFORMATION_CONTACT?></td>
</tr>
</table>
</td><td><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td><td class="search">
<?php echo tep_draw_form('search',tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false),'get') ?>
<table border="0" cellspacing="0" cellpadding="0" align="right" style="width:309px;">
<tr><td><?php echo IMAGE_BUTTON_SEARCH;?>: </td>
<td style="width:100%;"><input type=text name="keywords" class="go" value=""></td>
<td style="padding:0px 0px 0px 8px;"><?php echo tep_image_submit('button_search_prod.gif')?></td>
</tr>
</table></form>
</td></tr></table>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td class="navigation"><span><a href="<?php echo tep_href_link('advanced_search.php')?>"><?php echo BOX_SEARCH_ADVANCED_SEARCH?></a> | <a href="<?php echo tep_href_link('reviews.php')?>"><?php echo BOX_HEADING_REVIEWS?></a> | <a href="<?php echo tep_href_link('checkout_shipping.php')?>"><?php echo HEADER_TITLE_CHECKOUT?></a> | <a href="<?php echo tep_href_link('shipping.php')?>"><?php echo BOX_INFORMATION_SHIPPING?></a> | <? if (tep_session_is_registered('customer_id')) {
?><a href="<?php echo tep_href_link('logoff.php')?>"><?php echo HEADER_TITLE_LOGOFF?></a><? } else
{ ?><a href="<?php echo tep_href_link('login.php')?>"><?php echo HEADER_TITLE_LOGIN?></a><? }
?></span></td></tr>
</table>
</td></tr>
<tr><td class="row_2">
here is my header.php code:
<?php
/*
$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
Released under the GNU General Public License
*/
// check if the 'install' directory exists, and warn of its existence
if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
}
// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
}
// check if the session folder is writeable
if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
if (!is_dir(tep_session_save_path())) {
$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
} elseif (!is_writeable(tep_session_save_path())) {
$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
}
}
}
// check session.auto_start is disabled
if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
}
if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
}
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
?>
<!-- start -->
<?php
if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
</tr>
</table>
<?php
}
if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
</tr>
</table>
<?php
}
?>
<!-- start -->
<table cellpadding="0" cellspacing="0" border="0" align="center" class="width_table">
<tr><td class="width_td">
<table cellpadding="0" cellspacing="0" border="0" class="bg_right"><tr><td class="bg_left">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="height:100%;">
<tr><td class="row_1">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="logo"><a href="<?php echo tep_href_link('index.php')?>"><?php echo tep_image(DIR_WS_IMAGES.'logo.gif')?></a></td>
<td style="width:100%;padding:0px 18px 0px 0px; vertical-align:middle;">
<table cellpadding="0" cellspacing="0" border="0" class="header">
<tr>
<td style="width:100%;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" align="center" style="width:179px;">
<tr><td><?php echo BOX_HEADING_CURRENCIES?>: </td><td style="width:100%;"><?php
echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');
reset($currencies->currencies);
$currencies_array = array();
while (list($key, $value) = each($currencies->currencies)) {
$currencies_array[] = array('id' => $key, 'text' => $value['title']);
}
$hidden_get_variables = '';
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
$hidden_get_variables .= tep_draw_hidden_field($key, $value);
}
}
echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" class="select"') . $hidden_get_variables . tep_hide_session_id();
echo '</form>';
?></td>
</tr>
</table>
</td>
<td><?php echo tep_draw_separator('spacer.gif', '16', '1'); ?></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" align="center" style="width:88px;">
<tr><td style="width:100%;"><?php
if (!isset($lng) || (isset($lng) && !is_object($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
}
$languages_string = '';
reset($lng->catalog_languages);
$i = 0;
while (list($key, $value) = each($lng->catalog_languages)) {
if ($i) $languages_string .= tep_image(DIR_WS_IMAGES.'spacer.gif','','','',' style="margin:0px 2px 0px 2px;"');
$languages_string .= '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name'],'','','') . '</a>';
$i++;
}
echo $languages_string;
?></td>
</tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" style="margin-bottom:2px;">
<tr>
<td style="width:25%; background:#e4008b;"><?php echo tep_draw_separator('spacer.gif', '1', '4'); ?></td>
<td style="width:25%; background:#fd6c06;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td style="width:25%; background:#06c6ec;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
<td style="width:25%; background:#adde25;"><?php echo tep_draw_separator('spacer.gif', '1', '1'); ?></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0"><tr><td class="menu">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<?php
switch($tab_sel){
case 2:
$item_menu_01 = 'id="over_m1" onMouseOut="this.id=\'over_m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 3:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="over_m2" onMouseOut="this.id=\'over_m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 4:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="over_m3" onMouseOut="this.id=\'over_m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 5:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="over_m4" onMouseOut="this.id=\'over_m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 6:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="over_m5" onMouseOut="this.id=\'over_m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
case 7:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="over_m6" onMouseOut="this.id=\'over_m6\';" onMouseOver="this.id=\'over_m6\';"';
break;
default:
$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
}
?>
<tr>
<td <?php echo $item_menu_01;?> onClick="document.location='<?php echo tep_href_link('index.php')?>'" nowrap="nowrap"><? printf(BOX_MANUFACTURER_INFO_HOMEPAGE,"")?></td>
<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
<td <?php echo $item_menu_02;?> onClick="document.location='<?php echo tep_href_link('products_new.php')?>'"><?php echo BOX_HEADING_WHATS_NEW?></td>
<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
<td <?php echo $item_menu_03;?> onClick="document.location='<?php echo tep_href_link('specials.php')?>'"><?php echo BOX_HEADING_SPECIALS?></td>
<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
<?php if (tep_session_is_registered('customer_id')) {
$acc_link = tep_href_link('account.php');
$acc_title= HEADER_TITLE_MY_ACCOUNT;
} else{
$acc_link = tep_href_link('create_account.php');
$acc_title= HEADER_TITLE_CREATE_ACCOUNT;
}
?>
<td <?php echo $item_menu_04;?> onClick="document.location='<?php echo $acc_link;?>'" nowrap="nowrap"><?php echo $acc_title;?></td>
<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
<td <?php echo $item_menu_06;?> onClick="document.location='<?php echo tep_href_link('contact_us.php')?>'"><?php echo BOX_INFORMATION_CONTACT?></td>
</tr>
</table>
</td><td><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td><td class="search">
<?php echo tep_draw_form('search',tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false),'get') ?>
<table border="0" cellspacing="0" cellpadding="0" align="right" style="width:309px;">
<tr><td><?php echo IMAGE_BUTTON_SEARCH;?>: </td>
<td style="width:100%;"><input type=text name="keywords" class="go" value=""></td>
<td style="padding:0px 0px 0px 8px;"><?php echo tep_image_submit('button_search_prod.gif')?></td>
</tr>
</table></form>
</td></tr></table>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td class="navigation"><span><a href="<?php echo tep_href_link('advanced_search.php')?>"><?php echo BOX_SEARCH_ADVANCED_SEARCH?></a> | <a href="<?php echo tep_href_link('reviews.php')?>"><?php echo BOX_HEADING_REVIEWS?></a> | <a href="<?php echo tep_href_link('checkout_shipping.php')?>"><?php echo HEADER_TITLE_CHECKOUT?></a> | <a href="<?php echo tep_href_link('shipping.php')?>"><?php echo BOX_INFORMATION_SHIPPING?></a> | <? if (tep_session_is_registered('customer_id')) {
?><a href="<?php echo tep_href_link('logoff.php')?>"><?php echo HEADER_TITLE_LOGOFF?></a><? } else
{ ?><a href="<?php echo tep_href_link('login.php')?>"><?php echo HEADER_TITLE_LOGIN?></a><? }
?></span></td></tr>
</table>
</td></tr>
<tr><td class="row_2">
#6
Posted 20 March 2010, 06:00
Nabeel,
The code I gave you is used in a STANDARD OSC header.php file. You are obviously using a template. You will have to adapt the code to fit into your template layout.
Chris
The code I gave you is used in a STANDARD OSC header.php file. You are obviously using a template. You will have to adapt the code to fit into your template layout.
Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:
:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:
:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:
:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:
:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:
#7
Posted 20 March 2010, 06:26
Done!
Thank you Chris
so so much
You are Amazing.. It is so much appreciated.
Take care
Nabeel
Thank you Chris
You are Amazing.. It is so much appreciated.
Take care
Nabeel
#8
Posted 20 March 2010, 06:38
Nabeel,
No Problem, glad I could help.
Chris
No Problem, glad I could help.
Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:
:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:
:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:
:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:
:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:
#9
Posted 31 March 2010, 22:47
Hi,
I added the code below to header.php to replace the gif banner with flash banner,
everything is okay with firefox and chrome when i am browsing my home page, but when
I use Internet explorer 8 to test the home page, I can see flash banner but What's New
and the right info boxes like (special,...) disappear.
What is the problem please?
<table style="width:1000px; height:200px" align="center">
<tr>
<td width="1000px" height="200px" valign="top" cellpadding="0" cellspacing="0" border="0">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="1000" height="200">
<param name="movie" value="http://yourdomain.com/store/images/yourbanner.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<!--[if !IE]> <-->
<object data="http://yourdomain.com/store/images/yourbanner.swf"
width="1000" height="200" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]>
</object>
</td>
</tr>
</table></a>
I added the code below to header.php to replace the gif banner with flash banner,
everything is okay with firefox and chrome when i am browsing my home page, but when
I use Internet explorer 8 to test the home page, I can see flash banner but What's New
and the right info boxes like (special,...) disappear.
What is the problem please?
<table style="width:1000px; height:200px" align="center">
<tr>
<td width="1000px" height="200px" valign="top" cellpadding="0" cellspacing="0" border="0">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24" width="1000" height="200">
<param name="movie" value="http://yourdomain.com/store/images/yourbanner.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<!--[if !IE]> <-->
<object data="http://yourdomain.com/store/images/yourbanner.swf"
width="1000" height="200" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]>
</object>
</td>
</tr>
</table></a>
Edited by zytoon, 31 March 2010, 22:59.














