segmeant Posted March 13, 2007 Posted March 13, 2007 Hello. I've been searching for a few days now. I now know that what I want to do is change the infoBoxHeading class contructor and create a custom one for just the top boxes. I have a back ground image that has a fade on the top that makes the white background of the round corners stick out like a sore thumb. Link to visuals below. I know that I need to alter the top boxes so that they bring in an image corner_left.gif (corner_left_blue.gif) that is different than the default corner_left.gif. I will essentially be creating a new class that the categories and shopping cart box will use. My lack of experience here prevents me from knowing how to go about this. I know that I need to alter 4 files, 2 boxes, and the right and left column.php files at the very least for this to work. A smaller detail problem that may be worked out in my css is the alignment issues of the boxes creating a small line at the top breaking the look of the boxes. May be that the images are not aligning to the top in their table datas. ______________________________________ LINK: http://sealymatt.com/catalog/index.php ----------------------------------------------------- Any assistance or link pointing me in the right direction will be appreciated.
bill110 Posted March 13, 2007 Posted March 13, 2007 I believe the small line is due to the font being so big that it extends the heading up higher than the corner images so that the background color of the boxes shows through. Just like the shopping cart box does just not to that extreme. For the new class just copy this one class infoBoxHeading extends tableBox { (the entire class) and rename it, change the image names for the corners in the code to match your new ones for those boxes, then in catelog/includes/boxes/box-to_change be sure to change the call to infoboxHeading to the new one you created. Hope this helps and you can understand what I am trying to say. My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
segmeant Posted March 13, 2007 Author Posted March 13, 2007 Wow, Bill you are too awesome! Thank you so much for your assistance! You were completely correct about the line issue and my images being just 4 pixels too small. I did understand what you were saying because I read so many other posts trying to hunt down this solution that I started to see a path others were going down, but was unclear to the specifics that you brought to light. ---------------------- I'd like to provide what I did with your help here so that others who want to adjust just a few specific boxes and their corners will have the means to do so. HOW TO CHANGE A FEW BOXES SO THAT THEIR CORNERS ARE DIFFERENT ________________ I copied the entire class as specified by Bill: (in the file: catalog/includes/classes/boxes.php) class infoBoxHeading extends tableBox { at the end of that one, and before the next class. I pasted it all and and changed the name to: class infoBoxHeading2 extends tableBox { within this new class I changed all of the images to correspond with my changes. there are 4 to change minus the pixel_trans.gif Example: if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left2.gif'); I also changed the few lines that had class= to match infoBoxHeading2 thats it for the boxes.php file. upload to the right directory. please back up first! ________________ Then on to the specially changed boxes (in the file: catalog/includes/boxes/categories.php) - categories is the one i changed. change the one that you need different. I then changed the line that said: new infoBoxHeading($info_box_contents, true, true); to reflect my change = new infoBoxHeading2($info_box_contents, true, true); saved that file. put both files in their correct directory and uploaded my new images into (catalog/images/infobox/) ________________ That was it. Fairly easy once someone points it out to you. I hope that this helps someone else in the future, and thanks again Bill.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.