This is a discussion on newbie. problem with replacing a text with an image within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, I just replaced what's new infobox with an image file. But the problem is the image covered the link ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I just replaced what's new infobox with an image file. But the problem is the image covered the link icon which is supposed to take me to the list of what's new products. This is what I did. english.php Code: define('BOX_HEADING_WHATS_NEW', '');
Code: class infoBoxHeadingwhatsnew extends tableBox {
function infoBoxHeadingwhatsnew ($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0'; if ($left_corner == false) { $left_corner = tep_image(DIR_WS_IMAGES . ''); } else {
$left_corner = tep_draw_separator(''); } $info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="23" class="infoBoxHeadingwhatsnew"', 'text' =>
$left_corner), array('params' => 'width="100%" height="23" class="infoBoxHeadingwhatsnew"', 'text' =>
$contents[0]['text']), array('params' => 'height="23" class="infoBoxHeadingwhatsnew" nowrap', 'text' =>
$right_corner)); $this->tableBox($info_box_contents, true); } }
Code: new infoBoxHeadingwhatsnew($info_box_contents, true, false, tep_href_link(FILENAME_PRODUCTS_NEW)); Code: TD.infoBoxHeadingwhatsnew {
background: #F4B0E0;
background-image: url('images/whatsnew.gif');
background-repeat: no-repeat;
color: #F4B0E0;
}
The image I used on what's new infobox, my little link icon disappered. How can I make it appered? Thanks for any help. |
| Sponsored Links | ||
| ||
|
#2
| ||||
| ||||
| All you had to do is change the stylesheet.css like so: TD.infoBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; <!-- this is the change i made --!> background-image: url(images/nav_bar_bg.gif); color: #ffffff; Undo all the other stuff you did and get back to basics!
__________________ Clifton Murphy CEO/CTO Hyperactive Inc. osCommerce hosting, OSCMAX hosting, osCommerce modification, and OSCMAX modification specialists! |
|
#3
| |||
| |||
| thanks red fraggle. But the problem is I'm going to use all different images on each infoBox. Then, the way you suggested does not make sense. Can you suggest another way? |
|
#4
| |||
| |||
| I just found how to fix this problem. But doesn't work... This is from wiki doc. This works on all the boxes except the includes/modules/new_products.php pages. To change the includes/modules/new_products.php page: Make a new class in includes/classes/boxes.php Code: class newProductBox extends tableBox {
function newProductBox($contents) {
$this->table_data_parameters = 'class="newProductBox"';
$this->tableBox($contents, true); } }
Code: .newProductBox {
background-image: url(images/yourimage.gif);
background-repeat: no-repeat; height: 30px; }
Then, in includes/modules/new_products.php about line 42 put the name of the new class you just made: Change: Code: new infoBox($info_box_contents); ?> < !-- new_products_eof //--> Code: new newProductBox($info_box_contents); ?> < !-- new_products_eof //--> The problem is nothing is changed from the original setup. Image is not loaded on the top of the new product info box. I made sure file name and everything I can. What's the problem? |
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Link colors problem - newbie - pls help | pram0310 | osCommerce 2.2 Modification Help | 1 | 09-10-2004 09:41 AM |
| Replacing text in infoBoxHeading with images | jbanda | osCommerce 2.2 Modification Help | 4 | 09-02-2004 07:20 AM |
| Newbie with Configuration problem | onceupon | osCommerce 2.2 Installation Help | 8 | 04-27-2004 10:00 PM |
| Use a gif image instead of text in boxes | rocket_rob | osCommerce 2.2 Modification Help | 1 | 02-03-2004 03:56 AM |
| strange newbie problem realy need help stumped | Altaguy | osCommerce 2.2 Installation Help | 12 | 01-13-2003 09:35 PM |