Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //THIS PART GOES ABOVE THE </head> TAG IN YOUR THEME. REMEMBER TO REPLACE 'YOURNAME' WITH YOUR TUMBLR NAME
- <script type="text/javascript">
- <!--
- function handleThis(formElm)
- {
- window.location="http://YOURNAME.tumblr.com/search/"+formElm.number.value+"";
- return false;
- }
- // -->
- </script>
- <script type="text/javascript">
- <!--
- function handleThat(formElm)
- {
- window.location="http://YOURNAME.tumblr.com/tagged/"+formElm.number.value+"";
- return false;
- }
- // -->
- </script>
- //LOCATE THE SEARCH BLOCK IN YOUR THEME. IN MY THEME IT'S: {block:IfSearchBoxInSidebar}
- //REPLACE THE CONTENTS OF THE SEARCH BLOCK (between {block:whatever} and {/block:whatever}) WITH THE FOLLOWING:
- <div id="search">
- <form id="search-form" method="get" onsubmit="return handleThis(this)" style="margin-bottom:4px;">
- <input type="text" name="number" value="Text Search" onblur="this.value = this.value || this.defaultValue;" onfocus="this.value == this.defaultValue && (this.value = '');" />
- <span class="right"></span>
- </form>
- <form id="search-form" method="get" onsubmit="return handleThat(this)">
- <input type="text" name="number" value="Tag Search" onblur="this.value = this.value || this.defaultValue;" onfocus="this.value == this.defaultValue && (this.value = '');" />
- <span class="right"></span>
- </form>
- </div>
- //THIS SHOULD RESULT IN TWO SEARCH BARS IN THE SIDEBAR. ONE WILL SAY 'Text Search' AND ONE WILL SAY 'Tag Search'
Advertisement
Add Comment
Please, Sign In to add comment