RE: propose a code change in box structure
burt <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.suggestions |
|---|---|
| Message-ID | <bdb33066dd8809a11679c9e5794598d3@osCommerce-Forums> |
This message was sent from: Suggestions and Proposals
http://forums.oscommerce.com/viewtopic.php?p=191949#191949
----------------------------------------------------------------
[quote="cannuck1964"][code]<!-- information //-->
<tr>
<td>[/code]
[/quote]Pretty much the same as mine, this creates the bounding <td> which holds the contents:
[quote="cannuck1964"][code]
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_HEADING_INFORMATION
);
new infoBoxHeading($info_box_contents, false, false);
[/code][/quote]
This bit uses the class infoBoxHeading to create a nested table, which though workable is not a good solution to create a border (which is all it does).
[quote="cannuck1964"][code] $info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_GV_REDEEM, '', 'NONSSL') . '">' . BOX_INFORMATION_GV . '</a>');//ICW ORDER TOTAL CREDIT CLASS/GV
new infoBox($info_box_contents);
?>
[/code][/quote]
The above creates another nested table to contain the actual infobox itself. Again, this is unnecessary.
[quote="cannuck1964"][code]</td>
</tr>
<!-- information_eof //-->[/code]
[/quote]
Ends the opening tag, to prevent HTML spillage.
So what this does is give exactly the same look as what I posted, but as you can see the solution I use is easier to understand, and is changable much more easily.
Sorry if I'm teaching you to suck eggs - but for anyone else reading it migh tmake a bit more sense now (hopefully) :)
notice the leading html and ending html tags.....
cheers,[/quote]