EarthLink.net   Start Page   Web Mail   Biz Center   Support  
 
     
Search  
................................................................................................................
Web Hosting Help | Control Panel  

Adding ht://Dig Search to Your Site

An example of an ht://dig search engine

For further information please visit the htDig homepage at http://www.htdig.org .

Note: SoftCart users: There is a known problem with htDig and Mercantec SoftCart where the links for the search results are not parsed by SoftCart. This problem is being investigated by the engineers and will hopefully be resolved in the near future.


Installing htdig

Log in to the MindSpring Control Panel using your web hosting account information, and under Toolbox, select Search Engine.

Click the Install button.

The following directories and files will be created:

cgi-bin/htsearch cgi-bin/rundig htdig www/htdig

Your htdig config file will be stored at htdig/conf/htdig.conf. You can modify the file to customize your search engine.

To index your site, please visit http://www.yourdomain.com/cgi-bin/rundig .You will need your web hosting userid and password to authenticate.

A generic search page will be created for you at http://www.yourdomain.com/htdig/search.html .


Customizing the look of htDig

If you'd like to customize the htDig pages that get displayed when you perform a search, get an error, or get the results back, here's some information on how to make it work. In order to change the look of htDig there are a few things that you can do.


Specifying your own HTML Templates

Take a look at the HTML Template files.

You can view the templates and more information about them by following one of the links below:

Upload your HTML Templates in your htdig/common/ directory.

The new htDig pages that you make based on the default templates need to be placed in your htdig/common/ directory.

Edit your htdig/conf/htdig.conf file.

You will need to add a few lines in your htdig/conf/htdig.conf file for htDig to find your version of the HTML templates in your common directory.

Download a copy of htdig/conf/htdig.conf file and make the changes discussed below. When you are done, save the changes and upload the file to the same location. Please make sure to upload the file in ascii or text mode.

Very close to the top of the htdig.conf file you will see a line that looks like this:

database_dir: /web/u#/www#####/htdig/db

You can use this as a reference to make your pointer to your HTML templates.

database_dir: /web/u99/www77777/htdig/db

Under that line I would put the pointers to my HTML templates like this:

search_results_header: /web/u99/www77777/htdig/common/header.html search_results_footer: /web/u99/www77777/htdig/common/footer.html nothing_found_file: /web/u99/www77777/htdig/common/nomatch.html syntax_error_file: /web/u99/www77777/htdig/common/syntax.html

So after adding the line it would look like this:

database_dir: /web/u99/www77777/htdig/db search_results_header: /web/u99/www77777/htdig/common/header.html search_results_footer: /web/u99/www77777/htdig/common/footer.html nothing_found_file: /web/u99/www77777/htdig/common/nomatch.html syntax_error_file: /web/u99/www77777/htdig/common/syntax.html

After making the above changes, header.html, footer.html, and other custom templates you place in htdig/common/ will be used by default.

For further information please visit the htDig homepage at http://www.htdig.org/ .


Specifying your own Images

So you want to specify your own images for the Page Index and the Star?

  • Take a look at your htdig/conf/htdig.conf file.

At the bottom of the conf file, you will see a section like the following:

Config File
## The following are used to change the text for the page index.# The defaults are just boring text numbers. These images spice# up the result pages quite a bit. (Feel free to do whatever, though)# next_page_text: <img src=/htdig/buttonr.gif border=0 align=middle width=30 height=30 alt=next> no_next_page_text: <img src=/htdig/buttonl.gif border=0 align=middle width=30 height=30 alt=prev> prev_page_text: <img src=/htdig/buttonl.gif border=0 align=middle width=30 height=30 alt=prev> no_prev_page_text: page_number_text: "<img src=/htdig/button1.gif border=0 align=middle width=30 height=30 alt=1>" \ "<img src=/htdig/button2.gif border=0 align=middle width=30 height=30 alt=2>" \ "<img src=/htdig/button3.gif border=0 align=middle width=30 height=30 alt=3>" \ "<img src=/htdig/button4.gif border=0 align=middle width=30 height=30 alt=4>" \ "<img src=/htdig/button5.gif border=0 align=middle width=30 height=30 alt=5>" \ "<img src=/htdig/button6.gif border=0 align=middle width=30 height=30 alt=6>" \ "<img src=/htdig/button7.gif border=0 align=middle width=30 height=30 alt=7>" \ "<img src=/htdig/button8.gif border=0 align=middle width=30 height=30 alt=8>" \ "<img src=/htdig/button9.gif border=0 align=middle width=30 height=30 alt=9>" \ "<img src=/htdig/button10.gif border=0 align=middle width=30 height=30 alt=10>" ## To make the current page stand out, we will put a border arround the# image for that page.#no_page_number_text: "<img src=/htdig/button1.gif border=2 align=middle width=30 height=30 alt=1>" \ "<img src=/htdig/button2.gif border=2 align=middle width=30 height=30 alt=2>" \ "<img src=/htdig/button3.gif border=2 align=middle width=30 height=30 alt=3>" \ "<img src=/htdig/button4.gif border=2 align=middle width=30 height=30 alt=4>" \ "<img src=/htdig/button5.gif border=2 align=middle width=30 height=30 alt=5>" \ "<img src=/htdig/button6.gif border=2 align=middle width=30 height=30 alt=6>" \ "<img src=/htdig/button7.gif border=2 align=middle width=30 height=30 alt=7>" \ "<img src=/htdig/button8.gif border=2 align=middle width=30 height=30 alt=8>" \ "<img src=/htdig/button9.gif border=2 align=middle width=30 height=30 alt=9>" \ "<img src=/htdig/button10.gif border=2 align=middle width=30 height=30 alt=10>"

This is where the images for the page index are specified in HTML format.

  • Upload your own graphics

You can simply upload your own graphics with the same filename in your www/htdig/ directory to overwrite the default ones. Or you can upload your own graphics with different filenames and/or in a different location, and edit your conf file accordingly (as explained below).

  • Edit your htdig/conf/htdig.conf

Download a copy of htdig/conf/htdig.conf file and make the changes discussed below. When you are done, save the changes and upload the file to the same location. Please make sure to upload the file in ascii or text mode .

If the image size changes and you want to modify the width and height specified in the HTML, or if you want to change the filenames and/or location of the images, you can do so in the htdig/conf/htdig.conf.

  • All lines except for the last line must end with a backslash (\).

  • When the value of a configuration attribute consist of multiple lines, each line must be enclosed in double quotes

  • Do not include double quotes in the value.


  • Stars

    "Well, what about the Star?"

    You can add the following 2 lines to your htdig/conf/htdig.conf file:

    star_blank : /htdig/star_blank.gif star_image : /htdig/star.gif

    These are the default values, so you can overwrite the default images in your www/htdig/ directory without specifying them in your conf file. Only when you want to change the filename and/or the location of the star images, you need to add the above 2 lines to your conf file.

    "I don't want the Stars at all!"

    You can turn off the stars by adding the following line in your htdig/conf/htdig.conf file:

    use_star_image : no

    Members and visitors to the EarthLink website agree to abide by our Member Policies.
    EarthLink Privacy Policy
    © 2002 EarthLink, Inc.