Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help adding graphic to infoboxes


Avec

Recommended Posts

Instead of having the heading box of the infoboxes color, I would like to set them apart with a small graphic, such as a scrolly line before the heading, or after or both. I have searched and tested and it would seem simple to add a cell and a graphic, but I am having a hard time figuring out exactly where and to which files. I even don't mind the same graphic for all the boxes.

 

There is an older contribution that includes this in information.php

<?php
/*
 $Id: information.php,v 1.5 2002/01/11 22:04:06 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2001 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
<tr>
<td>
<br>
<TABLE WIDTH=173 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
	<TD COLSPAN=3>
		<IMG SRC="images/boxes/table_policies.gif" WIDTH=173 HEIGHT=20></TD>
</TR>
<TR>
<td>
<?php
 $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>'
						  );
 new infoBox($info_box_contents);
?>
</TD>
</TR>
<TR>
	<TD COLSPAN=3>
		<IMG SRC="images/boxes/table_footer3.gif" WIDTH=173 HEIGHT=20></TD>
</TR>
</TABLE>
</td>
</tr>
<!-- information_eof //-->

 

This did not work for me. When trying, the infobox heading did not appear at all, nothing including the image.

Link to comment
Share on other sites

I will give that a try, but is there a way to leave the heading_text as is and add the graphic to the top of the table in the box or in a separate table/cell in the info box?

Link to comment
Share on other sites

This works:

 

<?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
*/
?>
<!-- information //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();

 $info_box_contents[] = array('text' => tep_image(DIR_WS_IMAGES . 'stars_5.gif '));

 new infoBox($info_box_contents);

 $info_box_contents = array();

 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

Just for an example I used one of the stock osC images (stars_5.gif), but you can supply your own.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

He wants it ABOVE the header text (I think), not beside it, but thanks for the show anyway.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

germ

it worked as advertised. That allowed me to put the graphic in and it easily will go above or below the heading, which is what I wanted.

 

Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...