Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding header **help**


Guest

Recommended Posts

Posted

Ok, this taken straight from my catalog/includes/header.php file.. If someone could put this code in there it would be awsome.. I've been trying now for 6 hours with no luck

heres the header and info i designed

<body>
<div id="Layer1" style="position:absolute; left:7px; top:70px; width:784px; height:146px; z-index:1"><img src="images/winksbanner_08.gif" width="759" height="136"></div>
<div id="Layer2" style="position:absolute; left:7px; top:11px; width:786px; height:36px; z-index:2"><img src="images/winksbanner_01.gif" width="759" height="35"></div>
<div id="Layer3" style="position:absolute; left:7px; top:43px; width:788px; height:28px; z-index:3"><img src="images/winksbanner_02.gif" width="459" height="27"><a href="www.winksonline.com/catalog"><img src="images/winksbanner_03.gif" alt="Online Shop" width="72" height="27" border="0"></a><a href="www.winksonline.com/catalog/features"><img src="images/winksbanner_04.gif" alt="Featured Rides and Models" width="71" height="27" border="0"></a><a href="www.winksonline.com/forum"><img src="images/winksbanner_05.gif" alt="Group Buys and Discussion" width="71" height="27" border="0"></a><a href="www.winksonline.com/catalog/links"><img src="images/winksbanner_06.gif" alt="Links" width="70" height="27" border="0"></a><img src="images/winksbanner_07.gif" width="16" height="27"></div>
</body>

And the script from the header file this needs to combine with

 

<?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 (c) 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');
 }
?>
<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 . 'oscommerce.gif', 'osCommerce') . '</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>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
   <td align="right" class="headerNavigation"><?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 } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
 </tr>
</table>
<?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
 }
?>

 

 

 

 

Thanks in advance

Chris

Posted

it seems every post but the one that's mine always gets answered. I try to post all the information so everyone knows what i'm talking about.. Any help would be EXTREMLY APPRECIATED, Look at My Webpage the way i have it now the banner's just floating over top of everything else

Thanks

Chris

Posted

Hi Chris,

 

I'm answering your post but I can't help you.

 

There are a lot of active posters on this forum and I think many such as myself that a fairly "at home" with the osc code, can install and manipulate the contribs fairly well but it looks to me like you are trying to position a banner in the header. That is way outside standard osc code and way over my head. I wish you luck but you may be waiting a while on an answer.

 

Good Luck,

 

Tim

How do you know when you know what you want to do for the rest of your life?

Posted

P.S. I tried to view your page but the link didn't work. It may not help you feel better but I have made several posts that were never answered.

 

Tim

How do you know when you know what you want to do for the rest of your life?

Posted

It's not that complicated. ;)

 

<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 . 'oscommerce.gif', 'osCommerce') . '</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>

 

That's the code you need to be concerned with.

 

The first td has your logo...the second one has the account, cart and checkout images. Why don't you try adding a td between the two of them?

Posted

The code as I'm seeing it is a header all it's own.

I think the goal is to replace the entire as it is viewed. It appeears the layout is pretty cool but I don't know how (at the drop of a question) to answer the question.

 

It appears Chris is in the right area of code but is not sure how to implement the code.

 

Chris when I look at the code in ms-fp I think you could..

 

I don't know. I'm sorry I'm just not sure what you are trying to do.

 

Here is my suggestion. Get a compareing app so you can see your code side by side with the osc core code and I think that alone would show you what you need to do. I use this app called "Beyond Compare" and I couldn't get by without it.

 

Tim

How do you know when you know what you want to do for the rest of your life?

Posted

the first code is just html of the image i need to put at the top.. I've tried saving it as an html file and changing 'oscommerce.gif' to header.html (the file name..

This worked but it made the header just float above the existing text..

I've been fooling with this all day, and I'm stumped.. I know it's something really simple tho. Just dont know what

Posted

Well, the code I quoted is the entire header. Should be simple enough to replace that table with what he wants to put there no? It's just HTML. ;)

Posted

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td>
     <div id="Layer1" style="position:absolute; left:7px; top:70px; width:784px; height:146px; z-index:1"><img src="images/winksbanner_08.gif" width="759" height="136"></div>
<div id="Layer2" style="position:absolute; left:7px; top:11px; width:786px; height:36px; z-index:2"><img src="images/winksbanner_01.gif" width="759" height="35"></div>
<div id="Layer3" style="position:absolute; left:7px; top:43px; width:788px; height:28px; z-index:3"><img src="images/winksbanner_02.gif" width="459" height="27"><a href="www.winksonline.com/catalog"><img src="images/winksbanner_03.gif" alt="Online Shop" width="72" height="27" border="0"></a><a href="www.winksonline.com/catalog/features"><img src="images/winksbanner_04.gif" alt="Featured Rides and Models" width="71" height="27" border="0"></a><a href="www.winksonline.com/forum"><img src="images/winksbanner_05.gif" alt="Group Buys and Discussion" width="71" height="27" border="0"></a><a href="www.winksonline.com/catalog/links"><img src="images/winksbanner_06.gif" alt="Links" width="70" height="27" border="0"></a><img src="images/winksbanner_07.gif" width="16" height="27"></div>
   </td>
 </tr>
</table>

 

You do know basic HTML don't you? You may have to tweak things a tad but that should essentially do it.

Posted

thanks guy's it's still over top the main text but atleast it's all in order now.. check it out at www.winksonline.com/catalog

Posted

This is what the file looks like as of now, and it's still ontop

 

 

   <?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 (c) 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');
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>
  <td>
    <div id="Layer1" style="position:absolute; left:7px; top:70px; width:784px; height:146px; z-index:1"><img src="images/winksbanner_08.gif" width="759" height="136"></div>
<div id="Layer2" style="position:absolute; left:7px; top:11px; width:786px; height:36px; z-index:2"><img src="images/winksbanner_01.gif" width="759" height="35"></div>
<div id="Layer3" style="position:absolute; left:7px; top:43px; width:788px; height:28px; z-index:3"><img src="images/winksbanner_02.gif" width="459" height="27"><a href="www.winksonline.com/catalog"><img src="images/winksbanner_03.gif" alt="Online Shop" width="72" height="27" border="0"></a><a href="www.winksonline.com/catalog/features"><img src="images/winksbanner_04.gif" alt="Featured Rides and Models" width="71" height="27" border="0"></a><a href="www.winksonline.com/forum"><img src="images/winksbanner_05.gif" alt="Group Buys and Discussion" width="71" height="27" border="0"></a><a href="www.winksonline.com/catalog/links"><img src="images/winksbanner_06.gif" alt="Links" width="70" height="27" border="0"></a><img src="images/winksbanner_07.gif" width="16" height="27"></div>
  </td>
</tr>
</table>
<tr class="header">



  <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>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="headerNavigation">
  <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
  <td align="right" class="headerNavigation"><?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 } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
</tr>
</table>
<?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
}
?>

Posted

layer's are foreign to me.. how would i do it otherwise

Posted

Chris I ahd achange that came a little closer to goal.

 

Try changeing those absolutes to relative.

 

Tim

How do you know when you know what you want to do for the rest of your life?

Posted

i took the layers out and now its atleast all at the top.. heres a copy of the code.. it just all needs to be alligned now

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
  <td>
<img src="images/winksbanner_01.gif" width="759" height="35">
<img src="images/winksbanner_02.gif" width="459" height="27"><a href="www.winksonline.com/catalog"><img src="images/winksbanner_03.gif" alt="Online Shop" width="72" height="27" border="0"></a><a href="www.winksonline.com/catalog/features"><img src="images/winksbanner_04.gif" alt="Featured Rides and Models" width="71" height="27" border="0"></a><a href="www.winksonline.com/forum"><img src="images/winksbanner_05.gif" alt="Group Buys and Discussion" width="71" height="27" border="0"></a><a href="www.winksonline.com/catalog/links"><img src="images/winksbanner_06.gif" alt="Links" width="70" height="27" border="0"></a><img src="images/winksbanner_07.gif" width="16" height="27"><img src="images/winksbanner_08.gif" width="759" height="136">
  </td>
</tr>
</table>

 

Any help aranging these please help

thanks

chris

Posted

Sorry I was wrong it didn't work.

How do you know when you know what you want to do for the rest of your life?

Posted

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td>

<img src="http://www.winksonline.com/catalog/images/winksbanner_01.gif" width="759" height="35"><br><img src="http://www.winksonline.com/catalog/images/winksbanner_02.gif" width="459" height="27"><a href="http://www.winksonline.com/catalog"><img src="http://www.winksonline.com/catalog/images/winksbanner_03.gif" alt="Online Shop" width="72" height="27" border="0"></a><a href="http://www.winksonline.com/catalog/features"><img src="http://www.winksonline.com/catalog/images/winksbanner_04.gif" alt="Featured Rides and Models" width="71" height="27" border="0"></a><a href="http://www.winksonline.com/forum"><img src="http://www.winksonline.com/catalog/images/winksbanner_05.gif" alt="Group Buys and Discussion" width="71" height="27" border="0"></a><a href="http://www.winksonline.com/catalog/links"><img src="http://www.winksonline.com/catalog/images/winksbanner_06.gif" alt="Links" width="70" height="27" border="0"></a><img src="http://www.winksonline.com/catalog/images/winksbanner_07.gif" width="16" height="27"><br>

<img src="http://www.winksonline.com/catalog/images/winksbanner_08.gif" width="759" height="136">

</td>

</tr>

</table>

How do you know when you know what you want to do for the rest of your life?

Posted

OMG, you are the man.. now does anyone know how to center the entire shop?? LOL I suppose that will be tomorow's task

THANKS

Archived

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

×
×
  • Create New...