actual_add_catalogue
actual_add_catalogue_category
actual_add_catalogue_entry
actual_add_catalogue_field
actual_delete_catalogue
actual_delete_catalogue_category
actual_delete_catalogue_entry
actual_delete_catalogue_field
actual_edit_catalogue
actual_edit_catalogue_category
actual_edit_catalogue_entry
actual_edit_catalogue_field
calculate_category_child_count_cache
catalogue_category_breadcrumbs
catalogue_entries_manual_sort
catalogue_from_tree
catalogue_to_tree
count_catalogue_category_children
create_selection_list_catalogue_category_tree
create_selection_list_catalogue_entries_tree
create_selection_list_catalogues
get_catalogue_category_entry_buildup
get_catalogue_category_tree
get_catalogue_entries
get_catalogue_entries_tree
get_catalogue_entry_field_values
get_catalogue_entry_map
grant_catalogue_full_access
is_ecommerce_catalogue
is_ecommerce_catalogue_entry
load_catalogue_row
rebuild_catalogue_cat_treecache
render_catalogue_box
render_catalogue_category_box
render_catalogue_entry_box
render_catalogue_entry_screen
store_in_catalogue_cat_treecache
C_DT_FIELDMAPS
C_DT_GRID
C_DT_TABULAR
C_DT_TITLELIST
actual_add_catalogue(\ID_TEXT $name, mixed $title, mixed $description, \SHORT_INTEGER $display_type, \BINARY $is_tree, \LONG_TEXT $notes, integer $submit_points, \BINARY $ecommerce= 0, \ID_TEXT $send_view_reports= 'never', \?integer $default_review_freq= null, \?TIME $add_time= null, boolean $uniqify= false) : \ID_TEXT
| package | catalogues |
|---|---|
| set | never daily weekly monthly quarterly |
\ID_TEXTThe codename of the catalogue
mixedThe title of the catalogue (either language string map or string)
mixedA description (either language string map or string)
\SHORT_INTEGERThe display type
\BINARYWhether the catalogue uses a tree system (as opposed to mere categories in an index)
\LONG_TEXTHidden notes pertaining to this catalogue
integerHow many points a member gets by submitting to this catalogue
\BINARYWhether the catalogue is an eCommerce catalogue
\ID_TEXTHow to send view reports
\?integerDefault review frequency for catalogue entries (null: none)
\?TIMEThe add time (null: now)
booleanWhether to force the name as unique, if there's a conflict
\ID_TEXTThe nameactual_add_catalogue_category(\ID_TEXT $catalogue_name, mixed $title, mixed $description, \LONG_TEXT $notes, \?AUTO_LINK $parent_id, \URLPATH $rep_image= '', integer $move_days_lower= 30, integer $move_days_higher= 60, \?AUTO_LINK $move_target= null, \?TIME $add_date= null, \?AUTO_LINK $id= null, \?SHORT_TEXT $meta_keywords= '', \?LONG_TEXT $meta_description= '') : \AUTO_LINK
| package | catalogues |
|---|
\ID_TEXTThe codename of the catalogue the category is in
mixedThe title of this category (either language string map or string)
mixedA description (either language string map or string)
\LONG_TEXTHidden notes pertaining to this category
\?AUTO_LINKThe ID of this categories parent (null: a root category, or not a tree catalogue)
\URLPATHThe representative image for the category (blank: none)
integerThe number of days before expiry (lower limit)
integerThe number of days before expiry (higher limit)
\?AUTO_LINKThe expiry category (null: do not expire)
\?TIMEThe add time (null: now)
\?AUTO_LINKForce an ID (null: don't force an ID)
\?SHORT_TEXTMeta keywords for this resource (null: do not edit) (blank: implicit)
\?LONG_TEXTMeta description for this resource (null: do not edit) (blank: implicit)
\AUTO_LINKThe ID of the new categoryactual_add_catalogue_entry(\AUTO_LINK $category_id, \BINARY $validated, \LONG_TEXT $notes, \BINARY $allow_rating, \SHORT_INTEGER $allow_comments, \BINARY $allow_trackbacks, array $map, \?TIME $time= null, \?MEMBER $submitter= null, \?TIME $edit_date= null, integer $views= 0, \?AUTO_LINK $id= null, \?SHORT_TEXT $meta_keywords= '', \?LONG_TEXT $meta_description= '') : \AUTO_LINK
| package | catalogues |
|---|
\AUTO_LINKThe ID of the category that the entry is in
\BINARYWhether the entry has been validated
\LONG_TEXTHidden notes pertaining to the entry
\BINARYWhether the entry may be rated
\SHORT_INTEGERWhether comments are allowed (0=no, 1=yes, 2=review style)
\BINARYWhether the entry may be trackbacked
arrayA map of field IDs, to values, that defines the entries settings
\?TIMEThe time the entry was added (null: now)
\?MEMBERThe entries submitter (null: current user)
\?TIMEThe edit time (null: never)
integerThe number of views
\?AUTO_LINKForce an ID (null: don't force an ID)
\?SHORT_TEXTMeta keywords for this resource (null: do not edit) (blank: implicit)
\?LONG_TEXTMeta description for this resource (null: do not edit) (blank: implicit)
\AUTO_LINKThe ID of the newly added entryactual_add_catalogue_field(\ID_TEXT $c_name, mixed $name, mixed $description, \ID_TEXT $type, integer $order, \BINARY $defines_order, \BINARY $visible, \BINARY $searchable, \LONG_TEXT $default, \BINARY $required, \BINARY $put_in_category= 1, \BINARY $put_in_search= 1, \SHORT_TEXT $options= '', \?AUTO_LINK $id= null) : \AUTO_LINK
| package | catalogues |
|---|
\ID_TEXTThe codename of the catalogue the field is for
mixedThe name of the field (either language string map or string)
mixedA description (either language string map or string)
\ID_TEXTThe type of the field
integerThe field order (the field order determines what order the fields are displayed within an entry)
\BINARYWhether this field defines the catalogue order
\BINARYWhether this is a visible field
\BINARYWhether the field is usable as a search key
\LONG_TEXTThe default value for the field
\BINARYWhether this field is required
\BINARYWhether the field is to be shown in category views (not applicable for the list display type)
\BINARYWhether the field is to be shown in search views (not applicable for the list display type)
\SHORT_TEXTField options
\?AUTO_LINKForce this ID (null: auto-increment as normal)
\AUTO_LINKField IDactual_delete_catalogue(\ID_TEXT $name)
actual_delete_catalogue_category(\AUTO_LINK $id, boolean $deleting_all = false)
| package | catalogues |
|---|
\AUTO_LINKThe ID of the category
booleanWhether we're deleting everything under the category; if FALSE we will actively reassign child categories to be directly under the root
actual_delete_catalogue_entry(\AUTO_LINK $id)
actual_delete_catalogue_field(\AUTO_LINK $id)
actual_edit_catalogue(\ID_TEXT $old_name, \ID_TEXT $name, \SHORT_TEXT $title, \LONG_TEXT $description, \SHORT_INTEGER $display_type, \LONG_TEXT $notes, integer $submit_points, \BINARY $ecommerce, \ID_TEXT $send_view_reports, \?integer $default_review_freq, \?TIME $add_time= null, boolean $uniqify= false) : \ID_TEXT
| package | catalogues |
|---|---|
| set | never daily weekly monthly quarterly |
\ID_TEXTThe current name of the catalogue
\ID_TEXTThe new name of the catalogue
\SHORT_TEXTThe human readable name/title of the catalogue
\LONG_TEXTThe description
\SHORT_INTEGERThe display type
\LONG_TEXTAdmin notes
integerHow many points are given to a member that submits to the catalogue
\BINARYWhether the catalogue is an eCommerce catalogue
\ID_TEXTHow to send view reports
\?integerDefault review frequency for catalogue entries (null: none)
\?TIMEAdd time (null: do not change)
booleanWhether to force the name as unique, if there's a conflict
\ID_TEXTThe nameactual_edit_catalogue_category(\AUTO_LINK $id, \SHORT_TEXT $title, \LONG_TEXT $description, \LONG_TEXT $notes, \?AUTO_LINK $parent_id, \SHORT_TEXT $meta_keywords, \LONG_TEXT $meta_description, \URLPATH $rep_image, integer $move_days_lower, integer $move_days_higher, \?AUTO_LINK $move_target, \?TIME $add_time= null, \?ID_TEXT $c_name= null)
| package | catalogues |
|---|
\AUTO_LINKThe ID of the category
\SHORT_TEXTThe title of the category
\LONG_TEXTDescription for the category
\LONG_TEXTAdmin notes
\?AUTO_LINKThe ID of the parent category (null: no parent)
\SHORT_TEXTMeta keywords for the category
\LONG_TEXTMeta description for the category
\URLPATHThe representative image for the category (blank: none)
integerThe number of days before expiry (lower limit)
integerThe number of days before expiry (higher limit)
\?AUTO_LINKThe expiry category (null: do not expire)
\?TIMEAdd time (null: do not change)
\?ID_TEXTThe catalogue name (null: do not change)
actual_edit_catalogue_entry(\AUTO_LINK $id, \AUTO_LINK $category_id, \BINARY $validated, \LONG_TEXT $notes, \BINARY $allow_rating, \SHORT_INTEGER $allow_comments, \BINARY $allow_trackbacks, array $map, \?SHORT_TEXT $meta_keywords= '', \?LONG_TEXT $meta_description= '', \?TIME $edit_time= null, \?TIME $add_time= null, \?integer $views= null, \?MEMBER $submitter= null, boolean $null_is_literal= false)
| package | catalogues |
|---|
\AUTO_LINKThe ID of the entry being edited
\AUTO_LINKThe ID of the category that the entry is in
\BINARYWhether the entry has been validated
\LONG_TEXTHidden notes pertaining to the entry
\BINARYWhether the entry may be rated
\SHORT_INTEGERWhether comments are allowed (0=no, 1=yes, 2=review style)
\BINARYWhether the entry may be trackbacked
arrayA map of field IDs, to values, that defines the entries settings
\?SHORT_TEXTMeta keywords for this resource (null: do not edit)
\?LONG_TEXTMeta description for this resource (null: do not edit)
\?TIMEEdit time (null: either means current time, or if $null_is_literal, means reset to to NULL)
\?TIMEAdd time (null: do not change)
\?integerNumber of views (null: do not change)
\?MEMBERSubmitter (null: do not change)
booleanDetermines whether some NULLs passed mean 'use a default' or literally mean 'set to NULL'
actual_edit_catalogue_field(\AUTO_LINK $id, \ID_TEXT $c_name, \?SHORT_TEXT $name, \?LONG_TEXT $description, integer $order, \BINARY $defines_order, \BINARY $visible, \BINARY $searchable, \LONG_TEXT $default, \BINARY $required, \BINARY $put_in_category= 1, \BINARY $put_in_search= 1, \SHORT_TEXT $options= '', \?ID_TEXT $type= null)
| package | catalogues |
|---|
\AUTO_LINKThe ID of the field
\ID_TEXTThe name of the catalogue
\?SHORT_TEXTThe name of the field (null: do not change)
\?LONG_TEXTDescription for the field (null: do not change)
integerThe field order (the field order determines what order the fields are displayed within an entry)
\BINARYWhether the field defines entry ordering
\BINARYWhether the field is visible when an entry is viewed
\BINARYWhether the field is usable as a search key
\LONG_TEXTThe default value for the field
\BINARYWhether the field is required
\BINARYWhether the field is to be shown in category views (not applicable for the list display type)
\BINARYWhether the field is to be shown in search views (not applicable for the list display type)
\SHORT_TEXTField options
\?ID_TEXTThe field type (null: do not change)
calculate_category_child_count_cache(\?AUTO_LINK $cat_id, boolean $recursive_updates = true)
| package | catalogues |
|---|
\?AUTO_LINKThe ID of the category (null: skip, called by some code that didn't realise it didn't impact a tree parent)
booleanWhether to recurse up the tree to force recalculations on other categories (recommended, unless you are doing a complete rebuild)
catalogue_entries_manual_sort(array $fields, array $entries, \ID_TEXT $order_by, \ID_TEXT $direction) : array
| package | catalogues |
|---|
arrayFields array for catalogue
arrayEntries to sort (by reference)
\ID_TEXTWhat to sort by
\ID_TEXTSort direction
arrayEntriescatalogue_from_tree(\ID_TEXT $catalogue_name)
catalogue_to_tree(\ID_TEXT $catalogue_name)
count_catalogue_category_children(\AUTO_LINK $category_id) : array
| package | catalogues |
|---|
\AUTO_LINKThe ID of the category for which count details are collected
arrayThe number of entries is returned in $output['num_entries'], and the number of subcategories is returned in $output['num_children'], the (possibly recursive) number of subcategories in $output['num_children_children'], and the (possibly recursive) number of entries is returned in $output['num_entries_children'].create_selection_list_catalogue_category_tree(\ID_TEXT $catalogue_name, \?AUTO_LINK $it= null, boolean $addable_filter= false, boolean $use_compound_list= false) : \Tempcode
| package | catalogues |
|---|
\ID_TEXTThe catalogue name
\?AUTO_LINKThe currently selected entry (null: none)
booleanWhether to only show for what may be added to by the current member
booleanWhether to make the list elements store comma-separated child lists instead of IDs
\TempcodeThe list of categoriescreate_selection_list_catalogue_entries_tree(\ID_TEXT $catalogue_name, \?AUTO_LINK $it= null, \?AUTO_LINK $submitter= null, boolean $editable_filter= false) : \Tempcode
| package | catalogues |
|---|
\ID_TEXTThe catalogue name
\?AUTO_LINKThe currently selected entry (null: none selected)
\?AUTO_LINKOnly show entries submitted by this member (null: no filter)
booleanWhether to only show for what may be edited by the current member
\TempcodeThe list of entriescreate_selection_list_catalogues(\?ID_TEXT $it= null, boolean $prefer_ones_with_entries= false, boolean $only_submittable= false, \?TIME $updated_since= null) : \Tempcode
| package | catalogues |
|---|
\?ID_TEXTThe name of the currently selected catalogue (null: none selected)
booleanIf there are too many to list prefer to get ones with entries rather than just the newest
booleanWhether to only show catalogues that can be submitted to
\?TIMETime from which content must be updated (null: no limit).
\TempcodeCatalogue selection listget_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, \?mixed $filter, \?AUTO_LINK $root, \?SHORT_INTEGER $display_type= null, boolean $do_sorting= true, \?array $entries= null, string $_filtercode= '', \?ID_TEXT $_order_by= null, \ID_TEXT $ordering_param= 'sort', \?MEMBER $viewing_member_id= null) : array
| package | catalogues |
|---|---|
| set | PAGE SEARCH CATEGORY |
\?AUTO_LINKThe ID of the category for which the entries are being collected (null: entries are [and must be] passed instead)
\ID_TEXTThe name of the catalogue
\?arrayA database row of the catalogue we are working with (null: read it in)
\ID_TEXTThe view type we're doing
\ID_TEXTThe template set we are rendering this category using
\?integerThe maximum number of entries to show on a single page of this this category (null: all)
\?integerThe entry number to start at (null: all)
\?mixedThe entries to show, may be from other categories. Can either be SQL fragment, or array (null: use $start and $max)
\?AUTO_LINKThe virtual root for display of this category (null: default)
\?SHORT_INTEGERThe display type to use (null: lookup from $catalogue)
booleanWhether to perform sorting
\?arrayA list of entry rows (null: select them normally)
stringFiltercode to apply (blank: none).
\?ID_TEXTOrderer (null: read from environment)
\ID_TEXTEnvironment param used for ordering
\?MEMBERViewing member ID (null: current user)
arrayAn array containing our built up entries (renderable Tempcode), our sorting interface, and our entries (entry records from database, with an additional 'map' field), and the max rowsget_catalogue_category_tree(\ID_TEXT $catalogue_name, \?AUTO_LINK $category_id, string $breadcrumbs= '', \?array $category_details= null, \?integer $levels= null, boolean $addable_filter= false, boolean $use_compound_list= false, boolean $do_stats= false) : array
| package | catalogues |
|---|
\ID_TEXTThe catalogue name
\?AUTO_LINKThe category being at the root of our recursion (null: true root category)
stringThe breadcrumbs up to this point in the recursion
\?arrayThe category details 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 details
\?integerThe number of recursive levels to search (null: all)
booleanWhether to only show for what may be added to by the current member
booleanWhether to make the list elements store comma-separated child lists instead of IDs
booleanWhether to collect entry counts with our tree information
arrayA list of maps for all subcategories. Each map entry containins the fields 'id' (category ID) and 'breadcrumbs' (path to the category, including the categories own title), and 'entries_count' (the number of entries in the category).get_catalogue_entries(\ID_TEXT $catalogue_name, \?AUTO_LINK $category_id, \?integer $max, \?integer $start, \?mixed $filter, boolean $do_sorting, \?array $filtercode, \ID_TEXT $order_by, \ID_TEXT $direction, string $extra_where= '', \?MEMBER $viewing_member_id= null) : array
| package | catalogues |
|---|
\ID_TEXTName of the catalogue
\?AUTO_LINKThe ID of the category for which the entries are being collected (null: entries are [and must be] passed instead)
\?integerThe maximum number of entries to show on a single page of this this category (ignored if $filter is not NULL) (null: all)
\?integerThe entry number to start at (ignored if $filter is not NULL) (null: all)
\?mixedThe entries to show, may be from other categories. Can either be SQL fragment, or array (null: use $start and $max)
booleanWhether to perform sorting
\?arrayList of filters to apply (null: none). Each filter is a triple: ORd comparison key(s) [separated by pipe symbols], comparison type (one of '<', '>', '<=', '>=', '=', '~=', or '~'), comparison value
\ID_TEXTOrderer
\ID_TEXTOrder direction
stringAdditional WHERE SQL to add on to query
\?MEMBERViewing member ID (null: current user)
arrayA tuple: whether sorting was done, number of entries returned, list of entriesget_catalogue_entries_tree(\ID_TEXT $catalogue_name, \?AUTO_LINK $submitter= null, \?AUTO_LINK $category_id= null, \?string $breadcrumbs= null, \?ID_TEXT $title= null, \?integer $levels= null, boolean $editable_filter= false) : array
| package | catalogues |
|---|
\ID_TEXTThe catalogue name
\?AUTO_LINKOnly show entries submitted by this member (null: no filter)
\?AUTO_LINKThe category being at the root of our recursion (null: true root)
\?stringThe breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)
\?ID_TEXTThe 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
\?integerThe number of recursive levels to search (null: all)
booleanWhether to only show for what may be edited by the current member
arrayA list of maps for all categories. Each map entry containins the fields 'id' (category ID) and 'breadcrumbs' (path to the category, including the categories own title), and more.get_catalogue_entry_field_values(\?ID_TEXT $catalogue_name, mixed $entry_id, \?array $only_fields= null, \?array $fields= null, boolean $natural_order= false, \ID_TEXT $view_type= 'PAGE') : array
| package | catalogues |
|---|---|
| set | PAGE SEARCH CATEGORY |
\?ID_TEXTThe catalogue name we are getting an entry in (null: lookup)
mixedThe ID of the entry we are getting OR the row
\?arrayA list of fields that we are limiting ourselves to (null: get ALL fields)
\?arrayThe database rows for the fields for this catalogue (null: find them)
booleanWhether to order the fields in their natural database order
\ID_TEXTThe view type we're doing
arrayA 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_pure), depending on the field typeget_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 $breadcrumbs_details= false, \?integer $order_by= null, \?array $_breadcrumbs= null) : array
| package | catalogues |
|---|---|
| set | PAGE SEARCH CATEGORY |
arrayA database row of the entry we are working with
\?arrayA database row of the catalogue we are working with (null: read it in here)
\ID_TEXTThe view type we're doing
\ID_TEXTThe template set we are rendering this category using
\?AUTO_LINKThe virtual root for display of this category (null: none)
\?arrayThe database rows for the fields for this catalogue (null: find them)
\?arrayA list of fields (sequence numbers) that we are limiting ourselves to (null: get ALL fields)
booleanWhether to grab the feedback details
booleanWhether to grab the breadcrumbs details
\?integerField index to order by (null: none)
\?arrayWrite breadcrumbs into here (null: don't bother)
arrayA 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, BREADCRUMBSgrant_catalogue_full_access(\AUTO_LINK $category_id)
| package | catalogues |
|---|
\AUTO_LINKThe ID of the category that access is being given to
is_ecommerce_catalogue(\SHORT_TEXT $catalogue_name, \?array $catalogue = null) : boolean
| package | catalogues |
|---|
\SHORT_TEXTCatalogue name
\?arrayCatalogue row (null: look up)
booleanStatus of ecommerce catalogue checkis_ecommerce_catalogue_entry(\AUTO_LINK $entry_id) : boolean
| package | catalogues |
|---|
\AUTO_LINKEntry ID
booleanStatus of entry type checkload_catalogue_row(\ID_TEXT $catalogue_name, boolean $fail_ok = false) : \?array
| package | catalogues |
|---|
\ID_TEXTThe catalogue name
booleanWhether to return NULL if we can't find it (as opposed to a fatal error)
\?arrayCatalogue row (null: could not find it, and $fail_ok was set to true)rebuild_catalogue_cat_treecache()
| package | catalogues |
|---|
render_catalogue_box(array $row, \ID_TEXT $zone= '_SEARCH', boolean $give_context= true, \ID_TEXT $guid= '') : \Tempcode
| package | catalogues |
|---|
arrayCatalogue row
\ID_TEXTZone to link through to
booleanWhether to include context (i.e. say WHAT this is, not just show the actual content)
\ID_TEXTOverridden GUID to send to templates (blank: none)
\TempcodeThe catalogue boxrender_catalogue_category_box(array $row, \ID_TEXT $zone= '_SEARCH', boolean $give_context= true, boolean $include_breadcrumbs= true, \?AUTO_LINK $root= null, boolean $attach_to_url_filter= false, \ID_TEXT $guid= '') : \Tempcode
| package | catalogues |
|---|
arrayThe database field row of it
\ID_TEXTThe zone to use
booleanWhether to include context (i.e. say WHAT this is, not just show the actual content)
booleanWhether to include breadcrumbs (if there are any)
\?AUTO_LINKVirtual root to use (null: none)
booleanWhether to copy through any filter parameters in the URL, under the basis that they are associated with what this box is browsing
\ID_TEXTOverridden GUID to send to templates (blank: none)
\TempcodeA box for it, linking to the full pagerender_catalogue_entry_box(array $row, \ID_TEXT $zone= '_SEARCH', boolean $give_context= true, boolean $include_breadcrumbs= true, \?AUTO_LINK $root= null, \ID_TEXT $guid= '') : \Tempcode
| package | catalogues |
|---|
arrayCatalogue row
\ID_TEXTZone to link through to
booleanWhether to include context (i.e. say WHAT this is, not just show the actual content)
booleanWhether to include breadcrumbs (if there are any)
\?AUTO_LINKVirtual root to use (null: none)
\ID_TEXTOverridden GUID to send to templates (blank: none)
\TempcodeThe catalogue boxrender_catalogue_entry_screen(\AUTO_LINK $id, boolean $no_title= false, boolean $attach_to_url_filter= true) : \Tempcode
| package | catalogues |
|---|
\AUTO_LINKEntry ID
booleanWhether to skip rendering a title
booleanWhether to copy through any filter parameters in the URL, under the basis that they are associated with what this box is browsing
\TempcodeTempcode interface to display an entrystore_in_catalogue_cat_treecache(\AUTO_LINK $id, \?AUTO_LINK $parent_id, boolean $cleanup_first = true)
| package | catalogues |
|---|
\AUTO_LINKThe ID of the category
\?AUTO_LINKThe ID of the parent category (null: no parent)
booleanWhether to delete any possible pre-existing records for the category first