Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

index.php editing


blueyzfr1

Recommended Posts

Hi,

I've pared down my index.php file to tidy up the first page.

I cannot seem to delete any more before errors occur.

Any ideas what bits I can take out?

Anyone got a clean one!

Code below, please help.

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', '<br>hello<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b></b><br><br><br><br><span class="messageStackError"></span><br><br></td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b></b><br><br><br><br><nobr class="messageStackSuccess">' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br><nobr class="messageStackSuccess"></nobr><nobr class="messageStackSuccess"></nobr><br><br><br><br><nobr><span class="messageStackSuccess"></span></nobr><br><br><br><br><nobr></nobr><br><br><a href="http://www.php.net/define" target="_blank"><u></u></a></td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b></b><br><br></td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b></b><br><br><a href="http://wiki.oscommerce.com" target="_blank"><u></u></a><br><br><a href="http://www.oscommerce.com/forums" target="_blank"><u></u></a></td></tr></table><br><a href="http://www.oscommerce.com" target="_blank"><u></u></a><font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', 'What\'s New');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

Link to comment
Share on other sites

try this - let me know what error messages you get - hopefully none:

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', '<br>hello<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . '</td><td class="main" valign="top"><b></b><br><br><br><br><span class="messageStackError"></span><br><br></td></tr><td class="main" valign="top">' . '</td><td class="main" valign="top"><b></b><br><br><br><br><nobr class="messageStackSuccess">' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br><nobr class="messageStackSuccess"></nobr><nobr class="messageStackSuccess"></nobr><br><br><br><br><nobr><span class="messageStackSuccess"></span></nobr><br><br><br><br><nobr></nobr><br><br><a href="http://www.php.net/define" target="_blank"><u></u></a></td></tr><tr><td class="main" valign="top">' . '</td><td class="main" valign="top"><b></b><br><br></td></tr><tr><td class="main" valign="top">' . '</td><td class="main" valign="top"><b></b><br><br><a href="http://wiki.oscommerce.com" target="_blank"><u></u></a><br><br><a href="http://www.oscommerce.com/forums" target="_blank"><u></u></a></td></tr></table>');

 

 

 

 

 

 

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', 'What\'s New');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

Your online success is Paramount.

Link to comment
Share on other sites

Hi,

Cheers.

I've just got the code a lot shorter, can you go through this little bit, all I need is to know what bits to get rid of, sorry to be a pain, if you look at my site it looks cleaner already!

 

define('TEXT_MAIN', '<table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b></b><span class="messageStackError"></span></td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b></b><nobr class="messageStackSuccess">' . $language . '/' . FILENAME_DEFAULT . '</nobr><nobr class="messageStackSuccess"></nobr><nobr class="messageStackSuccess"></nobr><nobr><span class="messageStackSuccess"></span></nobr><nobr></nobr><a href="http://www.php.net/define" target="_blank"><u></u></a></td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b></b></td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b></b><a href="http://wiki.oscommerce.com" target="_blank"><u></u></a><a href="http://www.oscommerce.com/forums" target="_blank"><u></u></a></td></tr></table><a href="http://www.oscommerce.com" target="_blank"><u></u></a><font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...