GithubHelp home page GithubHelp logo

PHP Search about wet-boew-php HOT 6 CLOSED

wet-boew avatar wet-boew commented on August 20, 2024
PHP Search

from wet-boew-php.

Comments (6)

michael-milette avatar michael-milette commented on August 20, 2024

You can set the $_SITE['wb_search_file'] variable to point to any file you want that contains a custom search form. This is an GCWU theme example of what your search.php should look like::

<form action="searchURL.php" method="post">
     <div id="gcwu-srchbx-in">
          <label for="gcwu-srch"><?php echo $_SITE['wb_search_label_' . $_PAGE['lang1']]; ?></label>
          <input id="gcwu-srch" name="search" type="search" value="" size="27" maxlength="150">
          <input id="gcwu-srch-submit" name="gcwu-srch-submit" type="submit" value="<?php echo $_SITE['wb_search_'.$_PAGE['lang1']] ?>">
     </div>
</form>

You might need to customize:

  • searchURL.php - Replace this with the full URL of your website's search engine.
  • name="search" - replace "search" with whatever field name your search engine likes.
  • name="gcwu-srch-submit" - you may or may not need to replace this. Try it as is first.
  • Add any additional hidden type fields, if you need any.
  • You may need to change the POST to a GET.

You can usually get all of this information from your CMS' existing search form. For Google Site Search engine, see Google's documentation for a sample form. Just don't change anything else that might affect the appearance of the form or it won't display correctly in the WET theme.

It is easy to implement and it works great!

Let me know if you have any questions.

Best regards,

Michael

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Thanks @michael-milette I've been meaning to get back to this. I might "borrow" you're blurb for the wiki documentation when I get to it.

from wet-boew-php.

michael-milette avatar michael-milette commented on August 20, 2024

Glad to hear it will help with the wiki documentation.

from wet-boew-php.

upsonp avatar upsonp commented on August 20, 2024

Finally got around to updating the documentation for the search and archived options. @michael-milette I used most of the description you provided for the Modular Search wiki page, thanks.

from wet-boew-php.

michael-milette avatar michael-milette commented on August 20, 2024

Happy to help @upsonp !

from wet-boew-php.

michael-milette avatar michael-milette commented on August 20, 2024

Just took a look. Looks great. Very clear. Wish I had that documentation when I was implementing it ;-)

from wet-boew-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.