Announcement

Collapse
No announcement yet.

Quick search at top of Sitepoint

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quick search at top of Sitepoint

    Sitepoint have added a useful forum search box at the top of all the pages. I did have a quick look into it and it seems that the search will return results for users and the content of the forums.

    What's the best way to do this?

  • #2
    ok guys and gals, do you know where is the best place to post this question where I can get some feedback?

    Comment


    • #3
      Add this code in one of your templates
      --- Templates ---
      PHP Code:
      <form action="search.php" method="post">
      <
      input type="hidden" name="s" value="$session[sessionhash]">
      <
      input type="text" class="bginput" name="query" size="35">
      <
      input type="hidden" name="forumchoice" value="-1">
      <
      input type="hidden" name="action" value="simplesearch">
      <
      input type="submit" class="bginput" name="Submit" value="Perform Search" accesskey="s">
      <
      input type="reset" class="bginput" name="Reset" value="Reset Fields">
      </
      form
      You can also replace this (if you want to give users the option to choose what forums to search in)
      PHP Code:
      <input type="hidden" name="forumchoice" value="-1"
      with
      PHP Code:
      <select name="forumchoice">
      <
      option value="-1">Search All Open Forums</option>
      $searchforumbits
      </select
      --- /Templates ---
      --- Files ---
      But then you would have to add
      PHP Code:
      $searchforumbits=getsearchforums(); 
      in each and every PHP file that uses the template you put the form in.
      Maybe you can put the above code in global.php, but I'm not sure if that's ok.
      --- /Files ---

      Last edited by Chen; Fri 10 Aug '01, 4:27am.
      Chen Avinadav
      Better to remain silent and be thought a fool than to speak out and remove all doubt.

      גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

      Comment


      • #4
        Hey I got it all working. But my problem seems to be that when I search, it doesn't find anything. Even things I know are there.

        Any reason this would happen?
        Last edited by c-prompt; Mon 17 Sep '01, 6:00pm.

        Comment


        • #5
          Past 3 days I had 3 questions......all have gone unanswered.

          BooHoo!

          Comment


          • #6
            I beleive this is what your looking for ladies hehehe

            http://vbulletin.com/forum/showthrea...threadid=19462
            Board of the Month: November
            Websites: Pixeljunction , vBulletin.org
            Button Sets: XP and Aqua Button sets! FREE!
            vB Customization: My sig is now vbulletin compliant. Contact me to make yours compliant too!

            Comment


            • #7
              Sinecureยป

              I do have all this working, my problem is that the search itself doesn't find anything. It says that everything you search for cant be found.

              Comment


              • #8
                http://vbulletin.com/forum/showthrea...109#post173296

                Go there if you will. I posted my code about this matter.

                Thank you for any help. This is driving me crazy.

                Comment

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