Administration
  Home arrow Administration arrow Page 9 - Site Search with HTDIG
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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: starstarstarstarstar / 20
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - 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





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT