Guest Posted June 23, 2010 Posted June 23, 2010 I must be having one of 'those days'! i figure the answer to this is somewhere in the forum, but after searching for what seems like half a day, i cannot find it. I know how to create a new info box, and add it to left/right column, etc - no probs. i have done that with a box the i called 'Shipping Costs'. The idea is for this box to link back to my Shipping Info page. This is the code for that box: <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- shipping //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SHIPPING); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_SHIPPING . '</a>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> This gives me a box with a link to the shipping info page. However, i really want to add a paragraph of text into it - no links, no pics, just free text. I cannot find how to do it. i am sure that it is such a simple little process that when someone tells me how to do it i will feel silly, but i have big shoulders and can take the sniggers and criticism! Love this forum. Cheers, Richard
Guest Posted June 23, 2010 Posted June 23, 2010 Richard, You edit the shipping.php language file in includes/languages/english/ You can edit the text in that file. Chris
Guest Posted June 23, 2010 Posted June 23, 2010 Richard, You edit the shipping.php language file in includes/languages/english/ You can edit the text in that file. Chris Thanks for your prompt reply. However, perhaps i was not very clear (i can be a bit like that after staring at the computer hours on end!). i dont need to change the information/text that is contained in the shipping.php file. I have created another box in the right column of my site. in this box i have a link to the shipping.php page. Within this box, as well as the link, i want to add extra text. So, how can i add extra text to this new box that i have created? Richard
chadcloman Posted June 23, 2010 Posted June 23, 2010 In the code you posted above, edit the following line: $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_SHIPPING . '</a>'); To have text only, do something like this: $info_box_contents[] = array('text' => 'PLACE YOUR TEXT HERE'); The text can be HTML formatted, but I'm not sure what happens if you use block-level tags. Also, if you use apostrophes in your text, be sure to place a backslash in front of them (\'); Check out Chad's News.
chadcloman Posted June 23, 2010 Posted June 23, 2010 And to do both the link and text, you want something like this: $the_box_text = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_SHIPPING . '</a>'; $the_box_text .= '<br>'; $the_box_text .= 'PLACE YOUR TEXT HERE'; $info_box_contents[] = array('text' => $the_box_text); Check out Chad's News.
Guest Posted June 23, 2010 Posted June 23, 2010 In the code you posted above, edit the following line: $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_SHIPPING . '</a>'); To have text only, do something like this: $info_box_contents[] = array('text' => 'PLACE YOUR TEXT HERE'); The text can be HTML formatted, but I'm not sure what happens if you use block-level tags. Also, if you use apostrophes in your text, be sure to place a backslash in front of them (\'); Brilliant, that's what i am after. And so simple! thanks, Richard
Recommended Posts
Archived
This topic is now archived and is closed to further replies.