timisnumber9 Posted December 3, 2004 Posted December 3, 2004 Does any body know how to combine the search box into the header? I have seen a few sites with this feature such as this: example site That has the search box incoporated into the header and not in a separate infoBox in the left or right column. Has anbody here done this? What code did they use? Cheers, Tim
Guest Posted December 3, 2004 Posted December 3, 2004 Does any body know how to combine the search box into the header? I have seen a few sites with this feature such as this: example site That has the search box incoporated into the header and not in a separate infoBox in the left or right column. Has anbody here done this? What code did they use? Cheers, Tim <{POST_SNAPBACK}> Here's a quick way :) <!-- Search Form Begin --> <form name="quick_find" action="advanced_search_result.php" method="get"><input type="text" name="keywords" size="15" height="10" maxlength="72" value="Baby Doll" onFocus="this.value=''"> <input type="submit" value="Search" border="0" align="absmiddle" alt="Quick Find" border="0"> </form> <!-- Search Form End -->
timisnumber9 Posted December 3, 2004 Author Posted December 3, 2004 Cheers, i will give it a go and let you know how it goes. Cheers, Tim :thumbsup:
boxtel Posted December 3, 2004 Posted December 3, 2004 Cheers, i will give it a go and let you know how it goes. Cheers, Tim :thumbsup: <{POST_SNAPBACK}> Here is the code: <?php if ( (!strstr($_SERVER['PHP_SELF'],'checkout.php')) and (!strstr($_SERVER['PHP_SELF'],'create_account.php')) and (!strstr($_SERVER['PHP_SELF'],'advanced_search.php'))) {?> <?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'GET') ?> <table bgcolor="#D8E8F5" border="0" width="100%" cellspacing="0" cellpadding="0" align="center"> <tr> <td height="5"></td> </tr> <tr > <td width="30%"></td> <td nowrap valign="middle" ><font size="2"><?php echo BOX_HEADING_SEARCH . ': ';?></font></td> <td valign="middle" ><?php echo tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH) . 'px"') ?></td> <td valign="middle" > </td> <td nowrap valign="middle" ><font size="2"><?php echo BOX_ADVSEARCH_CAT ?></font></td> <td valign="middle" ><?php echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ADVSEARCH_ALLCAT)))) ?></td> <td valign="middle" > </td> <td valign="top" ><center><?php echo tep_image_submit('go.gif', BOX_HEADING_ADVSEARCH); ?></center></td> <td width="30%"></td> </tr> <tr> <td height="5"></td> </tr> </table> </form> <?php } ?> Treasurer MFC
timisnumber9 Posted December 3, 2004 Author Posted December 3, 2004 Thanks for that! That is exactly what i was after! Cheers, Tim :thumbsup:
Guest Posted December 3, 2004 Posted December 3, 2004 Thanks for that! That is exactly what i was after! Cheers, Tim :thumbsup: <{POST_SNAPBACK}> Nice script. Thanks, will use that from now on. :) :thumbsup:
boxtel Posted December 3, 2004 Posted December 3, 2004 Nice script. Thanks, will use that from now on. :) :thumbsup: <{POST_SNAPBACK}> if you want it to search in subdirectories as well, change this line : <td valign="middle" ><?php echo tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH) . 'px"') ?></td> to this: <td valign="middle" ><?php echo tep_draw_hidden_field('inc_subcat','1') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH) . 'px"') ?></td> Treasurer MFC
Guest Posted December 3, 2004 Posted December 3, 2004 Where do you put this code? i can't seem to find it in my cpanel?
boxtel Posted December 3, 2004 Posted December 3, 2004 Where do you put this code?i can't seem to find it in my cpanel? <{POST_SNAPBACK}> I don't know what a Cpanel is. I put it in Header.php and footer.php Treasurer MFC
Guest Posted December 3, 2004 Posted December 3, 2004 I don't know what a Cpanel is. I put it in Header.php and footer.php <{POST_SNAPBACK}> Amanda, Where do I change the text BOX_ADVSEARCH_CAT & BOX_ADVSEARCH_CAT - I should know this one... but my brain hurts. :blink: You can see it |:: Here ::| on the bottom of the page Thanks for the help. :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.