Functions

Add a catalogue using all the specified values.

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

Parameters

$name

\ID_TEXT

The codename of the catalogue

$title

mixed

The title of the catalogue (either language string map or string)

$description

mixed

A description (either language string map or string)

$display_type

\SHORT_INTEGER

The display type

$is_tree

\BINARY

Whether the catalogue uses a tree system (as opposed to mere categories in an index)

$notes

\LONG_TEXT

Hidden notes pertaining to this catalogue

$submit_points

integer

How many points a member gets by submitting to this catalogue

$ecommerce

\BINARY

Whether the catalogue is an eCommerce catalogue

$send_view_reports

\ID_TEXT

How to send view reports

$default_review_freq

\?integer

Default review frequency for catalogue entries (null: none)

$add_time

\?TIME

The add time (null: now)

$uniqify

boolean

Whether to force the name as unique, if there's a conflict

Returns

\ID_TEXTThe name

Add a catalogue category

actual_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

Parameters

$catalogue_name

\ID_TEXT

The codename of the catalogue the category is in

$title

mixed

The title of this category (either language string map or string)

$description

mixed

A description (either language string map or string)

$notes

\LONG_TEXT

Hidden notes pertaining to this category

$parent_id

\?AUTO_LINK

The ID of this categories parent (null: a root category, or not a tree catalogue)

$rep_image

\URLPATH

The representative image for the category (blank: none)

$move_days_lower

integer

The number of days before expiry (lower limit)

$move_days_higher

integer

The number of days before expiry (higher limit)

$move_target

\?AUTO_LINK

The expiry category (null: do not expire)

$add_date

\?TIME

The add time (null: now)

$id

\?AUTO_LINK

Force an ID (null: don't force an ID)

$meta_keywords

\?SHORT_TEXT

Meta keywords for this resource (null: do not edit) (blank: implicit)

$meta_description

\?LONG_TEXT

Meta description for this resource (null: do not edit) (blank: implicit)

Returns

\AUTO_LINKThe ID of the new category

Adds an entry to the specified catalogue.

actual_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

Parameters

$category_id

\AUTO_LINK

The ID of the category that the entry is in

$validated

\BINARY

Whether the entry has been validated

$notes

\LONG_TEXT

Hidden notes pertaining to the entry

$allow_rating

\BINARY

Whether the entry may be rated

$allow_comments

\SHORT_INTEGER

Whether comments are allowed (0=no, 1=yes, 2=review style)

$allow_trackbacks

\BINARY

Whether the entry may be trackbacked

$map

array

A map of field IDs, to values, that defines the entries settings

$time

\?TIME

The time the entry was added (null: now)

$submitter

\?MEMBER

The entries submitter (null: current user)

$edit_date

\?TIME

The edit time (null: never)

$views

integer

The number of views

$id

\?AUTO_LINK

Force an ID (null: don't force an ID)

$meta_keywords

\?SHORT_TEXT

Meta keywords for this resource (null: do not edit) (blank: implicit)

$meta_description

\?LONG_TEXT

Meta description for this resource (null: do not edit) (blank: implicit)

Returns

\AUTO_LINKThe ID of the newly added entry

Add a field to the specified catalogue, without disturbing any other data in that catalogue.

actual_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

Parameters

$c_name

\ID_TEXT

The codename of the catalogue the field is for

$name

mixed

The name of the field (either language string map or string)

$description

mixed

A description (either language string map or string)

$type

\ID_TEXT

The type of the field

$order

integer

The field order (the field order determines what order the fields are displayed within an entry)

$defines_order

\BINARY

Whether this field defines the catalogue order

$visible

\BINARY

Whether this is a visible field

$searchable

\BINARY

Whether the field is usable as a search key

$default

\LONG_TEXT

The default value for the field

$required

\BINARY

Whether this field is required

$put_in_category

\BINARY

Whether the field is to be shown in category views (not applicable for the list display type)

$put_in_search

\BINARY

Whether the field is to be shown in search views (not applicable for the list display type)

$options

\SHORT_TEXT

Field options

$id

\?AUTO_LINK

Force this ID (null: auto-increment as normal)

Returns

\AUTO_LINKField ID

Delete a catalogue.

actual_delete_catalogue(\ID_TEXT $name) 
package catalogues

Parameters

$name

\ID_TEXT

The name of the catalogue

Delete a catalogue category.

actual_delete_catalogue_category(\AUTO_LINK $id, boolean $deleting_all = false
package catalogues

Parameters

$id

\AUTO_LINK

The ID of the category

$deleting_all

boolean

Whether we're deleting everything under the category; if FALSE we will actively reassign child categories to be directly under the root

Delete a catalogue entry.

actual_delete_catalogue_entry(\AUTO_LINK $id) 
package catalogues

Parameters

$id

\AUTO_LINK

The ID of the entry to delete

Delete a catalogue field.

actual_delete_catalogue_field(\AUTO_LINK $id) 
package catalogues

Parameters

$id

\AUTO_LINK

The ID of the field

Edit a catalogue.

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

Parameters

$old_name

\ID_TEXT

The current name of the catalogue

$name

\ID_TEXT

The new name of the catalogue

$title

\SHORT_TEXT

The human readable name/title of the catalogue

$description

\LONG_TEXT

The description

$display_type

\SHORT_INTEGER

The display type

$notes

\LONG_TEXT

Admin notes

$submit_points

integer

How many points are given to a member that submits to the catalogue

$ecommerce

\BINARY

Whether the catalogue is an eCommerce catalogue

$send_view_reports

\ID_TEXT

How to send view reports

$default_review_freq

\?integer

Default review frequency for catalogue entries (null: none)

$add_time

\?TIME

Add time (null: do not change)

$uniqify

boolean

Whether to force the name as unique, if there's a conflict

Returns

\ID_TEXTThe name

Edit a catalogue category.

actual_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

Parameters

$id

\AUTO_LINK

The ID of the category

$title

\SHORT_TEXT

The title of the category

$description

\LONG_TEXT

Description for the category

$notes

\LONG_TEXT

Admin notes

$parent_id

\?AUTO_LINK

The ID of the parent category (null: no parent)

$meta_keywords

\SHORT_TEXT

Meta keywords for the category

$meta_description

\LONG_TEXT

Meta description for the category

$rep_image

\URLPATH

The representative image for the category (blank: none)

$move_days_lower

integer

The number of days before expiry (lower limit)

$move_days_higher

integer

The number of days before expiry (higher limit)

$move_target

\?AUTO_LINK

The expiry category (null: do not expire)

$add_time

\?TIME

Add time (null: do not change)

$c_name

\?ID_TEXT

The catalogue name (null: do not change)

Edit the specified catalogue entry

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

Parameters

$id

\AUTO_LINK

The ID of the entry being edited

$category_id

\AUTO_LINK

The ID of the category that the entry is in

$validated

\BINARY

Whether the entry has been validated

$notes

\LONG_TEXT

Hidden notes pertaining to the entry

$allow_rating

\BINARY

Whether the entry may be rated

$allow_comments

\SHORT_INTEGER

Whether comments are allowed (0=no, 1=yes, 2=review style)

$allow_trackbacks

\BINARY

Whether the entry may be trackbacked

$map

array

A map of field IDs, to values, that defines the entries settings

$meta_keywords

\?SHORT_TEXT

Meta keywords for this resource (null: do not edit)

$meta_description

\?LONG_TEXT

Meta description for this resource (null: do not edit)

$edit_time

\?TIME

Edit time (null: either means current time, or if $null_is_literal, means reset to to NULL)

$add_time

\?TIME

Add time (null: do not change)

$views

\?integer

Number of views (null: do not change)

$submitter

\?MEMBER

Submitter (null: do not change)

$null_is_literal

boolean

Determines whether some NULLs passed mean 'use a default' or literally mean 'set to NULL'

Edit a catalogue field.

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

Parameters

$id

\AUTO_LINK

The ID of the field

$c_name

\ID_TEXT

The name of the catalogue

$name

\?SHORT_TEXT

The name of the field (null: do not change)

$description

\?LONG_TEXT

Description for the field (null: do not change)

$order

integer

The field order (the field order determines what order the fields are displayed within an entry)

$defines_order

\BINARY

Whether the field defines entry ordering

$visible

\BINARY

Whether the field is visible when an entry is viewed

$searchable

\BINARY

Whether the field is usable as a search key

$default

\LONG_TEXT

The default value for the field

$required

\BINARY

Whether the field is required

$put_in_category

\BINARY

Whether the field is to be shown in category views (not applicable for the list display type)

$put_in_search

\BINARY

Whether the field is to be shown in search views (not applicable for the list display type)

$options

\SHORT_TEXT

Field options

$type

\?ID_TEXT

The field type (null: do not change)

Update cache for a categories child counts.

calculate_category_child_count_cache(\?AUTO_LINK $cat_id, boolean $recursive_updates = true
package catalogues

Parameters

$cat_id

\?AUTO_LINK

The ID of the category (null: skip, called by some code that didn't realise it didn't impact a tree parent)

$recursive_updates

boolean

Whether to recurse up the tree to force recalculations on other categories (recommended, unless you are doing a complete rebuild)

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

catalogue_category_breadcrumbs(\AUTO_LINK $category_id, \?AUTO_LINK $root = null, boolean $no_link_for_me_sir = true, boolean $attach_to_url_filter = false) : array
package catalogues

Parameters

$category_id

\AUTO_LINK

The category we are finding for

$root

\?AUTO_LINK

The root of the tree (null: the true root)

$no_link_for_me_sir

boolean

Whether to include category links at this level (the recursed levels will always contain links - the top level is optional, hence this parameter)

$attach_to_url_filter

boolean

Whether to copy through any filter parameters in the URL, under the basis that they are associated with what this box is browsing

Returns

arrayThe breadcrumbs

Manually sort some catalogue entries.

catalogue_entries_manual_sort(array $fields, array $entries, \ID_TEXT $order_by, \ID_TEXT $direction) : array
package catalogues

Parameters

$fields

array

Fields array for catalogue

$entries

array

Entries to sort (by reference)

$order_by

\ID_TEXT

What to sort by

$direction

\ID_TEXT

Sort direction

Returns

arrayEntries

Converts a non-tree catalogue from a tree catalogue.

catalogue_from_tree(\ID_TEXT $catalogue_name) 
package catalogues

Parameters

$catalogue_name

\ID_TEXT

Catalogue name

Converts a non-tree catalogue to a tree catalogue.

catalogue_to_tree(\ID_TEXT $catalogue_name) 
package catalogues

Parameters

$catalogue_name

\ID_TEXT

Catalogue name

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

count_catalogue_category_children(\AUTO_LINK $category_id) : array
package catalogues

Parameters

$category_id

\AUTO_LINK

The ID of the category for which count details are collected

Returns

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'].

Get a nice, formatted XHTML list extending from the root, and showing all subcategories, and their subcategories (ad infinitum).

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

Parameters

$catalogue_name

\ID_TEXT

The catalogue name

$it

\?AUTO_LINK

The currently selected entry (null: none)

$addable_filter

boolean

Whether to only show for what may be added to by the current member

$use_compound_list

boolean

Whether to make the list elements store comma-separated child lists instead of IDs

Returns

\TempcodeThe list of categories

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

create_selection_list_catalogue_entries_tree(\ID_TEXT $catalogue_name, \?AUTO_LINK $it = null, \?AUTO_LINK $submitter = null, boolean $editable_filter = false) : \Tempcode
package catalogues

Parameters

$catalogue_name

\ID_TEXT

The catalogue name

$it

\?AUTO_LINK

The currently selected entry (null: none selected)

$submitter

\?AUTO_LINK

Only show entries submitted by this member (null: no filter)

$editable_filter

boolean

Whether to only show for what may be edited by the current member

Returns

\TempcodeThe list of entries

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

create_selection_list_catalogues(\?ID_TEXT $it = null, boolean $prefer_ones_with_entries = false, boolean $only_submittable = false, \?TIME $updated_since = null) : \Tempcode
package catalogues

Parameters

$it

\?ID_TEXT

The name of the currently selected catalogue (null: none selected)

$prefer_ones_with_entries

boolean

If there are too many to list prefer to get ones with entries rather than just the newest

$only_submittable

boolean

Whether to only show catalogues that can be submitted to

$updated_since

\?TIME

Time from which content must be updated (null: no limit).

Returns

\TempcodeCatalogue selection list

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

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, \?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

Parameters

$category_id

\?AUTO_LINK

The ID of the category for which the entries are being collected (null: entries are [and must be] passed instead)

$catalogue_name

\ID_TEXT

The name of the catalogue

$catalogue

\?array

A database row of the catalogue we are working with (null: read it in)

$view_type

\ID_TEXT

The view type we're doing

$tpl_set

\ID_TEXT

The template set we are rendering this category using

$max

\?integer

The maximum number of entries to show on a single page of this this category (null: all)

$start

\?integer

The entry number to start at (null: all)

$filter

\?mixed

The entries to show, may be from other categories. Can either be SQL fragment, or array (null: use $start and $max)

$root

\?AUTO_LINK

The virtual root for display of this category (null: default)

$display_type

\?SHORT_INTEGER

The display type to use (null: lookup from $catalogue)

$do_sorting

boolean

Whether to perform sorting

$entries

\?array

A list of entry rows (null: select them normally)

$_filtercode

string

Filtercode to apply (blank: none).

$_order_by

\?ID_TEXT

Orderer (null: read from environment)

$ordering_param

\ID_TEXT

Environment param used for ordering

$viewing_member_id

\?MEMBER

Viewing member ID (null: current user)

Returns

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 rows

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

get_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

Parameters

$catalogue_name

\ID_TEXT

The catalogue name

$category_id

\?AUTO_LINK

The category being at the root of our recursion (null: true root category)

$breadcrumbs

string

The breadcrumbs up to this point in the recursion

$category_details

\?array

The 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

$levels

\?integer

The number of recursive levels to search (null: all)

$addable_filter

boolean

Whether to only show for what may be added to by the current member

$use_compound_list

boolean

Whether to make the list elements store comma-separated child lists instead of IDs

$do_stats

boolean

Whether to collect entry counts with our tree information

Returns

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).

Fetch entries from database, with sorting if possible.

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

Parameters

$catalogue_name

\ID_TEXT

Name of the catalogue

$category_id

\?AUTO_LINK

The ID of the category for which the entries are being collected (null: entries are [and must be] passed instead)

$max

\?integer

The maximum number of entries to show on a single page of this this category (ignored if $filter is not NULL) (null: all)

$start

\?integer

The entry number to start at (ignored if $filter is not NULL) (null: all)

$filter

\?mixed

The entries to show, may be from other categories. Can either be SQL fragment, or array (null: use $start and $max)

$do_sorting

boolean

Whether to perform sorting

$filtercode

\?array

List 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

$order_by

\ID_TEXT

Orderer

$direction

\ID_TEXT

Order direction

$extra_where

string

Additional WHERE SQL to add on to query

$viewing_member_id

\?MEMBER

Viewing member ID (null: current user)

Returns

arrayA tuple: whether sorting was done, number of entries returned, list of entries

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

get_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

Parameters

$catalogue_name

\ID_TEXT

The catalogue name

$submitter

\?AUTO_LINK

Only show entries submitted by this member (null: no filter)

$category_id

\?AUTO_LINK

The category being at the root of our recursion (null: true root)

$breadcrumbs

\?string

The breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)

$title

\?ID_TEXT

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

$levels

\?integer

The number of recursive levels to search (null: all)

$editable_filter

boolean

Whether to only show for what may be edited by the current member

Returns

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 the values for the specified fields, for the stated catalogue entry.

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

Parameters

$catalogue_name

\?ID_TEXT

The catalogue name we are getting an entry in (null: lookup)

$entry_id

mixed

The ID of the entry we are getting OR the row

$only_fields

\?array

A list of fields that we are limiting ourselves to (null: get ALL fields)

$fields

\?array

The database rows for the fields for this catalogue (null: find them)

$natural_order

boolean

Whether to order the fields in their natural database order

$view_type

\ID_TEXT

The view type we're doing

Returns

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 type

Get a map of the fields for the given entry.

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 $breadcrumbs_details = false, \?integer $order_by = null, \?array $_breadcrumbs = null) : array
package catalogues
set PAGE SEARCH CATEGORY

Parameters

$entry

array

A database row of the entry we are working with

$catalogue

\?array

A database row of the catalogue we are working with (null: read it in here)

$view_type

\ID_TEXT

The view type we're doing

$tpl_set

\ID_TEXT

The template set we are rendering this category using

$root

\?AUTO_LINK

The virtual root for display of this category (null: none)

$fields

\?array

The database rows for the fields for this catalogue (null: find them)

$only_fields

\?array

A list of fields (sequence numbers) that we are limiting ourselves to (null: get ALL fields)

$feedback_details

boolean

Whether to grab the feedback details

$breadcrumbs_details

boolean

Whether to grab the breadcrumbs details

$order_by

\?integer

Field index to order by (null: none)

$_breadcrumbs

\?array

Write breadcrumbs into here (null: don't bother)

Returns

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, BREADCRUMBS

Grant all usergroups access to the specified catalogue category.

grant_catalogue_full_access(\AUTO_LINK $category_id) 
package catalogues

Parameters

$category_id

\AUTO_LINK

The ID of the category that access is being given to

Check the current catalogue is an ecommerce catalogue

is_ecommerce_catalogue(\SHORT_TEXT $catalogue_name, \?array $catalogue = null) : boolean
package catalogues

Parameters

$catalogue_name

\SHORT_TEXT

Catalogue name

$catalogue

\?array

Catalogue row (null: look up)

Returns

booleanStatus of ecommerce catalogue check

Check selected entry is an ecommerce catalogue entry

is_ecommerce_catalogue_entry(\AUTO_LINK $entry_id) : boolean
package catalogues

Parameters

$entry_id

\AUTO_LINK

Entry ID

Returns

booleanStatus of entry type check

Get a catalogue row.

load_catalogue_row(\ID_TEXT $catalogue_name, boolean $fail_ok = false) : \?array
package catalogues

Parameters

$catalogue_name

\ID_TEXT

The catalogue name

$fail_ok

boolean

Whether to return NULL if we can't find it (as opposed to a fatal error)

Returns

\?arrayCatalogue row (null: could not find it, and $fail_ok was set to true)

Re-build the efficient catalogue category tree structure ancestry cache.

rebuild_catalogue_cat_treecache() 
package catalogues

Render a catalogue box.

render_catalogue_box(array $row, \ID_TEXT $zone = '_SEARCH', boolean $give_context = true, \ID_TEXT $guid = '') : \Tempcode
package catalogues

Parameters

$row

array

Catalogue row

$zone

\ID_TEXT

Zone to link through to

$give_context

boolean

Whether to include context (i.e. say WHAT this is, not just show the actual content)

$guid

\ID_TEXT

Overridden GUID to send to templates (blank: none)

Returns

\TempcodeThe catalogue box

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

render_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

Parameters

$row

array

The database field row of it

$zone

\ID_TEXT

The zone to use

$give_context

boolean

Whether to include context (i.e. say WHAT this is, not just show the actual content)

$include_breadcrumbs

boolean

Whether to include breadcrumbs (if there are any)

$root

\?AUTO_LINK

Virtual root to use (null: none)

$attach_to_url_filter

boolean

Whether to copy through any filter parameters in the URL, under the basis that they are associated with what this box is browsing

$guid

\ID_TEXT

Overridden GUID to send to templates (blank: none)

Returns

\TempcodeA box for it, linking to the full page

Render a catalogue box.

render_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

Parameters

$row

array

Catalogue row

$zone

\ID_TEXT

Zone to link through to

$give_context

boolean

Whether to include context (i.e. say WHAT this is, not just show the actual content)

$include_breadcrumbs

boolean

Whether to include breadcrumbs (if there are any)

$root

\?AUTO_LINK

Virtual root to use (null: none)

$guid

\ID_TEXT

Overridden GUID to send to templates (blank: none)

Returns

\TempcodeThe catalogue box

Display a catalogue entry

render_catalogue_entry_screen(\AUTO_LINK $id, boolean $no_title = false, boolean $attach_to_url_filter = true) : \Tempcode
package catalogues

Parameters

$id

\AUTO_LINK

Entry ID

$no_title

boolean

Whether to skip rendering a title

$attach_to_url_filter

boolean

Whether to copy through any filter parameters in the URL, under the basis that they are associated with what this box is browsing

Returns

\TempcodeTempcode interface to display an entry

Update the treecache for a catalogue category node.

store_in_catalogue_cat_treecache(\AUTO_LINK $id, \?AUTO_LINK $parent_id, boolean $cleanup_first = true
package catalogues

Parameters

$id

\AUTO_LINK

The ID of the category

$parent_id

\?AUTO_LINK

The ID of the parent category (null: no parent)

$cleanup_first

boolean

Whether to delete any possible pre-existing records for the category first

Constants

 

C_DT_FIELDMAPS

C_DT_FIELDMAPS = 0 
package catalogues
 

C_DT_GRID

C_DT_GRID = 3 
package catalogues
 

C_DT_TABULAR

C_DT_TABULAR = 2 
package catalogues
 

C_DT_TITLELIST

C_DT_TITLELIST = 1 
package catalogues