Home arrow Site Administration arrow Page 9 - Site Search with HTDIG

Out With The Old - Administration

Want to add a search engine to your Web site but don't know how? Well, today's your lucky day! In this tutorial, find out how to obtain, install and use the popular ht://Dig indexing engine to add powerful, effective search capabilities to your site with minimal time and fuss.

TABLE OF CONTENTS:
  1. Site Search with HTDIG
  2. Digging Deep
  3. Source Control
  4. Script Barf
  5. Variable Control
  6. A Well-Formed Plan
  7. What You See
  8. Custom Job
  9. Out With The Old
  10. Caveat Emptor
  11. Ending The Dig
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 21
April 12, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Once the form is submitted, the "htsearch" utility takes over and queries the database to retrieve a list of pages matching the query string. This utility also takes care of generating the result page, as per the formatting parameters specified. In case you'd like to control the appearance of this page, ht://Dig allows you to customize the result page templates as well, though the process is somewhat convoluted.

  • You can alter the header and footer of the result page by setting the "search_results_header" and "search_results_footer" variables in the configuration file to point to custom header and footer files. Alternatively, simply customize the application's default "header.html" and "footer.html" files, installed to the application's "common" directory.

  • You can customize the page that appears in case a syntax error is found in a Boolean search, by modifying the file "syntax.html" in the installation's "common" directory. Alternatively, create your own file and tell ht://Dig where to find it by setting the "syntax_error_file" variable in the configuration file.

  • You can tell ht://Dig to display a custom page if the search produces zero matches, by setting the "nothing_found_file" variable in the configuration file, or by altering the "nomatch.html" template in the installation's "common" directory.

  • By default, ht://Dig ships with two built-in templates, "builtin-long" and "builtin-short", which are used to display the results found during a search. You can modify the results page to conform to the design of your site by altering these templates, named "long.html" and "short.html" respectively, or use your own templates by setting the "template_map" variable in the configuration file.

All these templates can contain special ht://Dig variables that will dynamically be replaced with actual values when a search is performed.

While on the topic, here's a quick tip: if you're setting up a simple search engine, or if you're pressed for time, I'd advise you to simply modify the default templates that ship with the application, rather than creating new templates and configuring the system to recognize them.



 
 
>>> More Site Administration Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: