Name

getDescriptions — returns a hash reference of key pairs used to build an HTML select widget

Synopsis

my $desc = $slashdb->getDescriptions($codetype);
my $desc = $slashdb->getDescriptions($codetype, $option);
my $desc = $slashdb->getDescriptions($codetype, $option, $cache);
my $desc = $slashdb->getDescriptions($codetype, $option, $cache, $altdescs);

getDescriptions builds and returns a hash reference that can be used in an HTML select statement. This provides an easy way to allow users to select from several configurable options, stored in the database. The first parameter, $codetype, is a string used as a key to a hash of common descriptions. This can be either one of the descriptions in the following list or the hash passed in as the optional $altdescs parameter. The $option parameter is used to clarify some of these descriptions further. If the $cache value is true, the function will consult the database directly, instead of consulting a cache for the descriptions.

sortcodes

The comment sorting styles.

generic

Any type of entry in the code_param table. The $optional parameter must be a valid type.

statuscodes

The valid Story status codes (archived, normal, or refreshing).

blocktype

The available block types (color, static, portald).

tzcodes

The available time zone codes (MDT, GMT) and their offsets from GMT, in seconds.

tzdescription

The available time zone codes and longer descriptions.

dateformats

Examples of the available date-formatting options.

datecodes

The strftime() formats ...

Get Running Weblogs with Slash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.