GrowSearch™ - Read me

Installation

These instructions are also included in the download and all the files include comments to help you.

  1. Buy, download and unzip: Purchase the license and download the .zip archive that contains all the files.
  2. Place the following files in the site root:
    • growsearch.php Contains the XHTML search form and site map button to be included in the site pages.
    • growsearch_results.php The physical search results and site map page. Script settings are also contained in here.
    • growsearch_highlight.php Keyword / search term highlight function.
  3. Add the form to your pages: growsearch.php contains the search form and site map button for your pages.
    • .HTML pages: Copy and paste the contents of growsearch.php in to the <body> of tyour pages
    • .PHP pages: Add <?include("growsearch.php");?> to the <body> where you want the form to appear to include the file (make sure you change the path when including it in sub-directory files).
  4. Style the form and buttons: Add whatever identifiers or classes you like to the form elements and let your creativity loose.
  5. Add the highlight routine: PHP pages only. To have the search terms / keywords highlighed in pages that are loaded from the links in the results add <?include("growsearch_highlight.php");?> on the first line of your code (make sure you change the path when including it in sub-directory files). To style the highlight add a class .gshighlight to your CSS file and style however you like.
  6. Configure the search and site map results: Open growsearch_results.php. There is a section at the top where you can follow the commented instructions in the file to configure:
    • Directories to ignore
    • File types to ignore
    • Individual files to ignore
    • What parent directory to display sub-directories and files from (default is the root where the results page is sitting)
    • What tag to use as the display text for the pages in the results (default is <title>). The chosen tag must [1] be a unique tag on each page and [2] contain text and not just be a variable because the script will not parse variables.
    • Minimum number of character for a search term (default is 2)
    • Extra characters to add the the end of the directory names in a search result (default is a forward slash)
  7. Style the output: growsearch_results.php displays both the search results and the site map as appropriate. The page displays a simple XHTML <ul> unordered list and validates straight out of the box. Some basic classes are included in the page already:
    • <ul class="gsresults"> for the results list.
    • <li class="gsdirectory"> for the <li>'s that will display the directory the pages are found in
    • <li class="gspage"> for <li>'s that will contain the page links. So the simplest way to style the results is to add those classes to your CSS.
    • <h2 class="gsheader"> for title of the results (e.g. Site Map)
    • <p class="gsdescription"> for the text describing the results (e.g. 'Search results are ordered by keyword density')
    If you need to rename the classes for any reason simply search growsearch_results.php for those classes and replace the value.

You're done! Now test your script and have fun with styling it.

back to the growsearch™ home.

Action


Proof is in the Searching

23/02/06: GrowSearch just got faster! Check the demo to see just how fast.


Requirements

Hosting

Your host needs to support PHP scripting. If they don't, ask them to install it or switch to one of the 99% of providers who do - PHP is free!

Mark-up

Descriptive <title>'s or <h1>'s are recommended for your site pages. It's not so much a requirement but just good practice because the search routine and site map indexes all pages and can use the contents of any tag you choose as the display text for the pages in the list.


Biography of a Search

GrowSearch was originally created for our own use (it's used in gr0w.com). We wanted a simple plug-in that made searching any kind of web page a breeze, regardless of user skill level. We also wanted a routine to produce a site map that would update automatially as part of the package. So after a fair slice of hard work allowing for the varied uses you might put it to and readying it for everyone to use its finaly here: Our combined site search and map. Enjoy! More about the work can be seen in the forthcoming library article.

Update: Thursday, 29th September, 2005

I've finaly got around to writing a press release for GrowSearch. Please feel free to take peek if that kind of thing interests you.