chrometweaks.org

How can sites like iPage own domain names, and proceed to sell them?

Click Here To View All Answers...


My 1st question is: How can sites like iPage own domain names, and proceed to sell them? Many thanks for any comment. Second question of mine... I'm trying to change the CSS class on the search box in advanced_search.php. Through catalog/classes/boxes.php, it's somehow calling the 'InfoBox" class, and I need it to change to my "infoBox2" class that I've set up, but I can't figure out how or where to change this. (I *do* use the regular infoBox class on other boxes, so I don't want to modify the wrong setting.).

In advanced_search.php, the table appears to be called through this code:.

       <td>.

<?php.

 $info_box_contents = array();.

 $info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA);.

 new infoBoxHeading($info_box_contents, true, true);.

 $info_box_contents = array();.

 $info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'style="width: 75%"'));.

 $info_box_contents[] = array('align' => 'left', 'text' => tep_draw_checkbox_field('search_in_description', '1', true)' 'TEXT_SEARCH_IN_DESCRIPTION);.

 new infoBox($info_box_contents);.

?>.

       </td>.

I see numerous references to $info_box_contents in the catalog/classes/boxes.php file so how do I know which one it is that I need? Or can I create a new one with a new definition to capture the CSS style I need?.

TIA for any help!.

Terry..

Comments (62)

Hmm... I need to find out myself. I don't know what is the answer to your question. I'll do some poking around and get back to you if I find an answer. You should email the people at iPage as they probably could assist you..

Comment #1

U can inherit the original infoBox class and make your own infoBox with different behaviour/look and than use it in the advanced search box instead of the original one..

This post has been edited by.

Reffael.

: 26 February 2004, 16:18..

Comment #2

Fishy, when I entered the file location, I mistyped it. I am referring to /catalog/includes/classes/boxes.php..

To clarify:.

My left column contains a 'Search' infoBox. I have set it up to also search product descriptions. It also includes a link to "Advanced Search," which links to /catalog/advanced_search.php..

At the top of that file (advanced_search.php), there is a search field where a customer can enter advanced search criteria. That field is contained within an array (per my original message) that appears to construct a table through a call to /catalog/includes/classes/boxes.php..

Somehow, I need to be able to either:.

1. Change the array in advanced_search.php so I can specify the CSS class I want to use, or.

2. Create a new bit of code in /classes/boxes.php so I can specify the CSS class and table attributes I want to use, or.

3. Amend the existing code in /classes/boxes.php to specify the CSS class and table attributes I want to use..

In the latter case, however, if the array is used to construct more than one table, then I don't want to change it, as it will likely affect other elements of my iPage site design that DO rely on the existing CSS class call, in which case I need some help with either 1) or 2)..

Anyone? Pretty please?.

Many thanks,.

Terry.

This post has been edited by.

TerryK.

: 26 February 2004, 16:58..

Comment #3

TK -.

I would certainly go with rafeal's solution, your #2. in this manner, only the new box will use the new code and then you won't have to worry about code changes effecting any other calls/boxes/etc and where they all need to be changed..

Best...

Comment #4

So how do I create a new one in classes/boxes.php?.

I have no idea how to do that because I don't know WHICH of the various $info_box_contents definitions in boxes.php is being called from advanced_search.php. They all look the same to me..

TIA,.

Terry..

Comment #5

Advanced_search.php calls:.

New infoBoxHeading($info_box_contents, true, true); & new infoBox ($info_box_contents);.

 new infoBox($info_box_contents);  .

 .

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

     $this->table_cellpadding = '3';.

     $this->table_parameters = 'class="infoBoxContents"';.

     $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 infoBoxHeading extends tableBox {.

   function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {.

     $this->table_cellpadding = '0';.

     if ($left_corner == true) {.

       $left_corner = tep_image(DIR_WS_IMAGES'infobox/corner_left.gif');.

     } else {.

       $left_corner = tep_image(DIR_WS_IMAGES'infobox/corner_right_left.gif');.

     }.

     if ($right_arrow == true) {.

       $right_arrow = '<a href="'$right_arrow'">'tep_image(DIR_WS_IMAGES'infobox/arrow_right.gif', ICON_ARROW_RIGHT)'</a>';.

     } else {.

       $right_arrow = '';.

     }.

     if ($right_corner == true) {.

       $right_corner = $right_arrowtep_image(DIR_WS_IMAGES'infobox/corner_right.gif');.

     } else {.

       $right_corner = $right_arrowtep_draw_separator('pixel_trans.gif', '11', '14');.

     }.

     $info_box_contents = array();.

     $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"'),.

                                  array('params' => 'width="100%" height="14" class="infoBoxHeading"',.

                                        'text' => $contents[0]['text']),.

                                  array('params' => 'height="14" class="infoBoxHeading" nowrap'));.

     $this->tableBox($info_box_contents, true);.

   }.

 }.

Copy these classes and:.

1. rename the classes name and the functions name( ie: infoBoxSearchHeading & infoBoxSearch)..

2. Change the code on advanced_search.php to match the names you changed the classes to..

3. Change the css class name to the one you want..

( ie: $this->table_parameters = 'class="infoBoxSearchContents" ).

I haven't gone thru the exercise, so there may be other steps needed to rweek the code. but overall this is what I immediately see. I hope this helps..

Good luck...

Comment #6

Got it! Thanks so much for your help!.

Terry..

Comment #7

I'm trying to change the CSS class on the search box in advanced_search.php. Through catalog/classes/boxes.php, it's somehow calling the 'InfoBox" class, and I need it to change to my "infoBox2" class that I've set up, but I can't figure out how or where to change this. (I *do* use the regular infoBox class on other boxes, so I don't want to modify the wrong setting.).

In advanced_search.php, the table appears to be called through this code:.

       <td>.

<?php.

 $info_box_contents = array();.

 $info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA);.

 new infoBoxHeading($info_box_contents, true, true);.

 $info_box_contents = array();.

 $info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'style="width: 75%"'));.

 $info_box_contents[] = array('align' => 'left', 'text' => tep_draw_checkbox_field('search_in_description', '1', true)' 'TEXT_SEARCH_IN_DESCRIPTION);.

 new infoBox($info_box_contents);.

?>.

       </td>.

I see numerous references to $info_box_contents in the catalog/classes/boxes.php file so how do I know which one it is that I need? Or can I create a new one with a new definition to capture the CSS style I need?.

TIA for any help!.

Terry..

Comment #8

The php code for the infoBox classes are located in catalog/includes/classes/boxes.php...

Comment #9


This question was taken from a support group/message board and re-posted here so others can learn from it.