Guest Posted March 4, 2003 Share Posted March 4, 2003 Can you add custom html into a header.php file and then custom html into a footer.php file, and then just include these files on all the base pages? I want to convert the cart over to my design, and I think this would be the easiest way. That way I can just modify tohse 2 files. All the cart code will be stuck in a table that is in between those 2 files' code. Would it work? Link to comment Share on other sites More sharing options...
26.2 Posted March 4, 2003 Share Posted March 4, 2003 You can stick custom html anywhere in the site. You are right to use the Header and Footor files so the changes are universal. aj "Of the things we think, say or do: Is it the TRUTH? Is it FAIR to all concerned? Will it build GOODWILL and BETTER FRIENDSHIPS? Will it be BENEFICIAL to all concerned?" Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2003 Share Posted March 4, 2003 can the custom header file end in a <td> tag and the custom footer start in a </td> tag, so that everything in the actual pages is inside a table cell? i'm still getting used to php, so just wondering. Link to comment Share on other sites More sharing options...
26.2 Posted March 4, 2003 Share Posted March 4, 2003 Take a look at your default.php file and you will see php includes html inside the code. Html actually doesn't even know about PHP. the <?php tag in and ?> tab out starts and stops the PHP. Here is an example of what you are asking about: <map name="Map"> <?php echo '<area shape="rect" coords="505,4,594,27" href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '">'; ?> <?php echo '<area shape="rect" coords="472,26,594,47" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">'; ?> <?php echo '<area shape="rect" coords="596,4,710,27" href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">'; ?> <area shape="rect" coords="628,25,761,45" href="/catalog/contact_us.php"> </map> Inside the map definition is both PHP and HTML. The map for my 750x50 header image is at the bottom of my header.php. Here is another example: --------------------------------------------------------------------------------- ?> <table border="0" width="752" cellspacing="0" cellpadding="1" align="center"> <tr class="header"> <td width="750" valign="middle"><img src="http://www.iowasoap.com/catalog/images/oscommerce.gif" width="750" height="50" border="0" usemap="#Map"></td> </tr> </table> <table border="0" width="750" cellspacing="0" cellpadding="1" align="center"> <tr class="headerNavigation"> <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> </tr> </table> <?php if ($HTTP_GET_VARS['error_message'] != '') { ?> --------------------------------------------------------------------------------- This is from higher up in the Header.php file. Note how just before the table there is the end of a PHP statement '?>' aj "Of the things we think, say or do: Is it the TRUTH? Is it FAIR to all concerned? Will it build GOODWILL and BETTER FRIENDSHIPS? Will it be BENEFICIAL to all concerned?" Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2003 Share Posted March 4, 2003 so what is the easiest way to contain the entire site within a set design that I can edit via 1-2 files? Take a look at this: http://www.craniumdesigns.com/kit I want to put the entire OSCommerce area in between those lower buttons and the footer bar with the copyright info. How can I easily do this so I can edit the entire desifn of the site by only editing 1-2 files? Please be specific. I am new to PHP. Link to comment Share on other sites More sharing options...
26.2 Posted March 4, 2003 Share Posted March 4, 2003 Awsome looking site layout. I love it! Well, asking to be able to do it in only two files would be tough. You need to start by going to http://guide.oscdox.com. Download the modification guide. Print it. Read it. You will find the best tutorial on editing the look and feel of the site. Some of the files you will end up changing are: default.php stylesheet.css header.php footer.php application_top.php application_bottom.php english.php (other languages if you are going for polyglot) .... and through search and replace tools many more. But the changes will be global, so you will only have to issue one command to change all the pages. You will have spent the wisest amount of time by reading the oscdox manual. aj "Of the things we think, say or do: Is it the TRUTH? Is it FAIR to all concerned? Will it build GOODWILL and BETTER FRIENDSHIPS? Will it be BENEFICIAL to all concerned?" Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2003 Share Posted March 4, 2003 Hi, Since you have the header and the footer you could remove the right and left columns on all the pages in the catalog folder. Then set the middle table to a fixed width. Sometimes I put this table inside another table and set up a new td.style for that table setting the width and so on customizing that outer table with the background color and the sides with a shadow like you have it now. All these changes need to be made on all the files in the catalog folder. Search and replace is great! You can also do a lot in the stylesheet. Hope this helps. Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2003 Share Posted March 5, 2003 I just added my code to header.php and footer.php. Worked fine. After a bif ot CSS changin' and editing of the boxes.php file, I got this for the front page. Still got editing to do on the other pages, but getting there. http://www.craniumdesigns.com/cart/catalog/ Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2003 Share Posted March 5, 2003 Very nice Steve! It won't take too long. Link to comment Share on other sites More sharing options...
Jason Jacobs Posted March 5, 2003 Share Posted March 5, 2003 That design looks awesome. I'm jealous :) -j Link to comment Share on other sites More sharing options...
Beridox Posted April 20, 2003 Share Posted April 20, 2003 Hi! I am trying to use image maps, but i cant get it to work. I try to explain my problem. I have a table with a image in my footer.php, depending on witch language i choose,it shows the right picture. This is the code in footer.php: (works great) <?php echo tep_image_button('footer.gif' , IMAGE_BUTTON_FOFSING); ?> Then i try to link the picture to a page, and i came up with this code: (works great) <?php echo '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . tep_image_button('footer.gif', IMAGE_BUTTON_FOFSING) . '</a>' ; ?> Then i shall make a image map on the footer.gif picture and i need to put the "map code" inside all this. I have tried something like this: <map name="map"> <?php echo '<area shape="rect" coords="131,92,438,145" a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . tep_image_button('footer.gif', IMAGE_BUTTON_FOFSING) .'</a>' ; ?> </map> But it?s not working, i think i have the " and ' and > in the wrong places, but i have no clue how to count them and get it right. Someone that is good on PHP, that knows how the write the right code? All help is welcome. /Anneli Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.