I want to change the search button to something else but the button is in CSS can some one help with this or can it be done?
I want to change the search button to something else but the button is in CSS can some one help with this or can it be done?
There are 2 search boxes located in your sideboxes folder.
There is the header search and the side box search.
you did not say which search you wanted to change to an image.
If you open your tpl_header_search and locate this code
and change to this code:Code:} else { $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 . '\';"') . ' <input type="submit" value="' . HEADER_SEARCH_BUTTON . '" style="width: 45px" />'; }
The button is already in your button folder.Code:} else { $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 . '\';"').zen_image_submit(BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'class="input" style="position:relative;left: 0px; bottom: 4px"');}
If you need to change the side box search let me know and I will give you the code to change that one to an images as well.
I'd like to change the search box button on the sidebox to a picture.
Please help!
This is the complete code that you can replace the original code with
You may need to set the position of your button and if you do in red is what needs to be changedCode:<?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.php 4142 2006-08-15 04:32:54Z drbyte $ */ $content = ""; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">'; $content .= zen_draw_form('quick_find', 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="18" maxlength="100" style="width: ' . ($column_width-30) . 'px"') . '<br />' . zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON); $content .= '<br /><a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>'; } else { $content .= zen_draw_input_field('keyword', '', 'size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px" 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 . '\';"') . '<br />' .zen_image_submit(BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'class="input" style="position:relative;left: 5px; bottom: 4px"'); $content .= '<br />Or try <a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>';} $content .= "</form>"; $content .= '</div>'; ?>
class="input" style="position:relative;left: 0px; bottom: 0px
Hi, I am now almost desperate in not been able to find info on how to do the same - change the advanced search box on the sidebox to use a transparent picture like in here: http://butiche.com/ and here: http://www.impressionslast.com/. I've made the gif and on, but can't make it to show instead of the rectangular default form...
I've asked put that on the forum here: http://www.zen-cart.com/forum/showthread.php?t=133276 but to no avail still... Please help!!!
Bookmarks