Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Removing Images / Links From Header


MysticBlues

Recommended Posts

If you don't want them at all, remove the page links completely from the header.php code, and replace the images used with blanks of the same names.

Or, remove the code all together and make your left hand logo full width.

 

Hope this helps

 

Julian

A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Link to comment
Share on other sites

  • 2 weeks later...

Here is my header.php code... could someone please tell me specifically what lines to remove to get rid of those 3 buttins all together? Thanks!

 

 

<?php
/*
 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 Updated by: Donald Harriman - 08-08-2003 - MS2
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License

 Shoppe Enhancement Controller - Copyright (c) 2003 WebMakers.com
 Linda McGrath - [email protected]
*/

// 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');
     }
   }
 }

// give the visitors a message that the website will be down at ... time
 if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false') ) {
      $messageStack->add('header', TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE, 'warning');
 }
// this will let the admin know that the website is DOWN FOR MAINTENANCE to the public
 if ( (DOWN_FOR_MAINTENANCE == 'true') && (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE,getenv('REMOTE_ADDR'))) ) {
      $messageStack->add('header', TEXT_ADMIN_DOWN_FOR_MAINTENANCE, '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');
 }


?>

<?php
// BOF: WebMakers.com Added: Validate navigation bar links
////
// Verify valid links to show for Down for Maintenance and Forced Login
 function tep_get_validate_show_link($what_link) {
   switch (true) {
     case ($what_link==FILENAME_LOGIN):
       if (DOWN_FOR_MAINTENANCE_NO_STORE=='1' or (DOWN_FOR_MAINTENANCE=='1' and DOWN_FOR_MAINTENANCE_LOGIN_OFF=='1')) {
         return false;
       }
       if (tep_session_is_registered('customer_id') and (!strstr($PHP_SELF,FILENAME_LOGIN) and !strstr($PHP_SELF,'create')) ) {
         return false;
       }
       return true;
     break;

     case ($what_link==FILENAME_ACCOUNT):
       if (DOWN_FOR_MAINTENANCE_NO_STORE=='1' or (DOWN_FOR_MAINTENANCE=='1' and DOWN_FOR_MAINTENANCE_LOGIN_OFF=='1')) {
         return false;
       }
       return true;
     break;

     case ($what_link==FILENAME_SHOPPING_CART):
       $this_link=true;
       if (DOWN_FOR_MAINTENANCE_NO_STORE=='1' or DOWN_FOR_MAINTENANCE=='1') {
         $this_link=false;
       }
       if (LOGIN_CONTROLLER_ON=='true' and (LOGIN_TO_SHOW_PRICES=='true' or LOGIN_TO_BROWSE=='true' or LOGIN_TO_SHOP=='true') and !tep_session_is_registered('customer_id')) {
         $this_link=false;
       }
       return $this_link;
     break;

     case ($what_link==FILENAME_CHECKOUT_SHIPPING):
       $this_link=true;
       if (DOWN_FOR_MAINTENANCE_NO_STORE=='1' or DOWN_FOR_MAINTENANCE=='1') {
         $this_link=false;
       }
       if (LOGIN_CONTROLLER_ON=='true' and (LOGIN_TO_SHOW_PRICES=='true' or LOGIN_TO_BROWSE=='true' or LOGIN_TO_SHOP=='true') and !tep_session_is_registered('customer_id')) {
         $this_link=false;
       }
       return $this_link;
     break;

     default:
       echo 'I do not know ' . $what_link;
       return true;
     break;
   }
 }
// EOF: WebMakers.com Added: Validate navigation bar links
?>

<?php
// BOF: WebMakers.com Added: Center Shop Bottom of the tables are in footer.php
if (CENTER_SHOP_ON=='1') {
?>
   <table width="100%" cellpadding="10" cellspacing="0" border="0"<?php echo (CENTER_SHOP_OUTTER_BGCOLOR !='' ? ' bgcolor="' . CENTER_SHOP_OUTTER_BGCOLOR . '"' : ''); ?>>
     <tr><td>
       <table<?php echo (CENTER_SHOP_BORDERCOLORLIGHT_OUTTER !='' ? ' BORDERCOLORLIGHT="' . CENTER_SHOP_BORDERCOLORLIGHT_OUTTER . '"' : ''); ?> <?php echo (CENTER_SHOP_OUTTER_CELLSPACING !='' ? ' CELLSPACING="' . CENTER_SHOP_OUTTER_CELLSPACING . '"' : ''); ?> <?php echo (CENTER_SHOP_OUTTER_CELLPADDING !='' ? ' CELLPADDING="' . CENTER_SHOP_OUTTER_CELLPADDING . '"' : ''); ?> <?php echo (CENTER_SHOP_OUTTER_BORDER !='' ? ' BORDER="' . CENTER_SHOP_OUTTER_BORDER . '"' : ''); ?> width="<?php echo CENTER_SHOP_WIDTH; ?>"<?php echo (CENTER_SHOP_BGCOLOR !='' ? ' BGCOLOR="' . CENTER_SHOP_BGCOLOR . '"' : ''); ?> align="<?php echo CENTER_SHOP_ALIGN; ?>">
         <tr><td<?php echo (CENTER_SHOP_BORDERCOLOR_INNER !='' ? ' BORDERCOLOR="' . CENTER_SHOP_BORDERCOLOR_INNER . '"' : ''); ?> class="product_info_BODY">
           <table border="0" width="100%"><tr><td>
<?php
}
// EOF: WebMakers.com Added: Center Shop
?>

<?php
// define header images folder
switch (HEADER_IMAGES_SET) {
 case (3):
   define('HEADER_IMAGES','header/3/');
   break;
 case (2):
   define('HEADER_IMAGES','header/2/');
   break;
 default:
   define('HEADER_IMAGES','header/1/');
   break;
}
/*
 // BOF: WebMakers.com Added: Shoppe Enhancement Controller - header image behind
 To add an image behind the whole header use this first table with class="HeaderBackground"
 Class can be changed in the stylesheet.css
 This is provided for convenience.
*/
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="HeaderBackground"><tr><td>

 <table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr class="header" border='1'>
<?php
 if (HEADER_IMG_LINK_ON=='1') {
?>
   <td valign="middle"><?php echo '<a href="' . HEADER_IMG_LINK .  '" target="">' .tep_image(DIR_WS_IMAGES . HEADER_LOGO, HEADER_LOGO_ALT_TAG) . '</a><BR>'; ?></td>
<!--      <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . HEADER_LOGO, HEADER_LOGO_ALT_TAG) . '</a>'; ?></td> -->
<?php
 } else {
?>
   <td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . HEADER_LOGO, HEADER_LOGO_ALT_TAG) . '<BR>'; ?></td>
<?php
}
?>
     <td align="right" valign="bottom">

<?php // BOF: WebMakers.com Added: Header Displays ?>
<?php
// show Cart Details
 if (SHOW_CART_DETAILS_HEADER=='1') {
?>
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr class="header">
     <td class="ShowCartDetails" align="right" height="30" valign="middle">
       <?php echo '[ ' . $cart->count_contents() . ($cart->count_contents() == "1" ? " Item" : " Items "); ?>    <?php echo $currencies->format($cart->show_total()); ?>    <?php echo $cart->show_weight() . ($cart->show_weight() == "1" ? " lb" : " lbs ");?> ]  
     </td>
   </tr>
 </table>
<?php
 }
?>

<?php
// show languages in header
 if (SHOW_LANGUAGES_IN_HEADER=='1') {
?>
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr class="header">
     <td class="main" align="right" height="30" valign="middle"><?php require(DIR_WS_INCLUDES . 'languages_in_header.php'); ?></td>
   </tr>
 </table>
<?php
 }
?>

<?php
// show languages in header
 if (SHOW_CURRENCIES_IN_HEADER=='1') {
?>
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr class="header">
     <td class="main" align="right" height="30" valign="middle"><?php require(DIR_WS_INCLUDES . 'currencies_in_header.php'); ?></td>
   </tr>
 </table>
<?php
 }
?>

<?php // EOF: WebMakers.com Added: Show Cart Details ?>
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr>
     <td class="main" align="right" height="30" valign="middle">
       <?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . HEADER_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  '; ?>

       <?php
       // show shopping cart if login settings permit
         if ( tep_get_validate_show_link(FILENAME_SHOPPING_CART) ) {
       ?>
           <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo tep_image(DIR_WS_IMAGES . HEADER_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS); ?></a>  
       <?php
         }
       ?>


       <?php
       // show checkout if login settings permit
         if ( tep_get_validate_show_link(FILENAME_CHECKOUT_SHIPPING) ) {
       ?>
           <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo tep_image(DIR_WS_IMAGES . HEADER_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT); ?></a>  
       <?php
         }
       ?>
     </td>
   </tr>
 </table>

<?php // end of table for all additional info on right side ?>
     </td>
   </tr>
 </table>
<?php // end of table for all additional info on right side ?>


<?php /* EOF: WebMakers.com Added: Header Displays - header image behind */ ?>
</td></tr></table>
<?php /* EOF: WebMakers.com Added: Header Displays - header image behind */ ?>

<?php // BOF: WebMakers.com Added: Show Categories and Search in Header
if (SHOW_HEADER_CATEGORIES_SEARCH=='1') {
?>

 <table border="0" width="100%" cellspacing="0" cellpadding="0" align="center" class="HeaderBackground">
 <tr><td>
   <table border="0" cellspacing="0" cellpadding="0" align="center" class="HeaderBackground">

   <tr height="23">
     <td class="main" align="center" valign="middle">
       <form name="quick_jump" method="get" action="<?php echo tep_href_link(FILENAME_DEFAULT, 'jumpto=1', 'NONSSL'); ?>">
<?php
         echo tep_draw_pull_down_menu('cPath', tep_get_categories(array(array('id' => '0', 'text' => 'Categories'))) , $current_category_id, 'onChange="this.form.submit();"');
         echo '<input type=hidden name=quickjump value=1>';
?>
       </form> 
     </td>
     <td class="main" align="center" valign="middle">
       <?php echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'; ?> 
     </td>
     <td class="main" align="center" valign="middle">
       <form name="quick_find" method="get" action="<?php echo tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false);?>"><input type="text" name="keywords" size="24" maxlength="40" value="<?php echo htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"]));?>">
       <?php echo tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH);?>
       </form>
     </td>
   </tr>
   </table>
   </td></tr>
 </table>
<?php
}
// EOF: WebMakers.com Added: Show Categories and Search in Header
?>

<?php require(DIR_WS_INCLUDES . 'header_additional_links.php'); ?>

<?php
if (SHOW_HEADER_LINK_ADDITIONS=='4') {
// defined in SEC Settings - Blank will ignore class
//  define('CLASS_BREAD_CRUMBS','');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td  class="headerNavigation" valign="middle">  <?php echo $breadcrumb->trail(' » '); ?></td>

<?php /* BOF: WebMakers.com Added: Change links based on Login Controller Setting */ ?>
   <td align="right" class="headerNavigation">
     <?php echo ( (tep_get_validate_show_link(FILENAME_LOGIN) ) ? ('<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '"' . ' class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>  ') : ''); ?>
     <?php if (tep_session_is_registered('customer_id')) { ?>  | <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>   <?php } ?>
     <?php if ( tep_get_validate_show_link(FILENAME_ACCOUNT) ) { ?>|  <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>   <?php } ?>
     <?php if ( tep_get_validate_show_link(FILENAME_SHOPPING_CART) ) { ?>|  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>   <?php } ?>
     <?php if ( tep_get_validate_show_link(FILENAME_CHECKOUT_SHIPPING) ) { ?>|  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>    <?php } ?>
   </td>
<?php /* EOF: WebMakers.com Added: Change links based on login */ ?>

   </td>
 </tr>
</table>
<?php
} else {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigationBarLink">
   <td class="headerNavigationBarLink" valign="middle" height="<?php echo HEADER_NAVIGATION_HEIGHT; ?>">  <?php echo $breadcrumb->trail(' » '); ?></td>

<?php /* BOF: WebMakers.com Added: Change links based on Login Controller Setting */ ?>
   <td align="right" class="headerNavigationBarLink">
     <?php echo ( (tep_get_validate_show_link(FILENAME_LOGIN) ) ? ('<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '"' . ' class="headerNavigationBarLink">' . HEADER_TITLE_LOGIN . '</a>  ') : ''); ?>
     <?php if (tep_session_is_registered('customer_id')) { ?>  | <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigationBarLink"><?php echo HEADER_TITLE_LOGOFF; ?></a>   <?php } ?>
     <?php if ( tep_get_validate_show_link(FILENAME_ACCOUNT) ) { ?>|  <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigationBarLink"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>   <?php } ?>
     <?php if ( tep_get_validate_show_link(FILENAME_SHOPPING_CART) ) { ?>|  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerNavigationBarLink"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>   <?php } ?>
     <?php if ( tep_get_validate_show_link(FILENAME_CHECKOUT_SHIPPING) ) { ?>|  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigationBarLink"><?php echo HEADER_TITLE_CHECKOUT; ?></a>    <?php } ?>
   </td>
<?php /* EOF: WebMakers.com Added: Change links based on login */ ?>

   </td>
 </tr>
</table>
<?php
} // SHOW_HEADER_LINK_ADDITIONS=4
?>

<?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(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($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

<?php
// WebMakers.com Added: Only one product per customer
 if ($order_error_msg) {
   tep_output_warning($order_error_msg);
   $order_error_msg='';
 }

// Sample test on quantity in cart that are marked as Free
//  tep_output_warning('Free Products Ordered: ' . $cart->in_cart_check('product_is_free','1'));
if (LOGIN_CONTROLLER_ON=='true' and (LOGIN_TO_BROWSE=='true') and !tep_session_is_registered('customer_id')) {
 tep_output_warning(LOGIN_TO_BROWSE_TEXT);
}
//  tep_output_warning('Working on site ... be patient if something breaks for a minute or two, thanks');
// tep_output_warning('Test ' . strtolower(getenv('HTTP_USER_AGENT')));
?>

Link to comment
Share on other sites

Change

 

     <td class="main" align="right" height="30" valign="middle">
      <?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . HEADER_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  '; ?>

      <?php
      // show shopping cart if login settings permit
        if ( tep_get_validate_show_link(FILENAME_SHOPPING_CART) ) {
      ?>
          <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo tep_image(DIR_WS_IMAGES . HEADER_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS); ?></a>  
      <?php
        }
      ?>


      <?php
      // show checkout if login settings permit
        if ( tep_get_validate_show_link(FILENAME_CHECKOUT_SHIPPING) ) {
      ?>
          <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo tep_image(DIR_WS_IMAGES . HEADER_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT); ?></a>  
      <?php
        }
      ?>
    </td>

to

 

<td class="main" align="right" height="30" valign="middle"> </td>

Link to comment
Share on other sites

Thank you again!!!  That worked!!!!

 

Now can someone please tell me how I can get my logo to be centered in the header?

Your header has been extensively modified with a contribution.

 

Try changing

 

<td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . HEADER_LOGO, HEADER_LOGO_ALT_TAG) . '<BR>'; ?></td>

to

 

<div align="center"><td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . HEADER_LOGO, HEADER_LOGO_ALT_TAG) . '<BR>'; ?></td></div>

Link to comment
Share on other sites

Actually, try changing

 

<td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . HEADER_LOGO, HEADER_LOGO_ALT_TAG) . '<BR>'; ?></td>

to

<td valign="middle" align="center"><?php echo tep_image(DIR_WS_IMAGES . HEADER_LOGO, HEADER_LOGO_ALT_TAG) . '<BR>'; ?></td>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...