Searchbox on every page - improved usability

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dontom
    Senior Member
    • Mar 2001
    • 120

    Searchbox on every page - improved usability

    I found this @ Jakob Nielsen's "Alertbox"

    Search Should be a Box
    Users often move fast and furiously when they're looking for search. As we've seen in recent studies, they typically scan the home page looking for "the little box where I can type." We've long known that users scan, and the implications are clear:
    On home pages, search should be a type-in field and not a link.
    The search input field should be wide enough to contain the typical query; if the box is too small, the query will scroll and diminish usability.
    When I changed the useit.com home page to include a search box instead of a link, search engine use increased by 91%. Small change, big effect (as is often the outcome when implementing usability guidelines).
    (Interior pages may use a search link if they have a very simple design; complex interior pages should use a search box.)
    Search is the user's lifeline for mastering complex websites. The best designs offer a simple search box on the homepage and play down advanced search and scoping.


    After having a look at the source of sitepointforums I put a searchbox in my header template - searching is now lots easier.

    just put this inside your header template, just change"Suchen nach" according to the language you wish to have (search for)
    Code:
    <smallfont><form action="search.php" method="post">
    &nbsp;<input type="hidden" name="s" value="$session[sessionhash]">
    <input type="hidden" name="forumchoice" value="- 1" /><input type="hidden" name="searchin" value="subject" /><input type="hidden" name="searchdate" value="-1" /><input type="hidden" name="action" value="simplesearch" /><input type="hidden" name="booleanand" value="yes" />
    <input class="search" onFocus="this.value='';" type="text" name="query" value="Suchen nach..." size="15" maxlength="150"/>
    
    <input type="hidden" name="action" value="simplesearch">
    <input type="image" src="images/go.gif" name="Submit" border="0" align="absbottom"></form></smallfont>
    See it at: http://forum.mtb-news.de

    hth

    Tom
    Internet Bike Community
    Mountainbike News Mountainbike Forum

    www.mtb-news.de
  • KroeT
    Member
    • Dec 2000
    • 54

    #2
    Hey. That's a good idea. Just inserted it.

    Comment

    • Darin
      Member
      • Mar 2001
      • 54

      #3
      Same here, edited the code the way I wanted it. Thanks a lot! My members love it!

      Comment

      • Eficrx
        Member
        • May 2001
        • 46

        #4
        thanks sorry for brining up a old thread but this really helps my boards =)

        Comment

        • JJR512
          Senior Member
          • Dec 2000
          • 507

          #5
          This is a great little hack.

          I have one suggestion to make it even better, though. The main "selling point" of this hack is that by putting a search box right there where people can see it, it lets them know that there is indeed a search tool, which is good. But this is just a basic search tool, compared to the search capabilities you would have if you used the Search button up at the top. But the problem with that button is that it sort of blends in with the other buttons, so many people might not notice it. Which is why this hack is so great: The search box is a lot more noticable.

          So my idea is a way to remind people that notice the search box that there is also a more advance search tool available. To that end, I've put a simple link under the search box. The link reads "Advanced Search" and the link itself is the same as the search button's link.

          My version of this hack looks like this:
          PHP Code:
          <smallfont>
          <
          form action="search.php" method="post">
          <
          input type="hidden" name="s" value="$session[sessionhash]">
          <
          input type="hidden" name="forumchoice" value="- 1" /><input type="hidden" name="searchin" value="subject" /><input type="hidden" name="searchdate" value="-1" /><input type="hidden" name="action" value="simplesearch" /><input type="hidden" name="booleanand" value="yes" />
          <
          input class="search" onFocus="this.value='';" type="text" name="query" value="Search for..." size="15" maxlength="150"/>
          <
          input type="hidden" name="action" value="simplesearch">
          <
          input type="image" src="images/go.gif" name="Submit" border="0" align="absbottom">
          <
          br><a href="http://www.jjr512.com/forums/search.php?s=">Advanced Search</a>
          </
          form>
          </
          smallfont
          -Justin "JJR512" Rebbert
          JJR512.com: Chat about anything!

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 73981

            #6
            Yeah.. I have had a similar link since I put it up. Just recently I have expanded it to be able to search our Articles through the Atomz.com interface as well.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            • MarkB
              Senior Member
              • Apr 2001
              • 1253

              #7
              Is there any way to have this so it only searches the forum the user is in, instead of the entire board? Or would that be too tricky?

              Mark

              Comment

              • c-prompt
                Senior Member
                • Apr 2001
                • 1309

                #8
                I did mine and it works, but kind of doesn't work. The problem is that certain words search just fine. But others dont even go to a "We are now searching for your words". page. It just opens to nothing found.

                Here is the code I am using, does anyone notice anything wrong?

                Code:
                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
                <tr>
                <form action="search.php" method="post">
                <td width="100%" valign="top">
                <input type="hidden" name="forumchoice" value="-1">
                <input type="hidden" name="s" value="$session[sessionhash]">
                <input type="text"  class="search" onFocus="this.value='';" name="query" style="color:#000000; 
                background:#CED7DB;
                border-color:#000000;
                border-top:1px solid;
                border-bottom:1px solid;
                border-left: 1px solid;
                border-right:1px solid;
                font-family:tahoma,Arial;
                font-size:10px" size="30" />
                <input type="hidden" name="searchin" value="subject" />
                <input type="hidden" name="searchdate" value="-1" />
                <input type="hidden" name="action" value="simplesearch" />
                <input type="hidden" name="booleanand" value="yes" />
                <input type="hidden" name="action" value="simplesearch" />
                </td>
                </tr>
                </table>
                </td>
                <td width="10%" background="images/searchbgdark.gif" valign="bottom">
                &nbsp;
                </td>
                <td width="5%" background="images/searchbgdark.gif">
                <INPUT TYPE="image" SRC="images/submit2.gif" BORDER="0" ALT="Submit" accesskey="s"></td></form>
                <td width="5%" background="images/searchbg.gif" valign="top">
                <img border="0" src="images/rightendofsearch.gif" width="35" height="24"></td>
                </tr>
                </table>
                I would post a link but the board is not opened yet. And is only in testing faze. Sorry about the messy code, worked a long time just to get it appear right.

                Thank you for any help!

                Comment

                • c-prompt
                  Senior Member
                  • Apr 2001
                  • 1309

                  #9
                  Just to be a little more clear.

                  For instance I search for the word "Test". On my board I have a few threads where I wrote Test. It finds these no problem at all. I then posted a thread about CSS submit button changes. I search for submit button and it finds it just fine as well.

                  But when I search for the word, "More". Which is in a thread as well, it never finds it. Why would that be?

                  Comment

                  • Bender
                    Member
                    • Jun 2001
                    • 48

                    #10
                    cool thing, Dontom ... seems I never worry too much about usability
                    have integrated this today and works fine, thx!
                    10 SIN
                    20 GOTO HELL

                    Comment

                    • amykhar
                      Senior Member
                      • May 2001
                      • 579
                      • 3.5.x

                      #11
                      c-Prompt - it doesn't find "More" for me either on my forum. Must be a bug in the code. You might want to report it.

                      Amy
                      http://www.eaforums.com

                      Comment

                      • Dontom
                        Senior Member
                        • Mar 2001
                        • 120

                        #12
                        Have a look here - its documented in arabic language


                        Internet Bike Community
                        Mountainbike News Mountainbike Forum

                        www.mtb-news.de

                        Comment

                        • Wayne Luke
                          vBulletin Technical Support Lead
                          • Aug 2000
                          • 73981

                          #13
                          More is a "COMMON" word and as such is included in badwords.php. Any word listed in this file will not be indexed so as to lower the size of the search tables in the database.

                          If you want "MORE" to be indexed you must remove it from badwords.php and reindex your site. This is not a bug and is working by design.
                          Translations provided by Google.

                          Wayne Luke
                          The Rabid Badger - a vBulletin Cloud demonstration site.
                          vBulletin 5 API

                          Comment

                          • JJR512
                            Senior Member
                            • Dec 2000
                            • 507

                            #14
                            Should it be changed to $badwords["a"]=0;, or should the line be completely deleted or commented out?
                            -Justin "JJR512" Rebbert
                            JJR512.com: Chat about anything!

                            Comment

                            • Wayne Luke
                              vBulletin Technical Support Lead
                              • Aug 2000
                              • 73981

                              #15
                              I would comment it out.. But is MORE really that common of a search term?
                              Translations provided by Google.

                              Wayne Luke
                              The Rabid Badger - a vBulletin Cloud demonstration site.
                              vBulletin 5 API

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...