How to change the Search Button

Discussion in 'Modding/Theme Help' started by virgiltu, Jan 17, 2012.

  1. virgiltu

    virgiltu New Member

    Joined:
    Jan 13, 2012
    Messages:
    31
    Likes Received:
    2
    I figured ill share this in case some of you are interested.

    This is how to change the Search Button. You can see RateCleveland.com for a demo

    I will actually share my theme when im done. The original theme is missing a lot of divs so in any way all you need to do is create two images as in my code search1.gif and search2.gif you may wonder y gif. if you use paint.net and save the image as a gif with transparent background Internet Explorer will not have an issue with transparency.

    In your global_header.tpl find


    Code:
     <form name="search" action="{SITEURL}search.php" method="get">
                    {SELECTION_BOX}
                    <input type="text" name="q" size="50" value="{Q}">
                    <input type="submit" name="sub" value="{L_399}" class="button">
                    <a href="{SITEURL}adsearch.php">{L_464}</a>
                </form>
    This is the code that is the button.

    <input type="submit" name="sub" value="{L_399}" class="button">

    change all the code above to this



    Code:
    <div class="sbutton">
     <form name="search" action="{SITEURL}search.php" method="get">
                    {SELECTION_BOX}
                    <input type="text" name="q" size="50" value="{Q}">
                    <a href="javascript:document.myform.submit()" onmouseover="document.myform.sub_but.src='../themes/default/img/search2.gif'" onmouseout="document.myform.sub_but.src='../themes/default/img/search1.gif'" onclick="return val_form_this_page()">
    <img src="../themes/default/img/search1.gif"  border="0" alt="Submit" name="sub_but"></a> 
                    <a href="{SITEURL}adsearch.php">{L_464}</a>
                </form>
       </div>
    I have added a lot of divs in my theme so now you can actually move things around.
     

Share This Page