Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Carlsbad, CA
    Posts
    158
    Plugin Contributions
    0

    Default Re: Search in header - Positioning problem

    That sounds like what I need to do. I'm not exactly sure how to go about it though..

    below is my tpl_search_header.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 .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 150px" 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;<input type="image" src="http://www.mysite.com/store/images/new_template_images/search_button.png" value="" />';
      }
    
      $content .= "</form>";
    ?>
    I'm not sure exactly where I will be able to apply the id to the input field.

    Your help is appreciated.

    thanks,
    -Buck

  2. #2
    Join Date
    Jul 2008
    Posts
    56
    Plugin Contributions
    0

    Idea or Suggestion Re: Search in header - Positioning problem

    I fixed my problem by putting table information in tpl_search_header.

    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.togethersite.com/catalog/search_button_BAMsearch.jpg" value="" />' .'</td>'.'</tr></table>';
      }
    
      $content .= "</form>";
    ?>
    Got Baby Heels? Your Hooter Hider resource!

  3. #3
    Join Date
    Jan 2007
    Location
    Carlsbad, CA
    Posts
    158
    Plugin Contributions
    0

    Default Re: Search in header - Positioning problem

    I think I saw that posted somewhere but I didn't use it. It fixed my problem! Thanks to both of you. I did however have to make a couple minor adjustments in the css for everything to line up right. Just a note to anyone else working through this.
    Changes had to be made in #navMainSearch

    thanks again
    -Buck

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,690
    Plugin Contributions
    11

    Default Re: Search in header - Positioning problem

    unhappyDave,
    You need to google table to div as tables are no longer to be used as you have done.
    Good time to get used to the new method since the change will be fairly simple.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

 

 

Similar Threads

  1. Search Button Positioning?
    By Ambitions in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Jun 2010, 11:53 PM
  2. header positioning
    By tickle in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Oct 2009, 08:12 PM
  3. IE6 positioning for my search bar/header?
    By sartor in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Jan 2009, 09:30 AM
  4. positioning my header links
    By hanafoo in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Jan 2007, 08:29 PM

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