airblaster Posted September 7, 2003 Posted September 7, 2003 In OSC's current state its impossible to include OSC into a site without using frames or modifying dozens of files. To change this I suggest to replace the current header code (the part which includes header.php) with something like this: <!-- header_top //--> <?php require(DIR_WS_INCLUDES . 'header_top.php'); ?> <!-- header_top_eof //--> <script language="javascript" src="includes/general.js"></script> (lots of JavaScript Code can go here) <!-- header_bottom //--> <?php require(DIR_WS_INCLUDES . 'header_bottom.php'); ?> <!-- header_bottom_eof //--> <!-- body //--> ........ header_top.php would contain everything till <head> (or the stylesheet definition if it is supposed to be included on every page), and header_bottom.php everything beginning from </head>. The html footer code would also be moved to footer.php. Dynamic titles could still be used if you simply output a variable containing the title of the current page. This method has got several advantages: - removes redundancy of HTML header code (change html header/footer at only 1 place instead of dozens of files) - its possible to include induividual javascript functions and other code that goes between the <head> and </head> only for the files that need the code. - allows users to integrate osCommerce into the Design of their webpage easily (e.g. they can include their php based framework that always displays its own html headers) - its easy to implement
airblaster Posted September 26, 2003 Author Posted September 26, 2003 Why doesn't anybody comment my suggestion? Is it really that bad that you don't even want to discuss it?!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.