Guest Posted January 15, 2004 Share Posted January 15, 2004 I wanted to take information.php and require it to show up in a html box that I made. The problem is I get a black outline around the information.php box and I cant get rid of it. I took information.php and striped out all of the html code and classes. It looks like this now. <?php $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CURRENT_AUCTIONS) . '">' . BOX_INFORMATION_CURRENT_AUCTIONS . '</a>' . '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); new infoBox($info_box_contents); ?> So I can not figure out what is still making the border. Kirk Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2004 Share Posted January 15, 2004 Ok I can change the css .infobox to #ffffff and the line goes away, but it goes away on all of my boxes and I just need it to go away on one. I duplicated the .infobox in css and called it infobox1 and changed the color but I can not figure out where it is being called other than classes/boxes.php. and I am trying to duplicate there as well but I can not seem to make it work. Any help would be great. kirk Link to comment Share on other sites More sharing options...
dyland Posted January 15, 2004 Share Posted January 15, 2004 Your problem is all infoboxes are using the same CSS class, you'll need to make them use different CSS classes. It appears (cos I haven't tested this) the code to change is in includes/classes/boxes.php. The lines: function infoBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="infoBoxContents"'; Need changing so something like: function infoBoxContents($contents, $class='infoBoxContents') { $this->table_cellpadding = '3'; $this->table_parameters = 'class=" $class"'; Then change your categories.php file to pass in the class you want. Dylan Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2004 Share Posted January 15, 2004 well the infoboxcontent is just for the background collor of the box, the border seems to be controled by infobox just above it. I have tried a few variations of what you posted and I can not get anything to work, However I am not the best coder in the world, Mabey I am just not doing it right. (obviously I am not doing something right or I would not have this problem LOL) Link to comment Share on other sites More sharing options...
dyland Posted January 15, 2004 Share Posted January 15, 2004 The table is drawn using the tablebox fuction at the top of the page. Try changing the code to: function infoBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="infoBoxContents" bordercolor="#CC3300" '; This may give you a red border on the table. If that works then you're in the right spot, just need to tweak until it works. Dylan Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2004 Share Posted January 15, 2004 Thanks for the help but I decided I did not have the time to do this, so I just did some sloppy cade and added the hyperlinks with html instead of requiring a infobox. works, just not built to spec. Link to comment Share on other sites More sharing options...
Guest Posted January 17, 2004 Share Posted January 17, 2004 Well I have come to the conclution that I am going to have to do this anyways. I tried what you said and I get no change whatsoever, borders are still black. All I can say so far is it looks to me like this is actually the code that creates the line around all infoboxes. class infoBox extends tableBox { function infoBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->infoBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="infoBox"'; $this->tableBox($info_box_contents, true); } And I think the code you are giving me is the code that just controls what is inside the box,,, background font and etc. function infoBoxContents($contents) { global $css_class; $this->table_cellpadding = '3'; $this->table_parameters = 'class="'.$css_class.'"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''), 'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''), 'params' => 'class="boxText"', 'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : ''))); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } I am sorry if I am asking for help and then second guessing you but it just looks this way to me. Thanks, Kirk Link to comment Share on other sites More sharing options...
markchiu Posted January 17, 2004 Share Posted January 17, 2004 i guess, but could be wrong......i think you need to add this in... $this->table_parameters = 'class="infoBoxContents" bordercolor="#CC3300" '; try and see...pls don't blame me if i cause a problem... OS-commerce is great, but with other magical contributions, that is just so "COOL"! Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2004 Share Posted January 18, 2004 I allready tried that in both places and it did not change anything. I think I have it working but it seems sloppy. I am going to post the code and if anyone has a better idea then feel free to post. I copied the entire infobox class and pasted it below the origional infobox class then just changed all instances of infobox to indexbox. created new class in stylesheet.css called indexbox changed info to corespond in my information.php. heres the code. /includes/classes/boxes.php class infoBox extends tableBox { function infoBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->infoBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="infoBox"'; $this->tableBox($info_box_contents, true); } function infoBoxContents($contents) { global $css_class; $this->table_cellpadding = '3'; $this->table_parameters = 'class="'.$css_class.'"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''), 'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''), 'params' => 'class="boxText"', 'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : ''))); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class indexBox extends tableBox { function indexBox($contents) { $index_box_contents = array(); $index_box_contents[] = array('text' => $this->indexBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="indexBox"'; $this->tableBox($index_box_contents, true); } function indexBoxContents($contents) { global $css_class; $this->table_cellpadding = '3'; $this->table_parameters = 'class="'.$css_class.'"'; $index_box_contents = array(); $index_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $index_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''), 'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''), 'params' => 'class="boxText"', 'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : ''))); } $index_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($index_box_contents); } } /includes/boxes/information.php was <?php global $css_class; $css_class = "informationcontents"; $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CURRENT_AUCTIONS) . '">' . BOX_INFORMATION_CURRENT_AUCTIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); new infoBox($info_box_contents); ?> Now <?php // global $css_class; //$css_class = "informationcontents"; //$info_box_contents = array(); //$info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); // new infoBoxHeading($info_box_contents, false, false); $index_box_contents = array(); $index_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CURRENT_AUCTIONS) . '">' . BOX_INFORMATION_CURRENT_AUCTIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>'); new indexBox($index_box_contents); ?> Hope this helps someone else Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2004 Share Posted January 18, 2004 Ok sorry, on the information.php, or whatever box you want to change, you dont have to change all infobox to indexbox. just the very last line of php where it is new infobox($info_box_contents) just change to new indexbox($info_box_contents) everything I have posted has not been fully tested,,, it just seems to work so far, Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.