tim_ver Posted August 14, 2006 Share Posted August 14, 2006 I am somewhat good with php but not and expert yet. I want to have another page and saw how all pages are called from the catalog/filename.php to includes/language/english/filename.php I want to have a simple FAQ's page with just questions on it and then you click the question and the answer pops up in a small box with a close button in it. I have looked at the code from Privacy.php and tried to just change out the lines below but I get an error page can not be found and the page is there. :( Help Here is the old code and then new: Old: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRIVACY); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRIVACY)); New: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FAQS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FAQS)); I only tried to change these lines not sure If I need to do more. Someone please help. The error I get is: Warning: main(includes/languages/english/FILENAME_faqs): failed to open stream: No such file or directory in /home/main/public_html/22/Catalog/faqs.php on line 15 Warning: main(includes/languages/english/FILENAME_faqs): failed to open stream: No such file or directory in /home/main/public_html/22/Catalog/faqs.php on line 15 Fatal error: main(): Failed opening required 'includes/languages/english/FILENAME_faqs' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/main/public_html/22/Catalog/faqs.php on line 15 Thanks Link to comment Share on other sites More sharing options...
♥Vger Posted August 15, 2006 Share Posted August 15, 2006 Create: catalog/faqs.php catalog/includes/languages/english/faqs.php Edit: includes/filenames.php If you want the link to it in the Information Box then edit: includes/boxes/information.php includes/languages/english.php (the entries for the Information Box) Vger Link to comment Share on other sites More sharing options...
tim_ver Posted August 15, 2006 Author Share Posted August 15, 2006 Vger: Thanks I am just having the word FAQs on the header.php. I added define in filnames.php and did the faqs.php file still get same error. Here is what I have. faqs.php (this is in: Catalog) <?php /* $Id: faqs.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FAQS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FAQS)); ?> <!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 border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <!-- 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> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo TEXT_INFORMATION; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> This is faqs.php in Catalog/includes/languages/english/ <?php /* $Id: faqs.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ define('NAVBAR_TITLE', 'Faqs Notice'); define('HEADING_TITLE', 'Faqs Notice'); define('TEXT_INFORMATION', 'FAQs What is the policy for sales items? <a href="services.html" target="_blank">click here</a>. ');?> This is a just like what works for privacy.php In filnames.php I added : define('FILENAME_PRIVACY', 'faqs.php'); So Ideas why it still is not working? The link grabs the faqs.php in the Catalog folder. Let me know what to change and or fix so this works? Thanks Much. Link to comment Share on other sites More sharing options...
tim_ver Posted August 15, 2006 Author Share Posted August 15, 2006 I got it working. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.