Page 1 of 1

Help with my Code

Posted: Wed Oct 12, 2005 9:14 pm
by Mamoon
Hello
I want help with this code please

Code: Select all

$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);
Please help me,
Regards

Posted: Wed Oct 12, 2005 9:26 pm
by feyd
soooooo what's wrong with this code?

thanks in advance

Posted: Wed Oct 12, 2005 9:29 pm
by Mamoon
I want to remove the images from this code, without effecting it...

Posted: Wed Oct 12, 2005 9:32 pm
by feyd
without affecting the array? Then you wouldn't do anything to it. :?

Posted: Wed Oct 12, 2005 9:33 pm
by Mamoon
okay if i post you the full code, this will help?
please this is must for me...
:( :cry:

Posted: Wed Oct 12, 2005 9:34 pm
by feyd
your need makes no sense, so I'm unsure whether seeing more code would affect that issue..

Posted: Wed Oct 12, 2005 9:37 pm
by Mamoon
feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Code: Select all

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);
    }
  }
can you double check it for me, I want to remove corner_right.gif , corner_right_left.gif , and arrow_right.gif
please try your best...
thanks alot


feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]