Administration
  Home arrow Administration arrow Page 9 - Site Search with HTDIG
The Best Selling PC Migration Utility.
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Site Search with HTDIG
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 17
    2004-04-12

    Table of Contents:
  • Site Search with HTDIG
  • Digging Deep
  • Source Control
  • Script Barf
  • Variable Control
  • A Well-Formed Plan
  • What You See
  • Custom Job
  • Out With The Old
  • Caveat Emptor
  • Ending The Dig

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    Site Search with HTDIG - Out With The Old
    (Page 9 of 11 )

    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 Administration Articles
    More By icarus, (c) Melonfire


     

       

    ADMINISTRATION ARTICLES

    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway