[Bio] / FigWebServices / DocDirectory.cgi Repository:
ViewVC logotype

View of /FigWebServices/DocDirectory.cgi

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.5 - (download) (annotate)
Wed Oct 12 21:03:16 2005 UTC (14 years, 7 months ago) by overbeek
Branch: MAIN
CVS Tags: caBIG-00-00-00
Changes since 1.4: +1 -1 lines
Broad minor fixes to make the SEED use relative paths throughout.

(The motivation this is to fully enable hiding the actual location of a running SEED system behind a web proxy so that things like NMPDR protein page references can be made stable across multiple releases).

This involved things like the following:

Changing $cgi->url() to $cgi->url(-relative => 1)
Changing $cgi->self_url() to $cgi->url(-relative => 1, -query => 1, -path_info => 1)

Changing the definition of FIG::cgi_url() to return "." (this may break something, but I haven't found it yet).

#!/usr/bin/perl -w

use FIG;

    # Print the HTML header.
    print "CONTENT-TYPE: text/html\n\n";

=head1 Documentation Directory

This script generates the directory of documentation modules for FIG. The user can
click on a module name and it will automatically pop up the documentation for that


use strict;
use CGI;
use Tracer;
use PageBuilder;

#my $dir = "$FIG_Config::cgi_base/Html/pod_docs";
# I don't see how the above could have worked. Fixing below
# Apparently I mis-interpreted what some of the FIG_Config
# parameters meant. Sorry.
# Bruce

my $dir = "$FIG_Config::fig/CGI/Html/pod_docs";
my $links = "";
# Open the documentation directory, and build a table of contents for it.
if (-d $dir) {
    my @files = sort (Tracer::OpenDir($dir, 1));
    for my $file (@files) {
        if ($file =~ /^(.+)\.html$/) {
            my $fileName = $1;
            my $cgi = &FIG::cgi_url(-relative => 1);
            $links .= "<a href=\"$cgi/Html/pod_docs/$file\" target=\"mainFrame\">$fileName</a><br>\n";
    print PageBuilder::Build("<$FIG_Config::fig/CGI/Html/DirectoryTemplate.html",
                             { index => $links });


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3