Results 1 to 4 of 4

newbie. problem with replacing a text with an image

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

      
  1. #1
    Lurker
    Join Date
    May 2004
    Posts
    3
    Rep Power
    0


    Default newbie. problem with replacing a text with an image

    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', '');
    includes/class/boxes.php
    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); } }
    whats_new.php
    Code:
    new infoBoxHeadingwhatsnew($info_box_contents, true, false, tep_href_link(FILENAME_PRODUCTS_NEW));
    catalog/stylesheet.css
    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.

  2. #2
    Active Member red_fraggle's Avatar
    Join Date
    Feb 2004
    Location
    wilmington, NC
    Posts
    343
    Rep Power
    8


    Default

    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!

  3. #3
    Lurker
    Join Date
    May 2004
    Posts
    3
    Rep Power
    0


    Default

    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. #4
    Lurker
    Join Date
    May 2004
    Posts
    3
    Rep Power
    0


    Default

    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); } }
    Setup a new class in the catalog/stylesheet.css
    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 //-->
    To:
    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?

Similar Threads

  1. Link colors problem - newbie - pls help
    By pram0310 in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 09-10-2004, 10:41 AM
  2. Replacing text in infoBoxHeading with images
    By jbanda in forum osCommerce 2.2 Modification Help
    Replies: 4
    Last Post: 09-02-2004, 08:20 AM
  3. Newbie with Configuration problem
    By onceupon in forum osCommerce 2.2 Installation Help
    Replies: 8
    Last Post: 04-27-2004, 11:00 PM
  4. Use a gif image instead of text in boxes
    By rocket_rob in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 02-03-2004, 04:56 AM
  5. strange newbie problem realy need help stumped
    By Altaguy in forum osCommerce 2.2 Installation Help
    Replies: 12
    Last Post: 01-13-2003, 10:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •