ad_decorate_side

one of the documented procedures in this installation of the ACS
Usage:
ad_decorate_side
What it does:
IF side graphics are enabled AND a graphics URL is spec'd for the current THEN this returns an IMG ALIGN=RIGHT with width and height tags. Otherwise return empty string.
Defined in: /web/philip/tcl/ad-sidegraphics.tcl

Source code:


    # we use a GLOBAL variable (shared by procs in a thread) as opposed to 
    # an ns_share (shared by many threads)
    global sidegraphic_displayed_p
    if ![ad_parameter EnabledP sidegraphics 0] {
	return ""
    }
    # let's see if this URL even has a side graphic
    set graphic_url [ad_parameter [ns_conn url] sidegraphics]
    if [empty_string_p $graphic_url] {
	# no side graphic for this particular page
	return ""
    }
    # OK, the system is enabled and we've got a side graphic for this URL
    # we want to get WIDTH and HEIGHT tags
    set width_height_list [util_memoize "ad_image_size $graphic_url" 900]
    if ![empty_string_p $width_height_list] {
	set width [lindex $width_height_list 0]
	set height [lindex $width_height_list 1]
	set extra_tags "width=$width height=$height hspace=10 vspace=10"
    } else {
	set extra_tags ""
    }
    set sidegraphic_displayed_p 1
    return "<img align=right $extra_tags hspace=20 src=\"$graphic_url\">"


philg@mit.edu