Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

boxes problem


cathy

Recommended Posts

Posted

I was trying to edit the corners on my boxes and ended up making a big mess of it.

I had made a copy the original contents of the boxes.php file and saved it in notepad before I started fiddling with everything.

When I went to paste over my changes using what I had saved as a backup, my whole oscommerce store went very wrong...now I have "n's" all down the left side and the boxes aren't boxes anymore.

I am very sad as I had been working very hard on all the changes, and then this happened. http://www.art-originals.com

 

Below is the screwed up code....

 

<?php

/*

$Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class tableBox {

var $table_border = '0';

var $table_width = '100%';

var $table_cellspacing = '0';

var $table_cellpadding = '2';

var $table_parameters = '';

var $table_row_parameters = '';

var $table_data_parameters = '';

 

// class constructor

function tableBox($contents, $direct_output = false) {

$tableBox_string = '<table border="' . tep_output_string

($this->table_border) . '"

 

width="' . tep_output_string($this->table_width) . '" cellspacing="' .

 

tep_output_string($this->table_cellspacing) . '" cellpadding="' .

 

tep_output_string($this->table_cellpadding) . '"';

if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' .

 

$this->table_parameters;

$tableBox_string .= '>' . "n";

 

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

if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form']))

 

$tableBox_string .= $contents[$i]['form'] . "n";

$tableBox_string .= ' <tr';

if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' .

 

$this->table_row_parameters;

if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params']))

 

$tableBox_string .= ' ' . $contents[$i]['params'];

$tableBox_string .= '>' . "n";

 

if (isset($contents[$i][0]) && is_array($contents[$i][0])) {

for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {

if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {

$tableBox_string .= ' <td';

if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align']))

 

$tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';

if (isset($contents[$i][$x]['params']) &&

 

tep_not_null($contents[$i][$x]['params'])) {

$tableBox_string .= ' ' . $contents[$i][$x]['params'];

} elseif (tep_not_null($this->table_data_parameters)) {

$tableBox_string .= ' ' . $this->table_data_parameters;

}

$tableBox_string .= '>';

if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form']))

 

$tableBox_string .= $contents[$i][$x]['form'];

$tableBox_string .= $contents[$i][$x]['text'];

if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form']))

 

$tableBox_string .= '</form>';

$tableBox_string .= '</td>' . "n";

}

}

} else {

$tableBox_string .= ' <td';

if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align']))

 

$tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';

if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {

$tableBox_string .= ' ' . $contents[$i]['params'];

} elseif (tep_not_null($this->table_data_parameters)) {

$tableBox_string .= ' ' . $this->table_data_parameters;

}

$tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "n";

}

 

$tableBox_string .= ' </tr>' . "n";

if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form']))

 

$tableBox_string .= '</form>' . "n";

}

 

$tableBox_string .= '</table>' . "n";

 

if ($direct_output == true) echo $tableBox_string;

 

return $tableBox_string;

}

}

 

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 = 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');

} else {

$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');

}

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

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

 

'infobox/corner_left.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 .

 

'infobox/corner_right_left.gif')));

 

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

}

}

 

class errorBox extends tableBox {

function errorBox($contents) {

$this->table_data_parameters = 'class="errorBox"';

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

}

}

 

class productListingBox extends tableBox {

function productListingBox($contents) {

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

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

}

}

?>

Posted

You must have used the filemanger to make changes...this is a typical symptom. It strips the slashes and just leaves an "n" which will be output to the screen.

 

In the future use an FTP client to upload files.

 

I would just upload a fresh copy of the file in question. I keep a full copy of the MS2 code tucked away that is never modified. If I run into problems I copy the file from the fresh tucked away source and upload.

 

Here is a copy of my semi-fresh boxes class. Note: this contains a quick mod to make the entire infobox header clickable as a link and not just the little, tiny arrow. Copy the code and save (NOT using the filemanager).

 

Bobby

 

<?php
/*
 $Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 class tableBox {
   var $table_border = '0';
   var $table_width = '100%';
   var $table_cellspacing = '0';
   var $table_cellpadding = '2';
   var $table_parameters = '';
   var $table_row_parameters = '';
   var $table_data_parameters = '';

// class constructor
   function tableBox($contents, $direct_output = false) {
     $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
     if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
     $tableBox_string .= '>' . "\n";

     for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
       if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
       $tableBox_string .= '  <tr';
       if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
       if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
       $tableBox_string .= '>' . "\n";

       if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
         for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
           if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
             $tableBox_string .= '    <td';
             if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
             if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
               $tableBox_string .= ' ' . $contents[$i][$x]['params'];
             } elseif (tep_not_null($this->table_data_parameters)) {
               $tableBox_string .= ' ' . $this->table_data_parameters;
             }
             $tableBox_string .= '>';
             if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
             $tableBox_string .= $contents[$i][$x]['text'];
             if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
             $tableBox_string .= '</td>' . "\n";
           }
         }
       } else {
         $tableBox_string .= '    <td';
         if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
         if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
           $tableBox_string .= ' ' . $contents[$i]['params'];
         } elseif (tep_not_null($this->table_data_parameters)) {
           $tableBox_string .= ' ' . $this->table_data_parameters;
         }
         $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
       }

       $tableBox_string .= '  </tr>' . "\n";
       if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
     }

     $tableBox_string .= '</table>' . "\n";

     if ($direct_output == true) echo $tableBox_string;

     return $tableBox_string;
   }
 }

 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 = true, $right_corner = true, $right_arrow = false) {
     $this->table_cellpadding = '0';
  if ($right_arrow == true) $this->table_row_parameters = 'onclick="window.location=\''.$right_arrow.'\'"' . ' onmouseover="this.style.cursor=\'pointer\'"';

     if ($left_corner == true) {
       $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif');
     } else {
       $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
     }
     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');
     } 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 . 'infobox/corner_left.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 . 'infobox/corner_right_left.gif')));

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

 class errorBox extends tableBox {
   function errorBox($contents) {
     $this->table_data_parameters = 'class="errorBox"';
     $this->tableBox($contents, true);
   }
 }

 class productListingBox extends tableBox {
   function productListingBox($contents) {
     $this->table_parameters = 'class="productListing"';
     $this->tableBox($contents, true);
   }
 }
?>

Posted
You must have used the filemanger to make changes...this is a typical symptom.  It strips the slashes and just leaves an "n" which will be output to the screen.

 

In the future use an FTP client to upload files.

 

I would just upload a fresh copy of the file in question.  I keep a full copy of the MS2 code tucked away that is never modified.  If I run into problems I copy the file from the fresh tucked away source and upload.

 

Here is a copy of my semi-fresh boxes class.  Note: this contains a quick mod to make the entire infobox header clickable as a link and not just the little, tiny arrow.  Copy the code and save (NOT using the filemanager). 

 

Bobby

 

<?php
/*
?$Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $

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

?Copyright (c) 2003 osCommerce

?Released under the GNU General Public License
*/

?class tableBox {
? ?var $table_border = '0';
? ?var $table_width = '100%';
? ?var $table_cellspacing = '0';
? ?var $table_cellpadding = '2';
? ?var $table_parameters = '';
? ?var $table_row_parameters = '';
? ?var $table_data_parameters = '';

// class constructor
? ?function tableBox($contents, $direct_output = false) {
? ? ?$tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
? ? ?if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
? ? ?$tableBox_string .= '>' . "\n";

? ? ?for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
? ? ? ?if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
? ? ? ?$tableBox_string .= ' ?<tr';
? ? ? ?if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
? ? ? ?if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
? ? ? ?$tableBox_string .= '>' . "\n";

? ? ? ?if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
? ? ? ? ?for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
? ? ? ? ? ?if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
? ? ? ? ? ? ?$tableBox_string .= ' ? ?<td';
? ? ? ? ? ? ?if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
? ? ? ? ? ? ?if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
? ? ? ? ? ? ? ?$tableBox_string .= ' ' . $contents[$i][$x]['params'];
? ? ? ? ? ? ?} elseif (tep_not_null($this->table_data_parameters)) {
? ? ? ? ? ? ? ?$tableBox_string .= ' ' . $this->table_data_parameters;
? ? ? ? ? ? ?}
? ? ? ? ? ? ?$tableBox_string .= '>';
? ? ? ? ? ? ?if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
? ? ? ? ? ? ?$tableBox_string .= $contents[$i][$x]['text'];
? ? ? ? ? ? ?if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
? ? ? ? ? ? ?$tableBox_string .= '</td>' . "\n";
? ? ? ? ? ?}
? ? ? ? ?}
? ? ? ?} else {
? ? ? ? ?$tableBox_string .= ' ? ?<td';
? ? ? ? ?if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
? ? ? ? ?if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
? ? ? ? ? ?$tableBox_string .= ' ' . $contents[$i]['params'];
? ? ? ? ?} elseif (tep_not_null($this->table_data_parameters)) {
? ? ? ? ? ?$tableBox_string .= ' ' . $this->table_data_parameters;
? ? ? ? ?}
? ? ? ? ?$tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
? ? ? ?}

? ? ? ?$tableBox_string .= ' ?</tr>' . "\n";
? ? ? ?if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
? ? ?}

? ? ?$tableBox_string .= '</table>' . "\n";

? ? ?if ($direct_output == true) echo $tableBox_string;

? ? ?return $tableBox_string;
? ?}
?}

?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 = true, $right_corner = true, $right_arrow = false) {
? ? ?$this->table_cellpadding = '0';
? if ($right_arrow == true) $this->table_row_parameters = 'onclick="window.location=\''.$right_arrow.'\'"' . ' onmouseover="this.style.cursor=\'pointer\'"';

? ? ?if ($left_corner == true) {
? ? ? ?$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif');
? ? ?} else {
? ? ? ?$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
? ? ?}
? ? ?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');
? ? ?} 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 . 'infobox/corner_left.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 . 'infobox/corner_right_left.gif')));

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

?class errorBox extends tableBox {
? ?function errorBox($contents) {
? ? ?$this->table_data_parameters = 'class="errorBox"';
? ? ?$this->tableBox($contents, true);
? ?}
?}

?class productListingBox extends tableBox {
? ?function productListingBox($contents) {
? ? ?$this->table_parameters = 'class="productListing"';
? ? ?$this->tableBox($contents, true);
? ?}
?}
?>

 

 

 

Oh my god Bobby, I could just kiss you!!!

You are a life saver!!!!!!!!!!! You saved all my work!

 

Thank you..thank you...thank you!!!

 

Cathy

Posted

No problem...and enjoy the small code mod to make the header row clickable :)

 

Bobby

Archived

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

×
×
  • Create New...