deprecated-procs.tcl

Provides a collection of deprecated procs to provide backward compatibility for sites who have not yet removed calls to the deprecated functions. In order to skip loading of deprecated code, use the following snippet in your config file ns_section ns/server/${server}/acs ns_param WithDeprecatedCode 0

Location:
packages/acs-templating/tcl/deprecated-procs.tcl
CVS Identification:
$Id: deprecated-procs.tcl,v 1.12 2024/11/14 12:02:03 antoniop Exp $

Procedures in this file

Detailed information

template::form::export (public, deprecated)

 template::form::export
Deprecated. Invoking this procedure generates a warning.

Generates hidden input tags for all values in a form submission. Typically used to create a confirmation page following an initial submission. DEPRECATED: this proc has been superseded by export_vars, which also offers additional features.

Returns:
A string containing hidden input tags for inclusion in a form.
See Also:

Testcases:
No testcase defined.

template::get_enclosing_tag (private, deprecated)

 template::get_enclosing_tag tag
Deprecated. Invoking this procedure generates a warning.

Reach back into the tag stack for the last enclosing instance of a tag. Typically used where the usage of a tag depends on its context, such as the "group" tag within a "multiple" tag. Deprecated, use:

    set tag [template::enclosing_tag <tag-type>]
    set attribute [template::tag_attribute tag <attribute>]
    

Parameters:
tag (required)
The name of the enclosing tag to look for.
See Also:

Testcases:
No testcase defined.

template::get_resource_path (public, deprecated)

 template::get_resource_path
Deprecated. Invoking this procedure generates a warning.

Get the template directory The body is doublequoted, so it is interpreted when this file is read

See Also:

Testcases:
No testcase defined.

template::query::iterate (public, deprecated)

 template::query::iterate statement_name sql body
Deprecated. Invoking this procedure generates a warning.

Parameters:
statement_name (required)
Standard db_api statement name used to hook into query dispatcher
sql (required)
Query to use when processing this command
body (required)
Code body to be execute for each result row of the returned query
See Also:

Testcases:
No testcase defined.

template::util::clear_cookie (public, deprecated)

 template::util::clear_cookie name [ domain ]
Deprecated. Invoking this procedure generates a warning.

Expires an existing cookie.

Parameters:
name (required)
domain (optional)
See Also:

Testcases:
No testcase defined.

template::util::display_value (private, deprecated)

 template::util::display_value ref
Deprecated. Invoking this procedure generates a warning.

a proc used for debugging, just prints out a value to the error log

Parameters:
ref (required)
See Also:
  • use simple "ns_log ...." instead

Testcases:
No testcase defined.

template::util::get_cookie (public, deprecated)

 template::util::get_cookie name [ default_value ]
Deprecated. Invoking this procedure generates a warning.

Retrieve the value of a cookie and return it Return the default if no such cookie exists

Parameters:
name (required)
default_value (optional)
See Also:

Testcases:
No testcase defined.

template::util::get_param (public, deprecated)

 template::util::get_param name [ section ] [ key ]
Deprecated. Invoking this procedure generates a warning.

Retrieve a stored parameter, or "" if no such parameter If section/key are present, read the parameter from the specified section.key in the INI file, and cache them under the given name

Parameters:
name (required)
section (optional)
key (optional)

Testcases:
No testcase defined.

template::util::list_opts (public, deprecated)

 template::util::list_opts [ array_ref ]
Deprecated. Invoking this procedure generates a warning.

Converts an array to an option list DEPRECATED: this proc can be replaced by simple tcl idioms

Parameters:
array_ref (optional, defaults to "opts")
The name of the array in the calling frame containing option-value pairs. Defaults to "opts".
Returns:
A list of option-value pairs suitable for appending to a command.
See Also:
  • plain tcl

Testcases:
No testcase defined.

template::util::multirow_foreach (public, deprecated)

 template::util::multirow_foreach name code_text
Deprecated. Invoking this procedure generates a warning.

runs a block of code foreach row in a multirow. Using "template::multirow foreach" is recommended over this routine.

Parameters:
name (required)
the name of the multirow over which the block of code is iterated
code_text (required)
the block of code in the for loop; this block can reference any of the columns belonging to the multirow specified; with the multirow named "fake_multirow" containing columns named "spanky" and "foobar",to set the column spanky to the value of column foobar use:
set fake_multirow.spanky @fake_multirow.foobar@

note: this block of code is evaluated in the same scope as the .tcl page that uses this procedure

Author:
simon
See Also:

Testcases:
No testcase defined.

template::util::proper_noun (private, deprecated)

 template::util::proper_noun string_ref
Deprecated. Invoking this procedure generates a warning.

capitalizes the first letter of a string

Parameters:
string_ref (required)
Returns:
returns formatted string (UNFINISHED. FIXME.)
See Also:
  • use "string totitle ..."

Testcases:
No testcase defined.

template::util::quote_html (public, deprecated)

 template::util::quote_html html
Deprecated. Invoking this procedure generates a warning.

Quote possible HTML tags in the contents of the html parameter.

Parameters:
html (required)
See Also:
  • ns_quotehtml

Testcases:
No testcase defined.

template::util::server_root (private, deprecated)

 template::util::server_root
Deprecated. Invoking this procedure generates a warning.

uses ns_library to find the server root, may not always be accurate because it essentially asks for the Tcl library path and strips off the last /tcl directory.

See Also:
  • use $::acs::rootdir instead

Testcases:
No testcase defined.

template::util::set_cookie (public, deprecated)

 template::util::set_cookie expire_state name value [ domain ]
Deprecated. Invoking this procedure generates a warning.

Create a cookie with specified parameters. The expiration state may be persistent, session, or a number of minutes from the current time.

Parameters:
expire_state (required)
name (required)
value (required)
domain (optional)
See Also:

Testcases:
No testcase defined.

template::util::set_param (public, deprecated)

 template::util::set_param name value
Deprecated. Invoking this procedure generates a warning.

Set a stored parameter

Parameters:
name (required)
value (required)

Testcases:
No testcase defined.

template::util::set_to_list (public, deprecated)

 template::util::set_to_list set [ args... ]
Deprecated. Invoking this procedure generates a warning.

Turns an ns_set into a key-value list, excluding any number of specified keys. Useful for turning the contents on an ns_set into a form that may be cached or manipulated as a native Tcl data structure. DEPRECATED: this proc can be replaced with trivial ns_set and plain tcl idioms

Parameters:
set (required)
A reference to an ns_set.
Returns:
A list in the form { key value key value key value ... }
See Also:
  • ns_set

Testcases:
No testcase defined.

template::util::set_to_vars (public, deprecated)

 template::util::set_to_vars set [ args... ]
Deprecated. Invoking this procedure generates a warning.

Declare local variables for set values DEPRECATED: this proc can be replaced with trivial ns_set and plain tcl idioms

Parameters:
set (required)
A reference to an ns_set.
See Also:
  • ns_set

Testcases:
No testcase defined.

template::util::string_range (private, deprecated)

 template::util::string_range string indices
Deprecated. Invoking this procedure generates a warning.

Parameters:
string (required)
indices (required)
See Also:
  • use "string range instead"

Testcases:
No testcase defined.

template::util::tcl_to_sql_list (public, deprecated)

 template::util::tcl_to_sql_list lst
Deprecated. Invoking this procedure generates a warning.

Convert a Tcl list to a SQL list, for use with the "in" statement. Uses double single quotes to escape single quotes in values. DEPRECATED: NaviServer now provides a native API ns_dbquotelist for this; a tcl-implemented fallback for older NaviServer versions exists in current OpenACS code.

Parameters:
lst (required)
See Also:

Testcases:
No testcase defined.

template::widget::richtext_htmlarea (public, deprecated)

 template::widget::richtext_htmlarea element_reference tag_attributes
Deprecated. Invoking this procedure generates a warning.

Implements the richtext widget, which offers rich text editing options. If the acs-templating.UseHtmlAreaForRichtextP parameter is set to true (1), this will use the htmlArea WYSIWYG editor widget. Otherwise, it will use a normal textarea, with a drop-down to select a format. The available formats are:

  • Enhanced text = Allows HTML, but automatically inserts line and paragraph breaks.
  • Plain text = Automatically inserts line and paragraph breaks, and quotes all HTML-specific characters, such as less-than, greater-than, etc.
  • Fixed-width text = Same as plain text, but conserves spacing; useful for tabular data.
  • HTML = normal HTML.
You can also parameterize the richtext widget with a 'htmlarea_p' attribute, which can be true or false, and which will override the parameter setting.

Parameters:
element_reference (required)
tag_attributes (required)
See Also:

Testcases:
No testcase defined.
[ show source ]