Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Infobox problems....please help!


Guest

Recommended Posts

Hi all,

 

Basically i have replaced the standard infobox headings with images for headings. I found that i need to removes the left and right corner images from the standard headings in /includes/classes/boxes.php (i changed the images to the transparent images included.)

 

Basically the 'column left' has come out fine

 

but 'column right's info boxes still have the original images on the right hand side of my boxes. the left hand side of the boxes are fine however. I am going to paste the code in the /classes/boxes file for someone to show me where i have gone wrong.

 

Please help i was soooo close!

 

Heres the code: (sorry if its long)

 

 

 

class infoBox extends tableBox {

function infoBox($contents) {

$info_box_contents = array();

$info_box_contents[] = array('text' => $this->infoBoxContents($contents));

$this->table_cellpadding = '1';

$this->table_parameters = 'class="infoBox"';

$this->tableBox($info_box_contents, true);

}

 

function infoBoxContents($contents) {

$this->table_cellpadding = '3';

$this->table_parameters = 'class="infoBoxContents"';

$info_box_contents = array();

$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

for ($i=0, $n=sizeof($contents); $i<$n; $i++) {

$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),

'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),

'params' => 'class="boxText"',

'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));

}

$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

return $this->tableBox($info_box_contents);

}

}

 

class infoBoxHeading extends tableBox {

function infoBoxHeading($contents, $left_corner = false, $right_corner = false, $right_arrow = false) {

$this->table_cellpadding = '0';

 

if ($left_corner == false) {

$left_corner = tep_image(DIR_WS_IMAGES . 'pixel_trans.gif');

} else {

$left_corner = tep_image(DIR_WS_IMAGES . 'pixel_trans.gif');

}

if ($right_arrow == false) {

$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', ICON_ARROW_RIGHT) . '</a>';

} else {

$right_arrow = '';

}

if ($right_corner == false) {

$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif');

} else {

$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');

}

 

$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);

}

}

 

class contentBox extends tableBox {

function contentBox($contents) {

$info_box_contents = array();

$info_box_contents[] = array('text' => $this->contentBoxContents($contents));

$this->table_cellpadding = '1';

$this->table_parameters = 'class="infoBox"';

$this->tableBox($info_box_contents, true);

}

 

function contentBoxContents($contents) {

$this->table_cellpadding = '4';

$this->table_parameters = 'class="infoBoxContents"';

return $this->tableBox($contents);

}

}

 

class contentBoxHeading extends tableBox {

function contentBoxHeading($contents) {

$this->table_width = '100%';

$this->table_cellpadding = '0';

 

$info_box_contents = array();

$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',

'text' => tep_image(DIR_WS_IMAGES . 'pixel_trans.gif')),

array('params' => 'height="14" class="infoBoxHeading" width="100%"',

'text' => $contents[0]['text']),

array('params' => 'height="14" class="infoBoxHeading"',

'text' => tep_image(DIR_WS_IMAGES . 'pixel_trans.gif')));

 

$this->tableBox($info_box_contents, true);

}

}

 

 

 

Cheers guys hopefully someone knows what ive done wrong

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...