Guest Posted April 9, 2005 Share Posted April 9, 2005 Hi, can someone who is more knowledgeable than I help out here? I have installed the contribution Easy Update Information Pages which allows you to update the contents of your information boxes from the control panel area. The installation was fine and I also created a new box for my own purpose. I need to show some size charts on the site for items of clothing. I have had terrible problems trying to get the HTML code I wrote for the charts to show correctly in the box. I have now given up on this and have decided to install Include HTML and Text Boxes contrib as this sounds like it should enable me to add text and HTML code into the boxes. The instructions for this code are fairly stright forward and just involve copying and pasting a bit of code, but I can't see where I should paste it as my size_chart.php and other info files are already modified. This is the instruction for modified files from the read me. open conditions.php and find the following code [around lines 53-55 of MS2]: --------------------------------------------------------------------------------------- <tr> <td class="main"><?php echo TEXT_INFORMATION; ?></td> </tr> --------------------------------------------------------------------------------------- and replace it with the following code: --------------------------------------------------------------------------------------- <tr> <td class="main"> <?php // Lines added for Include HTML and Text Box Contribution V. 1.6 $html_file = DIR_WS_LANGUAGES . $language . '/html/' . basename($PHP_SELF,".php") . '.html'; $html = implode("", file($html_file)); echo ereg_replace("(<!doctype([^>]+)>)|(<[/]?html>)|(<head>(.*)?</head>)|(<[/]?body([^>]+)?>)", '', $html); ?> </td> </tr> --------------------------------------------------------------------------------------- Now save that file and close it. Now repeat what you just did for privacy.php, contact_us.php, and shipping.php. I just cannot see where to add this code to my size_chart.php file. My file looks like this: Mod Created by Craig Harrison */ ?> <?php require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SIZE_CHART); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SIZE_CHART, '', 'NONSSL')); ?> <!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 (getenv('HTTPS') == 'on' ? 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="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 valign="top"> <?php $sql=mysql_query('SELECT * FROM info_size') or die(mysql_error()); $row=mysql_fetch_array($sql); ?> <br><br> <table width="100%" cellspacing="0" cellpadding="0" > <tr class="header"> <td class="headerNavigation" width="10"> <img border="0" src="images/infobox/corner_right_left.gif"></td> <td class="headerNavigation">Size Chart</td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td> <table width="100%" border="0" cellpadding="4" cellspacing="4" class="infoBoxContents"> <tr> <td class="boxtext" valign="top"> <?php echo str_replace("\r\n", "<br>", $row['Text']); ?> </td> </tr> </table> </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'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> I guess what I want to do is either keep the facility to enter information into the boxes via the control panel (preferred for other boxes) or edit the information for the size charts seperately while keeping the control panel facility for the others i.e shipping conditions etc. Can anyone help out here? I am sure it is something strightforward for someone who knows what they are doing but after 4 hours this morning I am now stumped. Grateful thanks to anyone reading this plea. Mogsta Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted April 9, 2005 Share Posted April 9, 2005 hi, You can insert the code into this section, just before the '<tr>' line: <table width="100%" border="0" cellpadding="4" cellspacing="4" class="infoBoxContents"> <tr> This way it will show up before any text you maintained using the tool. If you'd like it after you need to insert the code in between the first '</tr>' and '</table>' tags. <td class="boxtext" valign="top"> <?php echo str_replace("\r\n", "<br>", $row['Text']); ?> </td> </tr> </table> </td> </tr> </table> HTH, Carine Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2005 Share Posted April 9, 2005 hi, You can insert the code into this section, just before the '<tr>' line: HTH,Carine[right][post=589540]<{POST_SNAPBACK}>[/post][/right] thank you very much. I will try it later and let you know how I got on. Many thanks for helping a newbie. regards Jean Quote Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2005 Share Posted April 9, 2005 thank you very much. I will try it later and let you know how I got on. Many thanks for helping a newbie. regards Jean <{POST_SNAPBACK}> Brilliant, it does what it says on the tin. After 4 days of trying I now have my beautiful size charts visible to the world. Thank you so much for sorting this out for me. I am really happy with my results which I felt were totally beyong my reach. kind regards Jean Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.