Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Did the contribution on infobox cornersm, need help


14 replies to this topic

#1 mxstates

  • Community Member
  • 37 posts
  • Real Name:Brian Gibson

Posted 16 November 2008, 21:54

I replaced the 4 files and it said I would be able to modify the color in stylesheet.css but where? I dont see it

#2 mxstates

  • Community Member
  • 37 posts
  • Real Name:Brian Gibson

Posted 16 November 2008, 23:57

anyone there?

#3 germ

  • Community Member
  • 13,582 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 17 November 2008, 00:15

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.

"Headers already sent" - The definitive help

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

SSL Implementation Help

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

#4 mxstates

  • Community Member
  • 37 posts
  • Real Name:Brian Gibson

Posted 17 November 2008, 00:21

http://addons.oscommerce.com/info/4764

this contribution

#5 germ

  • Community Member
  • 13,582 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 17 November 2008, 00:26

Quote

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.

"Headers already sent" - The definitive help

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

SSL Implementation Help

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

#6 mxstates

  • Community Member
  • 37 posts
  • Real Name:Brian Gibson

Posted 17 November 2008, 00:35

how can I just remove these because I dont have a image editing software

this is the site

http://mxstates.com/dirttoys/product_info.php?products_id=28

#7 germ

  • Community Member
  • 13,582 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 17 November 2008, 00:54

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.

"Headers already sent" - The definitive help

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

SSL Implementation Help

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

#8 mxstates

  • Community Member
  • 37 posts
  • Real Name:Brian Gibson

Posted 17 November 2008, 01:36

but that just takes the rounded part out not the grey part

#9 germ

  • Community Member
  • 13,582 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 17 November 2008, 02:02

  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 . '&nbsp;&nbsp;';
	  } else {
/*		$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); */
		$right_corner = $right_arrow . '&nbsp;&nbsp;';
	  }

	  $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.

"Headers already sent" - The definitive help

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

SSL Implementation Help

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

#10 mxstates

  • Community Member
  • 37 posts
  • Real Name:Brian Gibson

Posted 17 November 2008, 04:02

It worked thanks

#11 Petre

  • Community Member
  • 61 posts
  • Real Name:P.N.

Posted 03 February 2009, 17:00

View Postgerm, on Nov 17 2008, 02:02 AM, said:

  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 = '&nbsp;&nbsp;';
	  } else {
/*		$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); */
		$left_corner = '&nbsp;&nbsp;';
	  }
	  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 . '&nbsp;&nbsp;';
	  } else {
/*		$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); */
		$right_corner = $right_arrow . '&nbsp;&nbsp;';
	  }

	  $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?

#12 germ

  • Community Member
  • 13,582 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 03 February 2009, 17:44

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.

"Headers already sent" - The definitive help

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

SSL Implementation Help

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

#13 ivyfleur

  • Community Member
  • 88 posts
  • Real Name:Ivyfleur
  • Location:"Middle Earth"

Posted 17 March 2009, 08:58

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 &nbsp; 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.

Edited by ivyfleur, 17 March 2009, 09:02.


#14 germ

  • Community Member
  • 13,582 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 17 March 2009, 19:27

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.

"Headers already sent" - The definitive help

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

SSL Implementation Help

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

#15 ivyfleur

  • Community Member
  • 88 posts
  • Real Name:Ivyfleur
  • Location:"Middle Earth"

Posted 17 March 2009, 20:03

View Postgerm, on Mar 18 2009, 08:27 AM, said:

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.