NAME

TCB::Internal - shared functions for TCB scripts


SYNOPSIS

  use CGI::SHTML;
  use TCB::Internal;
  $HTMLHEAD = \&tbhtml_head;
  $HTMLFOOT = \&tbhtml_foot;
  $TITLE = "Testing Page";  
  print CGI->header(), &$HTMLHEAD($TITLE), "\n";
  print "<h2>$TITLE</h2>\n";
  print &$HTMLFOOT();
  exit(0);


DESCRIPTION

This pseudo-module is used by TCB scripts to offer a consistent user interface with the outside world. The above script is an example of how to use it.


FUNCTIONS

Main Functions

Uses the default configurations found in /home/webserver/conf/shtml.pm with CGI::SHTML to load pages.

tbhtml_head ( TITLE, [ ARGS ] )
Standard TCB web headers. Uses the internal headers as the default. TITLE is the title of the page (appears in the headers and the top of the page); ARGS are extra arguments to pass into CGI's start_html().

tbhtml_foot ( [ARGS] )
Standard TCB web footers. Uses the internal footers as the default.

Section Functions

The following routines help run individual sections of the TCB web site. More can be added regularly.

tbhtml_head_database ( TITLE )
Prints headers for standard DBIx::Frame databases. Includes an html_menu() and a link back to the main database in the sidebar, plus whatever the standard sidebar was.

tbhtml_foot_database ( [ DEBUG [, ARGS ]] )
Prints headers for standard DBIx::Frame databases. Basically the same as html_foot(), except it includes a couple of extra table close tags.

tbhtml_head_pub ( TITLE, [ ARGS ] )
tbhtml_foot_pub ( [ARGS] )
Uses CGI::SHTML to print off the headers and footers for the publications section. ARGS is used to pass extra information into the headers/footers, such as stylesheet information. Returns the actual text of the headers and footers.

tbhtml_head_service ( TITLE, [ ARGS ] )
tbhtml_foot_service ( [ARGS] )
Uses CGI::SHTML to print off the headers and footers for the service section. ARGS is used to pass extra information into the headers/footers, such as stylesheet information. Returns the actual text of the headers and footers.

tbhtml_head_internal ( TITLE, [ ARGS ] )
tbhtml_foot_internal ( [ARGS] )
Uses CGI::SHTML to print off the headers and footers for the internal section. ARGS is used to pass extra information into the headers/footers, such as stylesheet information. Returns the actual text of the headers and footers.

Compatibility Functions

These aren't being used anymore, to the best of my knowledge.

tbhtml_head_nosidebar - same as tbhtml_head_internal
tbhtml_foot_nosidebar - same as tbhtml_foot_internal
tbhtml_head_clean - same as tbhtml_head_internal
tbhtml_foot_clean - same as tbhtml_foot_internal
These functions may go away eventually.


NOTES

The file locations of these things are not very consistent. Most scripts are using /home/DBI/Shared/tbinternal.pm; better scripts are using /home/webserver/conf/tbinternal.pm. It would be best if we just put this into the main tree and used 'use TCB::Internal' instead.

Now uses CGI::SHTML; therefore this may be usable for others, and perhaps distributable.


REQUIREMENTS

CGI::SHTML


AUTHOR

Tim Skirvin <tskirvin@ks.uiuc.edu>


LICENSE

This code is distributed under the University of Illinois Open Source License. See http://www.ks.uiuc.edu/Development/MDTools/tcb-internal/license.html for details.


HOMEPAGE

http://www.ks.uiuc.edu/Development/MDTools/tcb-internal/


COPYRIGHT

Copyright 2000-2004 by the University of Illinois Board of Trustees and Tim Skirvin <tskirvin@ks.uiuc.edu>.