osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

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


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 05-18-2004, 11:58 PM
Lurker
 
Join Date: May 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
techan
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 05-19-2004, 08:57 AM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
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!
__________________
Clifton Murphy CEO/CTO
Hyperactive Inc.
osCommerce hosting, OSCMAX hosting, osCommerce modification, and OSCMAX modification specialists!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 05-19-2004, 01:16 PM
Lurker
 
Join Date: May 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
techan
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 05-19-2004, 02:36 PM
Lurker
 
Join Date: May 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
techan
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 04:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax