- Table of Contents
- ::
- Introduction
- ::
- Overview
- ::
- Architecture
- ::
- Installation
- ::
- Importing
- ::
- Exporting
- ::
- Remote Services
- ::
- Databases
- ::
- Searching
- Appearance
- ::
- New Categories
- ::
- Troubleshooting
- ::
- Contact
Chapter 14: Appearance and Web Pages
iVia installations contain two independent Web sites: the Public Web Site, which patrons use to search and browse the records; and the Adders Web Site, which librarians use to create and maintain records. The public site is built from HTML pages (using server-side includes) and CGI scripts; while the adders site is generated completely from CGI scripts.
Almost all iVia CGI programs use template files and themes to control their output. These templates can be edited by hand (using a text editor) or through the template editor in the iVia Web site. For a description of this system, see Appendix B of the iVia Adders' manual.
The Public Web Site
The bulk of the public web site is stored in the $INFOMINE_HOME/htdocs directory as .shtml and HTML pages, and can simply be edited in the majority of cases. The CGI scripts in the $INFOMINE_HOME/cgi-bin/ produce web pages based on the template files stored in the $INFOMINE_HOME/data/html_templates/ directory; their appearance can be altered by changing the template files.
There are a few special cases, including the top-level category (search) pages.
The Category Pages
The default category search and advanced search pages are generated from the template file in $INFOMINE_HOME/data/html_templates/$DEFAULT_THEME/search/search.html (where $DEFAULT_THEME is set in the [Public Web Site] section of the iVia.conf file). The search CGI program can be passed a different theme argument, which causes it to look in a different directory for the template file, as explained in Appendix B of the iVia Adders manual.
The search.html file contains code for outputting the category data, but not for changing the category descriptions and colors themselves. This information is found in two places:
- The category keywords, featured_resources lists, libraries_and_databases lists, overview, and contact information are stored in $INFOMINE_HOME/etc/categories.conf and can easily be edited.
- The basic category definitions, including the category names, abbreviation and colors, are hard-coded into the iVia library. See Chapter 15: Creating New Categories for further information.
The Browse Pages
The iVia browse pages are accessible from the category pages. They are generated in two parts.
First, the generate_browse_list_data program (and a couple of other, specialized, variants) is used to set up and populate the browse_pages table in the iVia database based on the current record data. This is part of the nightly.sh script, and is run nightly, though it can be disabled in the iVia.conf file by setting the skip_generate_browse_data option in the [inverted_index] section to true. If an iVia database is being shared by several iVia installations you should only allow one installation to generate browse pages.
Second, the browse CGI script in the public Web site is used to generate the Web pages from data in the browse_pages table. The appearance of the browse program can be changed by updating its templates.
The Adders Web Site
The Adders Web Site comprises the CGI scripts in the $INFOMINE_HOME/secure_scripts/ directory. Your web server must be configured to restrict this directory to your adders and no other users (We recommend SSL-based authentication against the remote_user and password fields of the adders_info table in the main iVia database).
By default, the pages on the adders web site are based on the template files stored in the $INFOMINE_HOME/data/html_templates/dbase_manage/ directory; their appearance can be altered by changing the template files, and a different theme can be used by setting the theme value in the [Adders] section of the iVia.conf file (you will need to supply a replacement set of template files).
The Record Editor Keyword and Subject lists
The iVia Record Editor contains a "Keyword and subject lists" menu that can be used to launch a window containing a list of common keywords or subject headings. To add a list to the menu, you have to first create a text file containing the items in the list, and then update the HTML for the record editor to include the new list.
Put the term list in a text file with one phrase per line, and save the file in the $INFOMINE_HOME/etc/common_vocabulary.
To make the term list appear in the Record Editor itself, edit the $INFOMINE_HOME/data/html_templates/dbase_manage/record_editor/editor/editor.html template file. Find the place where the drop-down menu is defined (it begins <select name="words_to_add"...) and add a new option. Here's an example of what an option looks like:
<option value="show_words_to_add?file=k12_su.txt&field_code=su">K12: subjects</option>
The value part of the option is actually the URL of a CGI script that will be run. You will have to change the parameter file=k12_su.txt so that it names your new file instead of k12_su.txt. You also have to set the field_code option depending on whether you want to update the Subjects field (use field_code=su) or the Keywords field (use field_code=kw). You will also want to change the option label from K12: subjects to a name which is more appropriate to your term list.