Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Did the contribution on infobox cornersm, need help


mxstates

Recommended Posts

It probably would help if you posted the link to whatever contribution you are referring to.

 

If you're talking about the "dirt toys" site, the items in question (infobox corners) are IMAGES.

 

You don't change those with the stylesheet...

:huh:

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

Transparent gif's for the infobox corners. This one will still give you rounded corners on the infoboxes while letting you set the infobox heading color by only using the stylesheet.

I think you misunderstand the meaning there.

 

The corners are images and must be edited with image editing software (like Paint) to change the color.

 

The "heading color" it refers to changing in the stylesheet is the bar the images are in.

:blush:

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

This thread:

 

How Do I ...? All the basic install questions regularly asked..., change text, boxes, layout, fonts, dates, breadcrumb and more...

 

Tip #8. … Remove / Add the rounded corners to the info boxes on the left or right columns?

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

  class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
  $this->table_cellpadding = '0';

  if ($left_corner == true) {
/*		$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); */
	$left_corner = '  ';
  } else {
/*		$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); */
	$left_corner = '  ';
  }
  if ($right_arrow == true) {
	$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
  } else {
	$right_arrow = '';
  }
  if ($right_corner == true) {
/*		$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); */
	$right_corner = $right_arrow . '  ';
  } else {
/*		$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); */
	$right_corner = $right_arrow . '  ';
  }

  $info_box_contents = array();
  $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
									 'text' => $left_corner),
							   array('params' => 'width="100%" height="14" class="infoBoxHeading"',
									 'text' => $contents[0]['text']),
							   array('params' => 'height="14" class="infoBoxHeading" nowrap',
									 'text' => $right_corner));
  $this->tableBox($info_box_contents, true);
}
 }

I recoded the function in /includes/classes/boxes.php

 

Backup what you have and replace the function class infoBoxHeading extends tableBox with the code I posted.

 

This is NOT a code replacement for the entire file, just that one function.

 

I tested it on my site, and it removes the infobox corners - no runs, no drips, no errors...

 

Be sure you have a backup 'cuz I aint responsible for anything you might mess up accidentally...

:blush:

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

  • 2 months later...
  class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
  $this->table_cellpadding = '0';

  if ($left_corner == true) {
/*		$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); */
	$left_corner = '  ';
  } else {
/*		$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); */
	$left_corner = '  ';
  }
  if ($right_arrow == true) {
	$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
  } else {
	$right_arrow = '';
  }
  if ($right_corner == true) {
/*		$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); */
	$right_corner = $right_arrow . '  ';
  } else {
/*		$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); */
	$right_corner = $right_arrow . '  ';
  }

  $info_box_contents = array();
  $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
									 'text' => $left_corner),
							   array('params' => 'width="100%" height="14" class="infoBoxHeading"',
									 'text' => $contents[0]['text']),
							   array('params' => 'height="14" class="infoBoxHeading" nowrap',
									 'text' => $right_corner));
  $this->tableBox($info_box_contents, true);
}
 }

I recoded the function in /includes/classes/boxes.php

 

Backup what you have and replace the function class infoBoxHeading extends tableBox with the code I posted.

 

This is NOT a code replacement for the entire file, just that one function.

 

I tested it on my site, and it removes the infobox corners - no runs, no drips, no errors...

 

Be sure you have a backup 'cuz I aint responsible for anything you might mess up accidentally...

:blush:

Hi,

I used the code above and got rid of most of the round corners (thanks for that, Jim). However, it does not remove the round corner at the top left of the "New Products for February" box. How can I change it into a square corner, please?

Link to comment
Share on other sites

We did that here: click me

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

  • 1 month later...

Hi germ,

 

Carried out your instructions exactly and everything is okay except the Categories Box.

 

First time accessing the page, all looks fine but subsequently if you were to select something in the categories box, the rounded (sort of broken) image still shows up.

 

Have a look here to see what I mean.

 

All the other info boxes look good. The only change I made to the code was to leave out the   for both the let and right since I use the stylesheet and indent 5px as was described here.

 

Using Firebug to check I notice that the image "corner_left.gif" is still been called only for that Categories infoboxheading!!

 

Any ideas what I can do? I am using osCommerce 2.2 RC2

 

Thanks.

Link to comment
Share on other sites

In your admin set 'Use Cache' to false and see if it goes away.

 

Or, if you can find it, somewhere in there in a "Reset Cache".

 

That would work just as good in this situation.

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

In your admin set 'Use Cache' to false and see if it goes away.

 

Or, if you can find it, somewhere in there in a "Reset Cache".

 

That would work just as good in this situation.

 

 

Thanks germ. Yep that did it. I set "Use Cache" to false.

 

Regards.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...