Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2 part problem regarding the searchbox.


Trentide

Recommended Posts

And how do I fix the button_quick_find_gif so it aligns. Actually I would like to get rid of it completely and add another .gif. I would still need to find out how to align it though.

 

Thanks In Advance,

 

-Jason-

Link to comment
Share on other sites

Sorry it wouldn't let me edit my own post. I think I would like to get rid of the quick_find logo completely. Wait a minute, I have three questions. How do you put the word "Search" in the text entry box of the searchbox? Wheehh! That's a lot of questions. Sorry and thanks!

 

Thanks In Advance,

 

-Jason-

Link to comment
Share on other sites

The simplest way to align the button is to create a gif image with a transparent area to move the visible button exactly where you want :)

 

You can edit the "quick find" text in /includes/languages/english.php to:

 

define('BOX_HEADING_SEARCH', '');

 

Make sure you leave the quotes...

 

 

To put the text in the search box, in /includes/boxes/search.php change:

 

tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"')

 

to:

 

tep_draw_input_field('keywords','Enter search term ...','onfocus="this.value=\'\'" size="10" maxlength="30" class="searchForm" style="width: ' . (BOX_WIDTH-30) . 'px"')

 

Thats it! You can change the width of the text area by adjusting the '(BOX_WIDTH-30)', eg. -10

 

 

Sonia

Link to comment
Share on other sites

thank you thank you thank you. You're a dream come true!!!

 

I was able to substitute the lame quick find logo with a transparent gif.

And, enter "Search" in the search box.

 

But I don't understand this part:

 

You can edit the "quick find" text in /includes/languages/english.php to:

 

CODE

define('BOX_HEADING_SEARCH', '');

 

Does that help me with getting rid of the box and background in the searchbox?

 

Thanks Again,

 

-Jason-

Link to comment
Share on other sites

Sorry, missed that!

 

Simply change your entire file to:

 

 

<?php
/*
 $Id: search.php Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Modified by Xgraphico - Copyright (c) 2006
 http://xgraphico.com

 Released under the GNU General Public License
*/
?>
<!-- search //-->
	  <tr>
		<td align="center" class="smallText">
<?php
echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
echo tep_draw_input_field('keywords','Search ...','onfocus="this.value=\'\'" size="10" maxlength="30" class="searchForm" 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>';

?>
		</td>
	  </tr>
<!-- search_eof //-->

 

 

Sonia

Link to comment
Share on other sites

That worked. Thank you profusely!!! One last thing, if you don't mind....The advanced search link seems to be too far from the search box; is there a way to delete the space between the two? And the searchbox doesn't go to the top of the left column just below the header. It's like 3 or 4 spaces down. Is there a way to fix that?

 

Thank you thank you thank you!!!!!!

Link to comment
Share on other sites

If you are not using the search text, you can remove:

 

'<br>' . BOX_SEARCH_TEXT .

 

The distance from the top is in the main <table> tag on each page just above the call to the left column:

 

 

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">

 

You can adjust the cellpadding and cellspacing to your liking, but you must do it on each page in the catalog directory (nice dezzign huh?? :huh: )

 

Sonia

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...