dan182skater Posted June 25, 2004 Posted June 25, 2004 Does anyone know what files need to be edited when trying to make a contribution work with bts? Right now I am trying to get the allmanufacturers contribution to work with bts and there is a file that goes in the language directory, and a file that goes in the main directory. The main directory file is different from the regular ones because of BTS. I am using a contribution called Easy New Pages and that makes a blank new page. Here is what the blank page looks like... <?php /* $Id: new_page.php easy new pages v1.0 for the BTS 2004/01/07 Released under the GNU General Public License */ require('includes/application_top.php'); $pageFileName = basename ($PHP_SELF); $pageName = basename ($PHP_SELF,".php"); // needs php => 4.1 // set the name of the javascript file to load (only if needed) from "includes/javascript/"" // $javascript = 'new_page.js'; if (file_exists(DIR_WS_TEMPLATES . 'content/' . $pageName . '.tpl.php')) { // use the template made for this page $content = $pageName; } else { // or use 'static.tpl.php', or fill in which other template i.s.o. 'static' should be used $content = 'static'; } // load (language dependent) texts defines from "includes/languages/.../new_page.php" if it exists if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $pageFileName)) { require(DIR_WS_LANGUAGES . $language . '/' . $pageFileName); } $breadcrumb->add(NAVBAR_TITLE, tep_href_link($pageFileName)); /******************************************************************************/ // PHP code here, but no output (output code and HTML in template file) /******************************************************************************/ // load main_page (the $content template and $javascript are included in main_page.tpl.php) require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE); require(DIR_WS_INCLUDES . 'application_bottom.php'); The allmanufacturers page looks like this... <?php /* $Id: allmanufacturers.php,v 1.0 2003/11/25 10:12:10 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 - 2003 osCommerce All Manufacturers by Alex Kaiser [email protected] www.pooliestudios.com Edited by Roman Gruhn [email protected] Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ALLMANUFACTURERS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ALLMANUFACTURERS)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table width="100%" border="0" align="center" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"> </td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><br><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <!-- all manufacturers begin //--> <?php $row = 0; $manufacturers_query = tep_db_query("select manufacturers_name, manufacturers_id, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name" ); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $row++; echo '<td align="center" valign="top" width="25%" class="smallText">'; echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id'] . '=' . $manufacturers['manufacturers_name'], 'NONSSL', false) . '">' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image'], $manufacturers['manufacturers_name']) . "</a><br><br>\n"; echo '</td>'; if ((($row / 4) == floor($row / 4))) { ?> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <?php } } ?> <!-- all manufacturers end //--> </td> </tr> </table></td> </tr> <tr> <td align="right" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> I think I am also supposed to put a file called allmanufacturers.tpl.php in the templates folder of my bts section. I am really lost and have tried everything for 3 days now. Any help will be greatly appreciated. Thank you.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.