/sources/form_templates.php

Description
Functions
form_input_all_and_not (line 1072)

Get the tempcode for a complex input that chooses partials from a list ('all', 'all-except-these', or 'these').

  • return: The input field
tempcode form_input_all_and_not (mixed $pretty_name, mixed $description, string $base, tempcode $list, [string $type = '+'], [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • string $base: The base name which this input field is for
  • tempcode $list: A list culmulation to select against
  • string $type: The current type of partial selection
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_author (line 372)

Get the tempcode for a author/username input line.

  • return: The input field
tempcode form_input_author (mixed $pretty_name, mixed $description, ID_TEXT $name, ?string $default, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?string $default: The default value for this input field (NULL: blank)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_codename (line 293)

Get the tempcode for a codename input line.

  • return: The input field
tempcode form_input_codename (mixed $pretty_name, mixed $description, ID_TEXT $name, ?string $default, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?string $default: The default value for this input field (NULL: blank)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_colour (line 436)

Get the tempcode for a colour input.

  • return: The input field
tempcode form_input_colour (mixed $pretty_name, mixed $description, ID_TEXT $name, ?string $default, boolean $required, [?integer $tabindex = NULL], [boolean $true_field = false])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?string $default: The default value for this input field (NULL: blank)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • boolean $true_field: Whether to display as a true/standard ocPortal input field, neatly along other different kinds of input fields
form_input_date (line 1318)

Get the tempcode for a date input.

  • return: The input field
tempcode form_input_date (mixed $pretty_name, mixed $description, ID_TEXT $stub, boolean $null_ok, boolean $null_default, boolean $do_time, [?mixed $default_time = NULL], [integer $total_years_to_show = 10], [?integer $year_start = NULL], [?integer $tabindex = NULL], [?boolean $required = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $stub: The parameter name stub for this input field (it's actually a composite field, read in by passing this stub to post_param_date)
  • boolean $null_ok: Whether this is a required field
  • boolean $null_default: Whether this field is empty by default
  • boolean $do_time: Whether to input time for this field also
  • ?mixed $default_time: The default timestamp to use (either TIME or array of time components) (NULL: now)
  • integer $total_years_to_show: The number of years to allow selection from (all into the future, as this field type is not meant for inputting past dates)
  • ?integer $year_start: The year to start from (NULL: this year)
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • ?boolean $required: Whether this is rendered in pink as a required field (NULL: depend on $null_ok)
form_input_date__scheduler (line 1293)

Get the tempcode for a date input, or if cron is not on, return blank.

  • return: The input field
tempcode form_input_date__scheduler (mixed $pretty_name, mixed $description, ID_TEXT $stub, boolean $null_ok, boolean $null_default, boolean $do_time, [?mixed $default_time = NULL], [integer $total_years_to_show = 10], [?integer $year_start = NULL], [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $stub: The parameter name stub for this input field (it's actually a composite field, read in by passing this stub to post_param_date)
  • boolean $null_ok: Whether this is a required field
  • boolean $null_default: Whether this field is empty by default
  • boolean $do_time: Whether to input time for this field also
  • ?mixed $default_time: The default timestamp to use (either TIME or array of time components) (NULL: now)
  • integer $total_years_to_show: The number of years to allow selection from (all into the future, as this field type is not meant for inputting past dates)
  • ?integer $year_start: The year to start from (NULL: this year)
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_email (line 411)

Get the tempcode for a email-address input line.

  • return: The input field
tempcode form_input_email (mixed $pretty_name, mixed $description, ID_TEXT $name, ?string $default, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?string $default: The default value for this input field (NULL: blank)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_float (line 1489)

Get the tempcode for a float-only input.

  • return: The input field
tempcode form_input_float (mixed $pretty_name, mixed $description, ID_TEXT $name, ?float $default, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?float $default: The default value for this input field (NULL: no default)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_huge (line 781)

Get the tempcode for a huge text input (textarea).

  • return: The input field
tempcode form_input_huge (mixed $pretty_name, mixed $description, ID_TEXT $name, string $default, boolean $required, [?integer $tabindex = NULL], [integer $rows = 20], [mixed $description_side = ''], [boolean $scrolls = false])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • string $default: The default value for this input field
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • integer $rows: The number of rows to use
  • mixed $description_side: A secondary side description for this input field
  • boolean $scrolls: Whether the field scrolls
form_input_huge_comcode (line 733)

Get the tempcode for a huge comcode-enabled text input (textarea). These need extra space to fit. This function is also used as an automatic replacement for form_input_text_comcode if WYSIWYG is available (as WYSIWYG needs more space too)

  • return: The input field
tempcode form_input_huge_comcode (mixed $pretty_name, mixed $description, ID_TEXT $name, string $default, boolean $required, [?integer $tabindex = NULL], [integer $rows = 20], [mixed $description_side = ''], [?tempcode $default_parsed = NULL], [boolean $scrolls = false])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • string $default: The default value for this input field
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • integer $rows: The number of rows to use
  • mixed $description_side: A secondary side description for this input field
  • ?tempcode $default_parsed: The parsed Comcode. (NULL: calculate)
  • boolean $scrolls: Whether the field scrolls
form_input_huge_list (line 1032)

Get the tempcode for a huge listbox.

  • return: The input field
tempcode form_input_huge_list (mixed $pretty_name, mixed $description, ID_TEXT $name, tempcode $content, [?integer $tabindex = NULL], [boolean $inline_list = false], [boolean $required = true])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • tempcode $content: The list entries for our list
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • boolean $inline_list: Whether this is an inline displayed list as opposed to a dropdown
  • boolean $required: Whether this is required
form_input_integer (line 1466)

Get the tempcode for an integer-only input.

  • return: The input field
tempcode form_input_integer (mixed $pretty_name, mixed $description, ID_TEXT $name, ?integer $default, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?integer $default: The default value for this input field (NULL: no default)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_line (line 318)

Get the tempcode for a text input line.

  • return: The input field
tempcode form_input_line (mixed $pretty_name, mixed $description, ID_TEXT $name, ?string $default, boolean $required, [?integer $tabindex = NULL], [?integer $_maxlength = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?string $default: The default value for this input field (NULL: blank)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • ?integer $_maxlength: The maximum length of the field (NULL: default 255)
form_input_line_comcode (line 499)

Get the tempcode for a comcode-enabled text input line.

  • return: The input field
tempcode form_input_line_comcode (mixed $pretty_name, mixed $description, ID_TEXT $name, ?string $default, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?string $default: The default value for this input field (NULL: blank)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_line_multi (line 527)

Get the tempcode for a DHTML input field that takes multiple lines. A new line is added when the prior one isn't blank.

  • return: The input field
tempcode form_input_line_multi (mixed $pretty_name, mixed $description, ID_TEXT $name, array $default_array, integer $num_required, [?integer $tabindex = NULL], [string $class = 'line'])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The base parameter name which this input field is for (as this takes multiple parameters, they are named <name><x>). This name must end with '_'.
  • array $default_array: An array of lines to use as default (at least this many lines, filled by this array, will be presented by default)
  • integer $num_required: The minimum number of inputs allowed.
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • string $class: CSS class for input.
form_input_list (line 955)

Get the tempcode for a listbox.

  • return: The input field
tempcode form_input_list (mixed $pretty_name, mixed $description, ID_TEXT $name, tempcode $content, [?integer $tabindex = NULL], [boolean $inline_list = false], [boolean $required = true])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • tempcode $content: The list entries for our list
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • boolean $inline_list: Whether this is an inline displayed list as opposed to a dropdown
  • boolean $required: Whether this is required
form_input_multi_list (line 1052)

Get the tempcode for a listbox with multiple selections.

  • return: The input field
tempcode form_input_multi_list (mixed $pretty_name, mixed $description, ID_TEXT $name, tempcode $content, [?integer $tabindex = NULL], [integer $size = 5])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • tempcode $content: The list entries for our list
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • integer $size: How much space the list takes up
form_input_page_link (line 469)

Get the tempcode for a page-link input.

  • return: The input field
tempcode form_input_page_link (mixed $pretty_name, mixed $description, ID_TEXT $name, ?string $default, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?string $default: The default value for this input field (NULL: blank)
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_password (line 803)

Get the tempcode for a password input.

  • return: The input field
tempcode form_input_password (mixed $pretty_name, mixed $description, ID_TEXT $name, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_picture_choose_specific (line 1124)

Get the tempcode to choose a picture from the given list of images in the theme image system, with sub-categorisation.

  • return: The input field
tempcode form_input_picture_choose_specific (mixed $pretty_name, mixed $description, ID_TEXT $name, array $ids, [?URLPATH $selected_url = NULL], [?string $selected_code = NULL], [integer $per_row = 10], [?integer $tabindex = NULL], [boolean $allow_none = false], [?object $db = NULL], [?ID_TEXT $theme = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • array $ids: A list of image IDs (codes) we can choose from
  • ?URLPATH $selected_url: The currently selected entry in our picture choosing, by URL (NULL: none)
  • ?string $selected_code: The currently selected entry in our picture choosing, by code (NULL: none)
  • integer $per_row: The number of pictures to show per row
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • boolean $allow_none: Whether to allow the selection of 'no' picture
  • ?object $db: The database connection to the OCF install we are choosing images from (NULL: site db)
  • ?ID_TEXT $theme: Theme to use (NULL: current theme)
form_input_radio (line 1097)

Get the tempcode for a radio group.

  • return: The input field
tempcode form_input_radio (mixed $pretty_name, mixed $description, tempcode $content, [boolean $required = false], [boolean $picture_contents = false], [string $selected_path = ''])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • tempcode $content: The radio buttons for our radio group
  • boolean $required: Whether a radio selection is required
  • boolean $picture_contents: Whether this is a picture-based radio list
  • string $selected_path: Default value (only appropriate if has picture contents)
form_input_radio_entry (line 1590)

Get the tempcode for a radio input. (You would gather together the outputs of several of these functions, then put them in as the $content in a form_input_radio function call).

  • return: The input field
tempcode form_input_radio_entry (string $name, string $value, [boolean $selected = false], [mixed $text = ''], [?integer $tabindex = NULL], [string $description = ''])
  • string $name: The name of the radio button group this will be put in (i.e. the name the value presented here will be possibly matched against)
  • string $value: The value for this entry
  • boolean $selected: Whether this entry is selected by default or not
  • mixed $text: The text associated with this choice (blank: just use name for text)
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • string $description: An additional long description (blank: no description)
form_input_text (line 647)

Get the tempcode for a text input (textarea).

  • return: The input field
tempcode form_input_text (mixed $pretty_name, mixed $description, ID_TEXT $name, string $default, boolean $required, [?integer $tabindex = NULL], [boolean $scrolls = false])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • string $default: The default value for this input field
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • boolean $scrolls: Whether the field scrolls
form_input_text_comcode (line 674)

Get the tempcode for a comcode-enabled text input (textarea).

  • return: The input field
tempcode form_input_text_comcode (mixed $pretty_name, mixed $description, ID_TEXT $name, string $default, boolean $required, [?integer $tabindex = NULL], [boolean $force_non_wysiwyg = false], [mixed $description_side = ''], [?tempcode $default_parsed = NULL], [boolean $scrolls = false])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • string $default: The default value for this input field
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • boolean $force_non_wysiwyg: Force non-WYSIWYG and non default-Comcode parsing
  • mixed $description_side: A secondary side description for this input field
  • ?tempcode $default_parsed: The parsed Comcode. (NULL: calculate)
  • boolean $scrolls: Whether the field scrolls
form_input_text_multi (line 564)

Get the tempcode for a DHTML input field that takes multiple textareas. A new textarea is added when the prior one isn't blank.

  • return: The input field
tempcode form_input_text_multi (mixed $pretty_name, mixed $description, ID_TEXT $name, array $default_array, integer $num_required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The base parameter name which this input field is for (as this takes multiple parameters, they are named <name><x>). This name must end with '_'.
  • array $default_array: An array of texts to use as default (at least this many textareas, filled by this array, will be presented by default)
  • integer $num_required: The minimum number of textareas allowed.
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_tick (line 823)

Get the tempcode for a checkbox input.

  • return: The input field
tempcode form_input_tick (mixed $pretty_name, mixed $description, ID_TEXT $name, boolean $ticked, [?integer $tabindex = NULL], [ID_TEXT $value = '1'])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • boolean $ticked: Whether this is ticked by default
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • ID_TEXT $value: The value the checkbox passes when ticked
form_input_tree_list (line 979)

Get the tempcode for an AJAX-powered tree listbox.

  • return: The input field
tempcode form_input_tree_list (mixed $pretty_name, mixed $description, ID_TEXT $name, ?ID_TEXT $root_id, string $hook, array $options, boolean $required, [?string $default = NULL], [boolean $use_server_id = false], [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?ID_TEXT $root_id: The ID to do under (NULL: root)
  • string $hook: The ajax tree-list hook that drives our data
  • array $options: A map of special options
  • boolean $required: Whether this is a required input field
  • ?string $default: The default value for the field (NULL: none)
  • boolean $use_server_id: Whether to use the server-ID in the list instead of the ID in the list
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_upload (line 895)

Get the tempcode for a file upload input.

  • return: The input field
tempcode form_input_upload (mixed $pretty_name, mixed $description, ID_TEXT $name, boolean $required, [?string $default = NULL], [?integer $tabindex = NULL], [boolean $swfupload = true])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • boolean $required: Whether this is a required input field
  • ?string $default: The default value for the field (NULL: none) (blank: none)
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
  • boolean $swfupload: Whether swf-upload-style is preferred
form_input_upload_multi (line 929)

Get the tempcode for a multiple file upload input.

  • return: The input field
tempcode form_input_upload_multi (mixed $pretty_name, mixed $description, string $name, boolean $required, [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • string $name: The base name which this input field is for
  • boolean $required: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_username (line 345)

Get the tempcode for a username input line.

  • return: The input field
tempcode form_input_username (mixed $pretty_name, mixed $description, ID_TEXT $name, ?string $default, boolean $required, [boolean $needs_match = true], [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The name which this input field is for
  • ?string $default: The default value for this input field (NULL: blank)
  • boolean $required: Whether this is a required input field
  • boolean $needs_match: Whether it is required than a valid username is given
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_username_multi (line 602)

Get the tempcode for a username input line.

  • return: The input field
tempcode form_input_username_multi (mixed $pretty_name, mixed $description, ID_TEXT $name, array $default_array, integer $num_required, [boolean $needs_match = true], [?integer $tabindex = NULL])
  • mixed $pretty_name: A human intelligible name for this input field
  • mixed $description: A description for this input field
  • ID_TEXT $name: The base parameter name which this input field is for (as this takes multiple parameters, they are named <name><x>). This name must end with '_'.
  • array $default_array: An array of lines to use as default (at least this many lines, filled by this array, will be presented by default)
  • integer $num_required: The minimum number of inputs allowed
  • boolean $needs_match: Whether this is a required input field
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
form_input_various_ticks (line 843)

Get the tempcode for a bank of tick boxes.

  • return: The input field
tempcode form_input_various_ticks (array $options, mixed $description, [?integer $_tabindex = NULL], [mixed $_pretty_name = ''], [boolean $simple_style = false])
  • array $options: A list of tuples: (prettyname, name, value, description)
  • mixed $description: A description for this input field
  • ?integer $_tabindex: The tab index of the field (NULL: not specified)
  • mixed $_pretty_name: A human intelligible name for this input field (blank: use default)
  • boolean $simple_style: Whether to place each tick on a new line
get_attachments (line 76)

Get what we need to get attachments in a form-field interface.

  • return: A pair: the attachments UI (tempcode), the hidden attachment field
array get_attachments (ID_TEXT $posting_field_name)
  • ID_TEXT $posting_field_name: The name of the field attachments are for
get_comcode_editor (line 184)

Creates a Comcode editor.

  • return: The Comcode editor
tempcode get_comcode_editor ([string $field_name = 'post'], [boolean $cut_down = false])
  • string $field_name: The name of the field the editor is working for
  • boolean $cut_down: Whether to make a cut-down version
get_field_restrict_property (line 258)

Get the value of a scoped field restriction property. Returns "first-found".

  • return: The property (NULL: non-existant)
?string get_field_restrict_property (string $property, string $field, [?string $page = NULL], [?string $type = NULL])
  • string $property: The name of the property
  • string $field: The name of the field it's scoped for
  • ?string $page: The page name scoped for (NULL: current page)
  • ?string $type: The page type scoped for (NULL: current type)
get_form_field_tabindex (line 1568)

Helper function for tab-index linearisation (serves as a filter).

  • return: Used tab-index
integer get_form_field_tabindex ([?integer $tabindex = NULL])
  • ?integer $tabindex: Requested tab-index (NULL: no specific request)
get_posting_form (line 125)

Creates a posting form, with attachment support.

  • return: The posting form
tempcode get_posting_form (mixed $submit_name, LONG_TEXT $post, mixed $post_url, tempcode $hidden_fields, tempcode $specialisation, [?mixed $post_comment = NULL], [string $extra = ''], [?tempcode $specialisation2 = NULL], [?tempcode $default_parsed = NULL], [?string $javascript = NULL], [?integer $tabindex = NULL])
  • mixed $submit_name: The title of the form submission button
  • LONG_TEXT $post: The default post to put in.
  • mixed $post_url: Where the form is sent (URLPATH or Tempcode).
  • tempcode $hidden_fields: A form_input_hidden buildup of hidden fields (additional parameters sent to the target URL).
  • tempcode $specialisation: A buildup of leading extra fields, in a format compatible with the templates used by this function.
  • ?mixed $post_comment: The post comment (string or Tempcode). This gives information about how you should post. (NULL: no post comment)
  • string $extra: Extra info to put on the posting form
  • ?tempcode $specialisation2: A buildup of trailing extra fields, in a format compatible with the templates used by this function. (NULL: none)
  • ?tempcode $default_parsed: The parsed Comcode. (NULL: calculate)
  • ?string $javascript: Javascript code to include (NULL: none)
  • ?integer $tabindex: The tab index of the field (NULL: not specified)
handle_conflict_resolution (line 1542)

Look for editing conflicts, and setup editing pinging.

  • return: A pair: warning details, ping url
array handle_conflict_resolution ([?ID_TEXT $id = NULL], [boolean $only_staff = false])
  • ?ID_TEXT $id: The ID we're editing (NULL: get from param, 'id')
  • boolean $only_staff: Whether to only care about staff conflicts
handle_max_file_size (line 47)

Insert hidden data for the maximum file size of form fields.

void handle_max_file_size (tempcode &$hidden, [ID_TEXT $regular_max_size_type = 'file'])
  • tempcode &$hidden: Hidden fields
  • ID_TEXT $regular_max_size_type: Code representing the media types we are using limits for
init__form_templates (line 24)

Standard code module initialisation function.

void init__form_templates ()
wrap_image_radio_list (line 1257)

Get the tempcode for a radio list of pictures.

  • return: The input field
tempcode wrap_image_radio_list (array $entries, integer $per_row)
  • array $entries: A list of image radio buttons
  • integer $per_row: The number to show per row
wysiwyg_on (line 244)

Find whether WYSIWYG is currently on.

  • return: Whether it is
boolean wysiwyg_on ()
_form_input (line 1516)

Helper function to show an input field.

  • return: The field
tempcode _form_input (ID_TEXT $name, mixed $pretty_name, mixed $description, tempcode $input, boolean $required, [boolean $comcode = false], [?integer $tabindex = NULL], [boolean $w = false], [boolean $skip_label = false], [mixed $description_side = ''])
  • ID_TEXT $name: The codename for this field
  • mixed $pretty_name: The human-readable name for this field
  • mixed $description: The human-readable description for this field
  • tempcode $input: The actual raw input field
  • boolean $required: Whether it is required that this field be filled in
  • boolean $comcode: Whether this field may contain comcode
  • ?integer $tabindex: The tab index (NULL: none specified)
  • boolean $w: Whether it is a textarea field
  • boolean $skip_label: Whether to skip displaying a label for the field
  • mixed $description_side: A secondary side description for this input field

Documentation generated on Sun, 02 Jan 2011 23:14:50 +0000 by phpDocumentor 1.4.3