Guest Posted February 24, 2006 Posted February 24, 2006 hello, we made a new module work but don't understand how to get it into the right style for an infobox. the infobox style doesn't draw around this content. i created the file /includes/modules/filename.php and i call it as an include on the index page just like specials or new products. the file looks like this: <?php <!-- Mike's drill down BOF //--> <tr> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_SELECT_MANUFACTURER, strftime('%B'))); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SELECT_MANUFACTURER)); ?> <form name="manufacturer_select" action="show_models.php" method="POST" target="_self"> <select name="manf"> <?php { $manf_list = array(); $result = tep_db_query("SELECT * FROM tbl_manufacturer"); $num_rows = mysql_num_rows($result); for($i = 1; $i <= $num_rows ; $i++) { $query_data = mysql_fetch_row($result); $manufacturer = $query_data[0]; if(strcmp($manufacturer, '') != 0) { if(array_search("$manufacturer", $manf_list) === FALSE) { $manf_list[] = "$manufacturer"; } } } $manf_listed = count($manf_list); if($manf_listed > 0) { sort($manf_list); for($j = 0; $j < $manf_listed; $j++) { $manufacturer = $manf_list[$j]; $string = sprintf("<option value=\"%s\">%s</option>\n", $manufacturer, $manufacturer); echo $string; } } mysql_close($db); } echo ("</select>\n<input type=\"submit\" name=\"submit\" value=\"GO\" />\n</form>\n"); ?> <!-- Mike's drilldown_eof //--> it has something to do with how it's supposed to be declared as info box contents or something, i'm just guessing. your help is greatly appreciated. i'm going to beat my head on the doorjamb for a while.
Guest Posted February 27, 2006 Posted February 27, 2006 well, we figured it out. the problem is that i'm not a programmer so i didn't know how to form the array that's called by the thingie. mikeSpheric sorted it all out. it's not modularized yet but you can see the result at http://thINK4inc.com. we don't think this would make a good contribution because this dropdown search funtionality depends on lookup tables added to OSC that come from an in-house data production process. OSC fields don't populate this data, it's not a cat-subcat thing. many thanks to Jeff Limb and his cool drop-down shadow thing which, while not valid, still looks great across browsers.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.