Jump to content


  • Content count

  • Joined

  • Last visited

1 Follower

Profile Information

  1. I have quickly tested this and it seems to work Ok if ((substr(basename($PHP_SELF), 0, 5) !='index') | ($cPath > 0)) { // include box }
  2. lango?

    [Contribution] Infobox Admin

    The current version is only MS1 compatible. To solve the problem, open the file infobox_configuration.php and search for tep_array_merge Replace all occurances with array_merge This function was on of the many changes to MS2. Also.. Not absolutly neccessary but you should copy the define(FILENAMES to the correct file --- filename.php and the define(TABLES to the database.php file both found in the includes folder. I will do an update shortly once I've finished the project I'm currently working on. :wink:
  3. To exclude boxes from certain pages is relatively easy, Index.php for example you coud use this if statement in each box file you want to exclude... if (substr(basename($PHP_SELF), 0, 5) !='index') { // include box } The only problem with this is the 3 parts to index.php default, nested and products, it will stop your box from displaying in all these.
  4. A little help would be appreciated. :roll: Thanks in advance. :D You obviously know how many different file for the affiliate mod there are in the catalog directory, so heres an example for affiliate_affiliate.php.. This becomes affiliate_affiliate.php and is in the root directory(catalog) <?php /* $Id: affiliate_affiliate.php,v 1.8 2003/02/19 00:28:16 harley_vb Exp $ OSC-Affiliate Contribution based on: osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 - 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) { $affiliate_username = tep_db_prepare_input($HTTP_POST_VARS['affiliate_username']); $affiliate_password = tep_db_prepare_input($HTTP_POST_VARS['affiliate_password']); // Check if username exists $check_affiliate_query = tep_db_query("select affiliate_id, affiliate_firstname, affiliate_password, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_email_address = '" . tep_db_input($affiliate_username) . "'"); if (!tep_db_num_rows($check_affiliate_query)) { $HTTP_GET_VARS['login'] = 'fail'; } else { $check_affiliate = tep_db_fetch_array($check_affiliate_query); // Check that password is good if (!tep_validate_password($affiliate_password, $check_affiliate['affiliate_password'])) { $HTTP_GET_VARS['login'] = 'fail'; } else { $affiliate_id = $check_affiliate['affiliate_id']; tep_session_register('affiliate_id'); $date_now = date('Ymd'); tep_db_query("update " . TABLE_AFFILIATE . " set affiliate_date_of_last_logon = now(), affiliate_number_of_logons = affiliate_number_of_logons + 1 where affiliate_id = '" . $affiliate_id . "'"); tep_redirect(tep_href_link(FILENAME_AFFILIATE_SUMMARY,'','SSL')); } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_AFFILIATE); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_AFFILIATE, '', 'SSL')); $content = CONTENT_AFFILIATE; require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> This becomes affiliate_affiliate.tpl.php and is put in the templatescontent folder... <table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB; ?>"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td rowspan="2" class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if (isset($HTTP_GET_VARS['login']) && ($HTTP_GET_VARS['login'] == 'fail')) { $info_message = TEXT_LOGIN_ERROR; } if (isset($info_message)) { ?> <tr> <td class="smallText"><?php echo $info_message; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_form('login', tep_href_link(FILENAME_AFFILIATE, 'action=process', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_AFFILIATE; ?></b></td> <td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_AFFILIATE; ?></b></td> </tr> <tr> <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2" class="infoBoxContents"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main" valign="top"><?php echo TEXT_NEW_AFFILIATE . '<br><br>' . TEXT_NEW_AFFILIATE_INTRODUCTION; ?></td> </tr> <tr> <td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_TERMS, '', 'SSL') . '">' . TEXT_NEW_AFFILIATE_TERMS . '</a>'; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> </table></td> </tr> </table></td> <td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2" class="infoBoxContents"> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main" colspan="2"><?php echo TEXT_RETURNING_AFFILIATE; ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo TEXT_AFFILIATE_ID; ?></b></td> <td class="main"><?php echo tep_draw_input_field('affiliate_username'); ?></td> </tr> <tr> <td class="main"><b><?php echo TEXT_AFFILIATE_PASSWORD; ?></b></td> <td class="main"><?php echo tep_draw_password_field('affiliate_password'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_AFFILIATE_PASSWORD_FORGOTTEN . '</a>'; ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="infoBoxContents"> <tr> <td width="50%" align="left" valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_SIGNUP, '', 'SSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="50%" align="right" valign="top"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td> </tr> </table></td> </tr> </table></form></td> </tr> </table> open the folder includes... and then the filenames.php and add ... // Lango added for Affiliate Mod: BOF define('CONTENT_AFFILIATE', 'affiliate_affiliate'); // the rest go in here............ // Lango added for Affiliate Mod: EOF also... // Lango added for Affiliate Mod: BOF define('FILENAME_AFFILIATE', CONTENT_AFFILIATE . '.php'); // again the rest go in here.... // Lango added for Affiliate Mod: BOF And I think that should do it :wink:
  5. have you installed the patch that Brendan made available for download from his site? Patches for BTS ver1.0 can be found here http://www.w3design.ca/files/
  6. This is what a configure.php file should look like when running the basic template structure and on a localhost machine. <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'localhost'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/catalog5/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/catalog5/'); define('DIR_WS_HTTPS_CATALOG', ''); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); //********************************************************** define('DIR_WS_TEMPLATES', 'templates/'); define('DIR_WS_CONTENT', DIR_WS_TEMPLATES . 'content/'); define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/'); //********************************************************** define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', 'E:/catalog5/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'oscommerce6'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' The part between the *** is probably where you are getting the error, cross reference your file against this. The configure.php file is found in the includes folder.
  7. the tep_db_query function SHOULD be in the general.php file found in the functions folder on line 32 (in MS2). it is as follows function tep_db_query($query, $link = 'db_link') { global $$link; if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { error_log('QUERY ' . $query . "n", 3, STORE_PAGE_PARSE_TIME_LOG); } $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { $result_error = mysql_error(); error_log('RESULT ' . $result . ' ' . $result_error . "n", 3, STORE_PAGE_PARSE_TIME_LOG); } return $result; } Have you added the require to application_top.php in your NEW file? require('includes/application_top.php'); Does the rest of your site work OK?
  8. It's concatenate and for those who don't know or want to search ... To arrange (strings of characters) into a chained list To be honest though bryan you've lost me :?: That is what is supposed to be in your product_info.php file. For any reason you wanted a space or / you would type: require(DIR_WS_TEMPLATES . '/ ' . TEMPLATENAME_MAIN_PAGE); but if this is not the require in the file this is why you are getting the error require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);
  9. Bryan, It looks as though there is a point missing between the DIR_WS_TEMPLATES and TEMPLATENAME_MAIN_PAGE in the require found in the file catalog/product_info.php It should look like this? require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);
  10. lango?


    This is line 38 new infoBoxHeading($info_box_contents, $newtheme, false, false); and this after modification new infoBoxHeading($info_box_contents, false, false); Regards The_Bear Try changing: new infoBoxHeading($info_box_contents, false, false); to new infoBoxHeading($info_box_contents, $newtheme, false, false);
  11. Thanks to Brenden, I managed to resolve the same bug. It is a problem with the version of php you are running. See this thread http://www.forums.oscommerce.com/viewtopic.php?t=51146
  12. If you view your source code it shows the code below that's found in the footer: <div align="center"> <img name="Footer_r3_c1" src="includes/template/V-BabyBlue/template_images/spacer.gif" width="1" height="1" border="0" alt> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <a href="http://www.tank27.com/shop/redirect.php?action=banner&goto=8&osCsid=xxxxxxxxxxxxxxx" target="_blank"> <img src="images/CABXP3EQ.gif" border="0" alt="WizardsAndWars" title=" WizardsAndWars " width="468" height="60"></a></td> </tr> </table> <br /> <br /> <span class="slogan"> </span> <br /> </div> Remove from your thema_footer.php file the <br /><br /> and the <br /> after your span class
  13. TANK27 wrote: I cannot tell a lie it was I but it looked a little better when I did it :wink: You can try inserting the code below just after the following: ."<img name="Footer_r3_c1" src="includes/classes/thema/V-BlueBaby/images/spacer.gif" width="1" height="1" border="0" alt="">n"; Insert this: if ($banner = tep_banner_exists('dynamic', '468x50')) { echo "<br>n" ."<table border="0" width="100%" cellspacing="0" cellpadding="0">n" ."<tr>n" ."<td align="center">" . tep_display_banner('static', $banner) . "</td>n" ."</tr>n" ."</table>n"; } You will need to add your banner in the admin area.