/sources/catalogues.php

Description
Functions
catalogue_category_breadcrumbs (line 990)

Get a formatted XHTML string of the route back to the specified root, from the specified category.

  • return: The tree route
tempcode catalogue_category_breadcrumbs (AUTO_LINK $category_id, [?AUTO_LINK $root = NULL], [boolean $no_link_for_me_sir = true])
  • AUTO_LINK $category_id: The category we are finding for
  • ?AUTO_LINK $root: The root of the tree (NULL: the true root)
  • boolean $no_link_for_me_sir: Whether to include category links at this level (the recursed levels will always contain links - the top level is optional, hence this parameter)
count_catalogue_category_children (line 81)

Count the entries and subcategories underneath the specified category, recursively.

  • return: The number of entries is returned in $output['num_entries'], and the number of subcategories is returned in $output['num_children'], and the (possibly recursive) number of entries is returned in $output['num_entries_children'].
array count_catalogue_category_children (AUTO_LINK $category_id)
  • AUTO_LINK $category_id: The ID of the category for which count details are collected
get_catalogue_category_entry_buildup (line 122)

Get an ordered array of all the entries in the specified catalogue.

  • return: An array containing our built up entries (renderable tempcode), our sort options (a dropdown list of sort options), and our entries (entry records from database, with an additional 'map' field), and the max rows
array get_catalogue_category_entry_buildup (?AUTO_LINK $category_id, ID_TEXT $catalogue_name, ?array $catalogue, ID_TEXT $view_type, ID_TEXT $tpl_set, ?integer $max, ?integer $start, ?array $select, AUTO_LINK $root, [?SHORT_INTEGER $display_type = NULL], [boolean $do_sorting = true], [?array $entries = NULL])
  • ?AUTO_LINK $category_id: The ID of the category for which the entries are being collected (NULL: entries are [and must be] passed instead)
  • ID_TEXT $catalogue_name: The name of the catalogue
  • ?array $catalogue: A database row of the catalogue we are working with (NULL: read it in)
  • ID_TEXT $view_type: The view type we're doing
  • ID_TEXT $tpl_set: The template set we are rendering this category using
  • ?integer $max: The maximum number of entries to show on a single page of this this category (ignored if $select is not NULL) (NULL: all)
  • ?integer $start: The entry number to start at (ignored if $select is not NULL) (NULL: all)
  • ?array $select: The entries to show (NULL: use $start and $max)
  • AUTO_LINK $root: The virtual root for display of this category (-1 means "whatever")
  • ?SHORT_INTEGER $display_type: The display type to use (NULL: lookup from $catalogue)
  • boolean $do_sorting: Whether to perform sorting
  • ?array $entries: A list of entry rows (NULL: select them normally)
get_catalogue_category_html (line 46)

Get tempcode for a catalogue category 'feature box' for the given row

  • return: A box for it, linking to the full page
tempcode get_catalogue_category_html (array $row, [ID_TEXT $zone = '_SEARCH'], [boolean $put_in_box = true])
  • array $row: The database field row of it
  • ID_TEXT $zone: The zone to use
  • boolean $put_in_box: Whether to put it in a box
get_catalogue_category_tree (line 910)

Get a list of maps containing all the subcategories, and path information, of the specified category - and those beneath it, recursively.

  • return: A list of maps for all subcategories. Each map entry containins the fields 'id' (category ID) and 'tree' (tree path to the category, including the categories own title), and 'count' (the number of entries in the category).
array get_catalogue_category_tree (ID_TEXT $catalogue_name, ?AUTO_LINK $category_id, [?tempcode $tree = NULL], [?string $title = NULL], [?integer $levels = NULL], [boolean $addable_filter = false], [boolean $use_compound_list = false])
  • ID_TEXT $catalogue_name: The catalogue name
  • ?AUTO_LINK $category_id: The category being at the root of our recursion (NULL: true root category)
  • ?tempcode $tree: The tree up to this point in the recursion (NULL: blank, as we are starting the recursion)
  • ?string $title: The category name of the $category_id we are currently going through (NULL: look it up). This is here for efficiency reasons, as finding children IDs to recurse to also reveals the childs title
  • ?integer $levels: The number of recursive levels to search (NULL: all)
  • boolean $addable_filter: Whether to only show for what may be added to by the current member
  • boolean $use_compound_list: Whether to make the list elements store comma-separated child lists instead of IDs
get_catalogue_entries_tree (line 786)

Get a list of maps containing all the catalogue entries, and path information, under the specified category - and those beneath it, recursively.

  • return: A list of maps for all categories. Each map entry containins the fields 'id' (category ID) and 'tree' (tree path to the category, including the categories own title), and more.
array get_catalogue_entries_tree (ID_TEXT $catalogue_name, [?AUTO_LINK $submitter = NULL], [?AUTO_LINK $category_id = NULL], [?string $tree = NULL], [?ID_TEXT $title = NULL], [?integer $levels = NULL], [boolean $editable_filter = false])
  • ID_TEXT $catalogue_name: The catalogue name
  • ?AUTO_LINK $submitter: Only show entries submitted by this member (NULL: no filter)
  • ?AUTO_LINK $category_id: The category being at the root of our recursion (NULL: true root)
  • ?string $tree: The tree up to this point in the recursion (NULL: blank, as we are starting the recursion)
  • ?ID_TEXT $title: The name of the $category_id we are currently going through (NULL: look it up). This is here for efficiency reasons, as finding children IDs to recurse to also reveals the childs title
  • ?integer $levels: The number of recursive levels to search (NULL: all)
  • boolean $editable_filter: Whether to only show for what may be edited by the current member
get_catalogue_entry_field_values (line 640)

Get the values for the specified fields, for the stated catalogue entry.

  • return: A list of maps (each field for the entry gets a map), where each map contains 'effective_value' (the value for the field). Some maps get additional fields (effective_value_nontrans, effective_value_pure), depending on the field type
array get_catalogue_entry_field_values (?ID_TEXT $catalogue_name, mixed $entry_id, [?array $only_fields = NULL], [?array $fields = NULL])
  • ?ID_TEXT $catalogue_name: The catalogue name we are getting an entry in (NULL: lookup)
  • mixed $entry_id: The ID of the entry we are getting OR the row
  • ?array $only_fields: A list of fields that we are limiting ourselves to (NULL: get ALL fields)
  • ?array $fields: The database rows for the fields for this catalogue (NULL: find them)
get_catalogue_entry_map (line 454)

Get a map of the fields for the given entry.

  • return: A map of information relating to the entry. The map contains 'FIELDS' (tempcode for all accumulated fields), 'FIELD_x' (for each field x applying to the entry), STAFF_DETAILS, COMMENT_DETAILS, RATING_DETAILS, VIEW_URL, TREE (tempcode category tree to this entry)
array get_catalogue_entry_map (array $entry, array $catalogue, ID_TEXT $view_type, ID_TEXT $tpl_set, [?AUTO_LINK $root = NULL], [?array $fields = NULL], [?array $only_fields = NULL], [boolean $feedback_details = false], [boolean $tree_details = false], [?integer $order_by = NULL])
  • array $entry: A database row of the entry we are working with
  • array $catalogue: A database row of the catalogue we are working with
  • ID_TEXT $view_type: The view type we're doing
  • ID_TEXT $tpl_set: The template set we are rendering this category using
  • ?AUTO_LINK $root: The virtual root for display of this category (NULL: none)
  • ?array $fields: The database rows for the fields for this catalogue (NULL: find them)
  • ?array $only_fields: A list of fields that we are limiting ourselves to (NULL: get ALL fields)
  • boolean $feedback_details: Whether to grab the feedback details
  • boolean $tree_details: Whether to grab the tree details
  • ?integer $order_by: Field index to order by (NULL: none)
grant_catalogue_full_access (line 66)

Grant all usergroups access to the specified catalogue category.

void grant_catalogue_full_access (AUTO_LINK $category_id)
  • AUTO_LINK $category_id: The ID of the category that access is being given to
init__catalogues (line 24)

Standard code module initialisation function.

void init__catalogues ()
is_ecommerce_catalogue (line 1036)

Check the current catalogue is an ecommerce catalogue

  • return: Status of ecommerce catalogue check
boolean is_ecommerce_catalogue (SHORT_TEXT $catalogue_name)
  • SHORT_TEXT $catalogue_name: Catalogue name
is_ecommerce_catalogue_entry (line 1052)

Check selected entry is an ecommerce catalogue entry

  • return: Status of entry type check
boolean is_ecommerce_catalogue_entry (AUTO_LINK $entry_id)
  • AUTO_LINK $entry_id: Entry ID
nice_get_catalogues (line 610)

Get a nice, formatted, XHTML list of all the catalogues.

  • return: Catalogue selection list
tempcode nice_get_catalogues ([?ID_TEXT $it = NULL])
  • ?ID_TEXT $it: The name of the currently selected catalogue (NULL: none selected)
nice_get_catalogue_category_tree (line 872)

Get a nice, formatted XHTML list extending from the root, and showing all subcategories, and their subcategories (ad infinitum). The tree bit is because each entry in the list is shown to include the path through the tree that gets to it

  • return: The list of categories
tempcode nice_get_catalogue_category_tree (ID_TEXT $catalogue_name, [?AUTO_LINK $it = NULL], [boolean $addable_filter = false], [boolean $use_compound_list = false])
  • ID_TEXT $catalogue_name: The catalogue name
  • ?AUTO_LINK $it: The currently selected entry (NULL: none)
  • boolean $addable_filter: Whether to only show for what may be added to by the current member
  • boolean $use_compound_list: Whether to make the list elements store comma-separated child lists instead of IDs
nice_get_catalogue_entries_tree (line 754)

Get a nice, formatted XHTML list of entries, in catalogue category tree structure

  • return: The list of entries
tempcode nice_get_catalogue_entries_tree (ID_TEXT $catalogue_name, [?AUTO_LINK $it = NULL], [?AUTO_LINK $submitter = NULL], [boolean $editable_filter = false])
  • ID_TEXT $catalogue_name: The catalogue name
  • ?AUTO_LINK $it: The currently selected entry (NULL: none selected)
  • ?AUTO_LINK $submitter: Only show entries submitted by this member (NULL: no filter)
  • boolean $editable_filter: Whether to only show for what may be edited by the current member
render_catalogue_entry_screen (line 1066)

Display a catalogue entry

  • return: Tempcode interface to display an entry
tempcode render_catalogue_entry_screen (AUTO_LINK $id, [boolean $no_title = false])
  • AUTO_LINK $id: Entry ID
  • boolean $no_title: Whether to skip rendering a title
_get_catalogue_entry_field (line 738)

Get the value for the specified field, for the stated catalogue entry.

  • return: The value
string _get_catalogue_entry_field (AUTO_LINK $field_id, mixed $entry_id, [ID_TEXT $type = 'short'])
  • AUTO_LINK $field_id: The ID of the field we are getting
  • mixed $entry_id: The ID of the entry we are getting for OR the row
  • ID_TEXT $type: The type of field

Documentation generated on Sun, 02 Jan 2011 23:10:16 +0000 by phpDocumentor 1.4.3