#! /usr/local/bin/perl5 # # virlibhtml.perl # The html-style definitions for Virtual Library documents # (c) 1999 M. Hahsler # # 5-Oct-1997 (AGS): Reintroduced time-stamp for page generation time. # Suggested by Krziwanek and Samsegger: # Rationale: When developping pages, allows determination # whether page comes from cache or is new. # 8-Oct-1997 (AGS): Bug minutes equals month elimenated. # Bug detected by Samsegger: # 20-Apr-1998 (MFH): make_html_title for dynamic VU link-lists # call PERL5 for better debugging ### Override Navigation Icons ############################### # $ICONSERVER = 'http://miss.wu-wien.ac.at/~virlib/icons'; ### Adjust Icon Sizes ################## %iconsizes = ( 'up' ,'WIDTH=24 HEIGHT=24', 'next','WIDTH=24 HEIGHT=24', 'previous','WIDTH=24 HEIGHT=24', 'next_group' ,'WIDTH=81 HEIGHT=24', 'previous_group','WIDTH=107 HEIGHT=24', 'change_begin','WIDTH=104 HEIGHT=24', 'change_end','WIDTH=104 HEIGHT=24', 'change_delete','WIDTH=109 HEIGHT=24', 'contents','WIDTH=65 HEIGHT=24', 'index','WIDTH=43 HEIGHT=24' ); ### Redefine Background Colour ############################## # Always specify the whole set to override unfortunate user settings # $BGCOLOR = 'bgcolor="#FFFFFF" text="#000000" link="#0000AE"'. ' vlink="#7361FF" alink="#9945EA"'; $STATIC_DOC=""; if ($FILE) {$STATIC_DOC="\n";} ### Define WU-Header ####################################### $HTMLHEADER = ""; ### The local version of make_head_and_body ################# sub make_head_and_body { local($title) = @_; local($version,$isolanguage) = ($HTML_VERSION, 'EN'); local(%isolanguages) = ('english', 'EN', 'USenglish', 'EN.US', 'original', 'EN', 'german', 'DE', 'austrian', 'DE.AT','french', 'FR'); $isolanguage = $isolanguages{$default_language}; $isolanguage = 'EN' unless $isolanguage; $title =~ s/<[^>]*>//g; # Remove HTML tags "\n" . "\n" . "\n\n" . $title . "\n" . &meta_information($title) . ($charset && $HTML_VERSION ge "2.1" ? "\n" : "" ) . $STATIC_DOC . "\n\n" . $HTMLHEADER; # PB/AGS 15.9.97 Bug for style-sheets for dynamic documents fixed. # AGS 28.5.97 Background # AGS 12.6.97 Header for Institutions. } ### Title for dynamic HTML-pages for the Virtual University (VU) Project # # The argument to this procedure specifies the title for a dynamically # generated HTML-page which contains links from the VU database. sub make_html_title { local($pagetitle) = @_; "

$pagetitle

$DYNAMIC_BUTTONS

"; } ### Anchor Definition ####################################### sub my_data { local(@lt) = localtime; local($s,$min,$h,$d,$m,$y) = @lt[0,1,2,3,4,5]; sprintf("%d/%d/%d %d:%d:%d", $m+1, $d, 1900+$y, $h, $min, $s); } $my_date = &my_data; $PRE_ADDRESS='


'; #"

$DYNAMIC_BUTTONS

"; if ($TITLES_LANGUAGE eq "german") { $ADDRESS =qq* $COPYRIGHT Abteilung für Informationswirtschaft, Living Lectures - Virtual University, The Virtual Library, WU-Wien. $my_date*; }else{ $ADDRESS =qq* *. ($COPYRIGHT_EN || $COPYRIGHT) .qq* Department for Information Business, Living Lectures - Virtual University, The Virtual Library, Vienna University of Economics and Business Administration. $my_date*; } ### Meta Information ##################################################### # # This information will be inserted in the HEAD of the generated # HTML file. It can be used by automatic indexing scripts (eg # site-index.pl at http://www.ai.mit.edu/tools/site-index.html) # You can change the description, keywords, etc. values. sub meta_information { local($_) = @_; local($COP) = $COPYRIGHT; $COP =~ s/<[^>]*>//g; $COP =~ s/©/(c)/; $COP =~ s/©/(c)/; $COP =~ s/,\s*$//; $COP =~ s/\n/ /g; # Cannot have nested HTML tags... do { s/<[^>]*>//g; "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" } if $_; } ### Navigation Panel ########################################################## # # The navigation panel is constructed out of buttons and section titles. # These can be configured in any combination with arbitrary text and # HTML tags interspersed between them. # The buttons available are: # $PREVIOUS - points to the previous section # $UP - points up to the "parent" section # $NEXT - points to the next section # $NEXT_GROUP - points to the next "group" section # $PREVIOUS_GROUP - points to the previous "group" section # $CONTENTS - points to the contents page if there is one # $INDEX - points to the index page if there is one # # If the corresponding section exists the button will contain an # active link to that section. If the corresponding section does # not exist the button will be inactive. # # Also for each of the $PREVIOUS $UP $NEXT $NEXT_GROUP and $PREVIOUS_GROUP # buttons there are equivalent $PREVIOUS_TITLE, $UP_TITLE, etc variables # which contain the titles of their corresponding sections. # Each title is empty if there is no corresponding section. # # The subroutine below constructs the navigation panels in each page. # Feel free to mix and match buttons, titles, your own text, your logos, # and arbitrary HTML (the "." is the Perl concatenation operator). sub top_navigation_panel { # Now add a few buttons with a space between them "$PREVIOUS $UP $NEXT $CONTENTS $INDEX $CUSTOM_BUTTONS" . "
\n" . # Line break # ... and the ``previous'' title ($PREVIOUS_TITLE ? " Previous: $PREVIOUS_TITLE\n" : undef) . # Similarly with the ``up'' title ... ($UP_TITLE ? "Up: $UP_TITLE\n" : undef) . # If ``next'' section exists, add its title to the navigation panel ($NEXT_TITLE ? " Next: $NEXT_TITLE\n" : undef) . # Line Break, horizontal rule (3-d dividing line) and new paragraph "

\n" } sub bot_navigation_panel { # Start with a horizontal rule (3-d dividing line) "


". # Now add a few buttons with a space between them "$PREVIOUS $UP $NEXT $CONTENTS $INDEX $CUSTOM_BUTTONS" . "
\n" . # Line break # ... and the ``previous'' title ($PREVIOUS_TITLE ? " Previous: $PREVIOUS_TITLE\n" : undef) . # Similarly with the ``up'' title ... ($UP_TITLE ? "Up: $UP_TITLE\n" : undef) . # If ``next'' section exists, add its title to the navigation panel ($NEXT_TITLE ? " Next: $NEXT_TITLE\n" : undef) } 1; # This must be the last line