Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Images under infoboxes


14steve14

Recommended Posts

Posted

I was wondering if it is posible to place the same images thast i am using for infobox headings, under the boxes. Does that sound silly.

 

I use images to create myinfo boc headings. What i want to do is to use the same images at the base of the info boxes tyo give then a more complete look.

 

If it is possible, is there someone who could point me in the right direction on how to do it.

 

I have been looking in /catalogue/includes/classes/boxes.php which is where i believe these images are from. I can only assume that its a case of copying this tect and placing it where it wants to go.

 

I have tried, but cant seem to get it to work properly.

 

Help me please.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted

I take it that there is no one here thats done this before then. It must be too hard.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted
I was wondering if it is posible to place the same images thast i am using for infobox headings, under the boxes.  Does that sound silly.

 

I use images to create myinfo boc headings.  What i want to do is to use the same images at the base of the info boxes tyo give then a more complete look.

 

If it is possible, is there someone who could point me in the right direction on how to do it.

 

I have been looking in /catalogue/includes/classes/boxes.php which is where i believe these images are from.  I can only assume that its a case of copying this tect and placing it where it wants to go. 

 

I have tried, but cant seem to get it to work properly.

 

Help me please.

 

 

just add a new class copied from infoboxheading in boxes.php class:

 

class infoBoxFooting extends tableBox {

function infoBoxFooting($contents, $left_corner = true, $right_corner = true, $right_arrow = false, $direct_output = true) {

$this->table_cellpadding = '0';

 

if ($left_corner == true) {

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

} else {

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

}

if ($right_arrow == true) {

$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT . ' ' . $contents[0]['text']) . '</a>';

 

} else {

$right_arrow = '';

}

if ($right_corner == true) {

$right_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_c.gif');

} else {

$right_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left_c.gif');

}

 

$info_box_contents = array();

$info_box_contents[] = array(array('params' => 'height="5" class="main" nowrap',

'text' => $left_corner),

array('params' => 'width="100%" height="5" class="infoBoxFooting" nowrap',

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

array('params' => 'class="infoBoxFooting" nowrap',

'text' => $right_arrow),

array('params' => 'height="5" class="main" nowrap',

'text' => $right_corner));

 

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

}

}

 

as all boxes are called like this :

 

call heading

call body

 

now you call it :

 

call heading

call body

call footing

 

voila.

Treasurer MFC

Posted

Never mind, someone posted before I could. =)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Posted

silly question.

 

I have created the class, but what i dont get is where to find the last part

 

call heading

call body

call footing

 

Where do i find this.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted
silly question. 

 

I have created the class, but what i dont get is where to find the last part

 

call heading

call body

call footing

 

Where do i find this.

 

 

when you look at any of the files in include/boxes you will see something like this:

 

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_REVIEWS);

 

new infoBoxHeading($info_box_contents, true, true, tep_href_link(FILENAME_REVIEWS));

 

 

which produces the box header.

 

 

then

 

 

 

$info_box_contents = array();

 

.....................

 

new infoBox($info_box_contents);

 

 

which produces the body of the box

 

 

 

So now you add something like:

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => ' ');

new infoBoxFooting($info_box_contents, true, true);

Treasurer MFC

Posted

Got the corner images sussed and fitted, but i an having trouble with the centre one.

 

Is there a way to use the same image ans the top centre one and get it to expand across the gap, or do i have to creatye a totally new graphic.

 

Thanks for the help so far.

REMEMBER BACKUP, BACKUP AND BACKUP

Archived

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

×
×
  • Create New...