Site Wide Search Engines  

Support Topics: Site Wide Search Engine: How to: Modify your ht://Dig search and results page

Before modifying the search files we suggest you should have familiarity with html forms. You can click here (external link) for a easy tutorial on building and using html forms.

Each file in the "search" folder contains comments and instructions for modifying that particular file. Most files contain text called "variables", special tags ht://Dig looks for and replaces with information generated by the search. They look like this:

$(VARIABLE NAME)

Some variables are required in particular files while others are optional - refer to the comments in each of the files for more information.

Most of the files inside the "search" folder can be used as-is or you can modify them to fit your needs. The files are :

"databases" folder - this is where your site's index database files are kept. Note: don't alter or modify any of the files in this directory.

The below files can be modified to make your search form and results pages look like the rest of your site. Refer to the example page to see where each particular file comes into play.

"header.html" - html code for the template ht://Dig uses for the top of your search results page. It has to stay inside the "search" folder otherwise ht://Dig won't know where to find it.

"mac-find.html" - html code for the template ht://Dig uses for the individual search results - repeated for each individual search result. It has to stay inside the "search" folder otherwise ht://Dig won't know where to find it.

"footer.html" - html code for the template ht://Dig uses for the bottom of your search results page. It has to stay inside the "search" folder otherwise ht://Dig won't know where to find it.

"nomatch.html" - the html page ht://Dig returns when there were no matches found for the search query. It has to stay inside the "search" folder otherwise ht://Dig won't know where to find it.

"syntax.html" - the html page ht://Dig returns when there was a syntax error in the boolean search query. It has to stay inside the "search" folder otherwise ht://Dig won't know where to find it.

"search.html" - an example search form. This can be placed in any directory on your website, as well as modified and simplified to be included on other pages. It is merely a standard html form that calls ht://Dig via the form action tag. For example:

<FORM ACTION="/cgi-bin/htsearch">

"images" directory - this contains graphic files displayed in the search results if you choose to use them. You can make your own or modify these to better fit the look of your web site - they have to stay inside the "images" folder inside the "search" folder otherwise ht://Dig won't know where to find them :

  • "button1.gif" through "button10.gif" - buttons that can be used instead of text for direct links to search results pages. This size of the graphics should be 30 pixels wide by 30 pixels high.

  • "buttonl.gif" & "buttonr.gif" - "next" and "previous" results buttons that can be used instead of text for links to the previous or next search results pages. This size of the graphics should be 30 pixels wide by 30 pixels high.

  • "star.gif" and "star_blank.gif" - used to create a graphic representation of the relevancy of a particualr search result if you choose to use them. "star_blank.gif" is simply a blank (transparent) gif file the same size as "star.gif"

 

Support Topics

Blogs
Calendars
E-Commerce
Email
Form to Email
Guestbooks
Hit Counters
MacHighway Banners
Mailing Lists
Message boards and Forums
PERL
PHP & MySQL
Security
Site Wide Search Engines
Spam
SSL
Traffic Reports
Uploading / Publishing
Video
WebDAV