static_format_comments_and_links

one of the documented procedures in this installation of the ACS
Usage:
static_format_comments_and_links   moby_list
What it does:
Takes list of comment_bytes link_bytes options_list comment_option link_option and produces HTML fragment to stick at bottom of page.
Defined in: /web/philip/tcl/ad-html.tcl

Source code:


    if [empty_string_p $moby_list] {
	return ""
    }
    set comment_bytes [lindex $moby_list 0]
    set link_bytes [lindex $moby_list 1]
    set options_list [lindex $moby_list 2]
    set comment_option [lindex $moby_list 3]
    set link_option [lindex $moby_list 4]
    if { [empty_string_p $comment_bytes] && [empty_string_p $link_bytes] } {
	if { [llength $options_list] > 0 } {
	    set centered_options "<center>[join $options_list " | "]</center>"
	} else {
	    set centered_options ""
	}
	return $centered_options
    } elseif { ![empty_string_p $comment_bytes] && [empty_string_p $link_bytes] } {
	# there are comments but no links
	return "<center><h3>Reader's Comments</h3></center>
	$comment_bytes
	<center>[join $options_list " | "]</center>"
    } elseif { [empty_string_p $comment_bytes] && ![empty_string_p $link_bytes] } {
	# links but no comments 
	return "<center><h3>Related Links</h3></center>
	<ul>$link_bytes</ul>
	<center>[join $options_list " | "]</center>"
    } else {
	# comments and links 
	return "<center><h3>Reader's Comments</h3></center>
	$comment_bytes
	<center>
	$comment_option
	</center>
	<center><h3>Related Links</h3></center>
	<ul>$link_bytes</ul>
	<center>
	$link_option
	</center>"
    }


philg@mit.edu