Did the contribution on infobox cornersm, need help
#1
Posted 16 November 2008, 21:54
#2
Posted 16 November 2008, 23:57
#3
Posted 17 November 2008, 00:15
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...
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#5
Posted 17 November 2008, 00:26
Quote
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.
"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
Posted 17 November 2008, 00:35
this is the site
http://mxstates.com/dirttoys/product_info.php?products_id=28
#7
Posted 17 November 2008, 00:54
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?
"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
Posted 17 November 2008, 01:36
#9
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 . ' ';
} 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.phpBackup 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...
"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
Posted 17 November 2008, 04:02
#11
Posted 03 February 2009, 17:00
germ, 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 = ' ';
} 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.phpBackup 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...
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
Posted 03 February 2009, 17:44
"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
Posted 17 March 2009, 08:58
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.
Edited by ivyfleur, 17 March 2009, 09:02.
#14
Posted 17 March 2009, 19:27
Or, if you can find it, somewhere in there in a "Reset Cache".
That would work just as good in this situation.
"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
Posted 17 March 2009, 20:03
germ, on Mar 18 2009, 08:27 AM, said:
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.














