Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32
  1. #11
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    Default Re: Search Button image

    I had to put my button in a table to keep it in-line with the search box as well

    Edit 1

    PHP Code:
     
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_search_header.php 4142 2006-08-15 04:32:54Z drbyte $
     */
      
    $content "";
      
    $content .= zen_draw_form('quick_find_header'zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT'''NONSSL'false), 'get');
      
    $content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
      
    $content .= zen_draw_hidden_field('search_in_description''1') . zen_hide_session_id();
      if (
    strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
        
    $content .= zen_draw_input_field('keyword''''size="6" maxlength="30" style="width: 100px" value="' HEADER_SEARCH_DEFAULT_TEXT '" onfocus="if (this.value == \'' HEADER_SEARCH_DEFAULT_TEXT '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' HEADER_SEARCH_DEFAULT_TEXT '\';"') . '&nbsp;' zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
      } else {
      
      
      
        
    $content .= 
      
    '<table border="0" cellpadding="0" cellspacing="0">
         <tr>
          '
    .'<td valign="middle">'zen_draw_input_field('keyword''''size="6" maxlength="30" style="width: 100px" value="' HEADER_SEARCH_DEFAULT_TEXT '" onfocus="if (this.value == \'' HEADER_SEARCH_DEFAULT_TEXT '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' HEADER_SEARCH_DEFAULT_TEXT '\';"') .'</td>'.'<td>''&nbsp;<input type="image" src="http://www.klmoda.com.au/search_button.jpg" value="" />' .'</td>'.'</tr></table>'
      }
      
      
      
      
      
      
      
      
    $content .= "</form>";
    ?>



    edit 2 for firefox (gap at top fix)


    PHP Code:
     
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_search_header.php 4142 2006-08-15 04:32:54Z drbyte $
     */
      
    $content "";
      
    $content .= zen_draw_hidden_field('search_in_description''1') . zen_hide_session_id();
      if (
    strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
        
    $content .= zen_draw_input_field('keyword''''size="6" maxlength="30" style="width: 100px" value="' HEADER_SEARCH_DEFAULT_TEXT '" onfocus="if (this.value == \'' HEADER_SEARCH_DEFAULT_TEXT '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' HEADER_SEARCH_DEFAULT_TEXT '\';"') . '&nbsp;' zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
      } else {
      
      
      
        
    $content .= 
      
    '<table border="0" cellpadding="0" cellspacing="0">
         <tr>
          '
    .'<td valign="middle">';
       
         
    $content .= zen_draw_form('quick_find_header'zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT'''NONSSL'false), 'get');
      
    $content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
       
     
    $content .= zen_draw_input_field('keyword''''size="6" maxlength="30" style="width: 100px" value="' HEADER_SEARCH_DEFAULT_TEXT '" onfocus="if (this.value == \'' HEADER_SEARCH_DEFAULT_TEXT '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' HEADER_SEARCH_DEFAULT_TEXT '\';"') .'</td>'.'<td>''&nbsp;<input type="image" src="http://www.klmoda.com.au/search_button.jpg" value="" />' .'</td>'.'</tr></table>'
      }
      
      
      
    $content .= "</form>";
    ?>

  2. #12
    Join Date
    Jan 2008
    Posts
    89
    Plugin Contributions
    0

    Default Re: Search Button image

    Quote Originally Posted by Vinnie View Post
    I'm using iC_AthemeV1.3 template. in this file....
    includes/templates/iC_AthemeV1.3/sideboxes/tpl_search_header.php
    i changed input type ="image"......

    ......<input type="image" src="http://yoursite.com/images/search_button.gif"
    value="" height="26" type="image" width="35"/>.......

    well, i don't know if this is the right way to do it or not, but it works for me.
    That worked perfectly for me...thanks for your help!

  3. #13
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    78
    Plugin Contributions
    0

    Default Re: Search Button image

    vandiermen

    haven't tried your fix but I was having that Firefox gap issue myself can't wait to put you code in. THANK U!!!

  4. #14
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    78
    Plugin Contributions
    0

    Default Re: Search Button image

    sorry, didn't really look at this properly.

    what I have done is removed the text field and replaced it with a button (that goes to the advance search page). But I have this Firefox gap between the Search button and the header see here http://www.sunflowerpipes.com/shop/.

    It appears that the hidden fields are being read by Firefox but not IE.

    I'm gonna try vandiermen table code, maybe this will work, will let y'all know.

    Thanks everyone for responding to this thread

  5. #15
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    Default Re: Search Button image

    Quote Originally Posted by tonkali View Post
    .
    I dont see a search box in either but maybe your working on it

  6. #16
    Join Date
    Sep 2006
    Location
    NYC
    Posts
    78
    Plugin Contributions
    0

    help question Re: Search Button image

    Hi V.

    Ideally I want this: http://www.sunflowerpipes.com/test/spSearch.html but I've been wrecking my brain and don't know how to mod the php code to get this

    so

    alternatively if I can just get the button that is there in position without the gap space I'm experiencing in Firefox that would work also. Any advice?

  7. #17
    Join Date
    Mar 2008
    Posts
    100
    Plugin Contributions
    0

    Default Re: Search Button image

    how do i put it into the table like you sayed above? when I try to do this it doesn't work... im sure im just doing something wrong. The code is just hard to read being that it is in such a small window that you can post it in.

    Any help is much appreciated! :)

  8. #18
    Join Date
    Mar 2008
    Posts
    100
    Plugin Contributions
    0

    Default Re: Search Button image

    okay so i figured out how to put it into a table... but when i do put them in a table the search field and the image button i am using are really far apart from each other? what do I need to do to correct this?

    at the moment I have taken down the table and this is what I have...

    the text field and button are close like i want them and in the right position for my header, I just need to have the text field aligned with the button.

    http://cart.lifewaynutrition.com

    -Swelter83

  9. #19
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    Default Re: Search Button image

    Looks ok to me, but dont put a 'width=""' on the table code and it should be fine (close together). or you could set the 'width="" to the size you want. May help if you play around with table code in dreamweaver or something ?

    If I were you I would disable the right had column: admin > configuration > layout setting > Column Right Status - Global > 0= Column Right is always off

    Also there is something with the nav bar in my IE, you could fix this by adding some &nbsp; at the beginning of the nave bar?

    You could post your code here if you are still having problems
    Attached Images Attached Images  

  10. #20
    Join Date
    Mar 2008
    Posts
    100
    Plugin Contributions
    0

    Default Re: Search Button image

    hmmm okay thanks, yeah Im using Safari for my browser, along with Firefox, my IE doesn't work for some reason... Big surprise! thanks for the tip on the search button.

    Also if it's possible to get some help with this i would appreciate it...
    if you notice the image you posted you'll see the categories and bestsellers...
    they have images there but the text is not centered properly... where is the
    CSS tag for this? i've look all over and tried margin codes in a ton of places and
    nothing seems to move the text to the center of that image.

    any idea?

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v151 Changing the Search button image
    By ray-the-otter in forum General Questions
    Replies: 1
    Last Post: 6 Nov 2012, 07:38 PM
  2. custom search button image
    By keneso in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 21 Jan 2011, 02:28 AM
  3. Search button to an image
    By trudesign in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 2 Sep 2008, 07:20 AM
  4. Changing Search Button to an image
    By MCanes in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Oct 2007, 04:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg