SXM Posted November 14, 2009 Share Posted November 14, 2009 Hello! Do you know how I can have the searh box at the same level of the word "SEARCH"? I want to put it on top of the website in one line. Thanks! Link to comment Share on other sites More sharing options...
Guest Posted November 15, 2009 Share Posted November 15, 2009 Jesse, This is the code for the search box: <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SEARCH); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'); new infoBox($info_box_contents); ?> if you remove the <br> in the code, it will put everything on the same line. Chris Link to comment Share on other sites More sharing options...
SXM Posted December 22, 2009 Author Share Posted December 22, 2009 Hello Chris, I tried what you said and it didn't work :( Thank you for trying to help. if someone knows the answer please help me!!! Thank you! Jesse M Link to comment Share on other sites More sharing options...
jhande Posted December 22, 2009 Share Posted December 22, 2009 <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SEARCH); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'); new infoBox($info_box_contents); ?> Removing the '<br>' . and making sure my cell width was wide enough worked for me. - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
SXM Posted December 27, 2009 Author Share Posted December 27, 2009 Hi, Thanks but I don't know why it doesn't work with my website, You can it here: http://angelseductions.com/catalog/aboutus.php The search box is the center and left side of the website. Please if you have any idea let me know. Thank you!! Link to comment Share on other sites More sharing options...
a.forever Posted December 27, 2009 Share Posted December 27, 2009 Hi, Thanks but I don't know why it doesn't work with my website, You can it here: http://angelseductions.com/catalog/aboutus.php The search box is the center and left side of the website. Please if you have any idea let me know. Thank you!! First, post your code for catalog/includes/boxes/search.php. I can already tell that it's slightly modified. If your code for aboutus.php is a direct call for the search box, then modifying search.php will also alter the left column because it also calls for the search box. This is the HTML rendering of your search box: <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt="" width="1" height="1"></td> <td width="100%" height="14" class="infoBoxHeading">SEARCH:</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> <tr> <td align="center" class="boxText"><form name="quick_find" action="http://angelseductions.com/catalog/advanced_search_result.php" method="get"><input type="text" name="keywords" size="10" maxlength="30" style="width: 95px"> <input type="image" src="includes/languages/english/images/buttons/button_quick_find.gif" border="0" alt="SEARCH:" title=" SEARCH: "><a href="http://angelseductions.com/catalog/advanced_search.php"></a></form></td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> </table> </td> </tr> </table> As you can see, they are seperated under rows and cells. You'll need to have them in the same row and two different cells if you want this to work. My guess is that under search.php, the $info_box_contents = array(); causes this. I'm not in the mood to test this out at the moment, but I'll see what modifying this does and if it will cause the text and the input field to be on the same row. Know that modifying this will likely also alter your left column. Link to comment Share on other sites More sharing options...
SXM Posted December 27, 2009 Author Share Posted December 27, 2009 Hello Kevin! The Search.php is: ?> <!-- search //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SEARCH); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '' . BOX_SEARCH_TEXT . '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- search_eof //--> You said that I have to change the size of my left column but I don't want to change that because that changes completely the design of my website! :( do you think there is another way? Thank you!!! :D Link to comment Share on other sites More sharing options...
a.forever Posted December 28, 2009 Share Posted December 28, 2009 You said that I have to change the size of my left column but I don't want to change that because that changes completely the design of my website! :( do you think there is another way? Thank you!!! :D No, I said that modifying search.php might make your left column look weird. Think about it; both search text and search input field all going to be on the same row, so it might look awkward when your left column is of a fixed size. Anyways, there's a really easy workaround for that. In catalog/includes/boxes/ duplicate your search.php page. Rename it search2.php and then on whatever page you want the search box to show, use the following code: require(DIR_WS_BOXES . 'search2.php'); Now you'll have 2 search boxes which work exactly the same, but can look differently. I was playing around with the coding today and found something that might work for you. The code for your search2.php (and you can name it to whatever you want) should look like: <?php /* $Id: search2.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- search //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'), 'align' => 'center', 'text' => BOX_HEADING_SEARCH . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '' . BOX_SEARCH_TEXT . '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- search_eof //--> I just want to point out that I think catalog/includes/boxes/search.php is not the same search box as the one you're using here: http://angelseductions.com/catalog/aboutus.php. Why? The HTML for About Us shows me this: <!-- start searchbox //-->. And your code for search.php shows me this: <!-- search //-->. So what is your aboutus.php code and/or what is the code for the new search box you're using? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.