/sources/downloads.php

Description
Functions
count_download_category_children (line 393)

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

  • return: The number of downloads is returned in $output['num_downloads'], and the number of subcategories is returned in $output['num_children'], and the (possibly recursive) number of downloads is returned in $output['num_downloads_children'].
array count_download_category_children (AUTO_LINK $category_id)
  • AUTO_LINK $category_id: The ID of the category for which count details are collected
download_breadcrumbs (line 351)

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

  • return: The tree route
tempcode download_breadcrumbs (AUTO_LINK $category_id, [?AUTO_LINK $root = NULL], [boolean $no_link_for_me_sir = true], [?ID_TEXT $zone = NULL])
  • 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)
  • ?ID_TEXT $zone: The zone the download module we're using is in (NULL: find it)
download_licence_script (line 33)

Show a download licence for display

void download_licence_script ()
get_category_downloads (line 424)

Get tempcode to view the downloads in a download category.

  • return: The UI
tempcode get_category_downloads (AUTO_LINK $category_id, AUTO_LINK $root, [?string $order = NULL])
  • AUTO_LINK $category_id: The download category ID
  • AUTO_LINK $root: The virtual root
  • ?string $order: Force an order (NULL: don't)
get_downloads_tree (line 167)

Get a list of maps containing all the downloads, 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. Or if $use_compound_list, the tree structure built with pairs containing the compound list in addition to the child branches
array get_downloads_tree ([?MEMBER $submitter = NULL], [?AUTO_LINK $category_id = NULL], [?string $tree = NULL], [?ID_TEXT $title = NULL], [?integer $shun = NULL], [?AUTO_LINK $levels = NULL], [boolean $use_compound_list = false], [boolean $editable_filter = false], [boolean $tar_filter = false])
  • ?MEMBER $submitter: Only show images/videos 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 $shun: The number of recursive levels to search (NULL: all)
  • ?AUTO_LINK $levels: Download we do not want to show (NULL: none to not show)
  • boolean $use_compound_list: Whether to get a list of child categories (not just direct ones, recursively), instead of just IDs
  • boolean $editable_filter: Whether to only show for what may be edited by the current member
  • boolean $tar_filter: Whether to only show entries that are tar files (addons)
get_download_category_html (line 106)

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

  • return: A box for it, linking to the full page
tempcode get_download_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_download_category_tree (line 292)

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). There is also an additional 'downloadcount' entry if stats were requested
array get_download_category_tree ([?AUTO_LINK $category_id = NULL], [?string $tree = NULL], [?ID_TEXT $title = NULL], [boolean $do_stats = true], [boolean $use_compound_list = false], [?integer $levels = NULL], [boolean $addable_filter = false])
  • ?AUTO_LINK $category_id: The category being at the root of our recursion (NULL: true root category)
  • ?string $tree: The tree up to this point in the recursion (NULL: blank, as we are starting the recursion)
  • ?ID_TEXT $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
  • boolean $do_stats: Whether to collect download counts with our tree information
  • boolean $use_compound_list: Whether to make a compound list (a pair of a comma-separated list of children, and the child array)
  • ?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
get_download_html (line 58)

Get tempcode for a download 'feature box' for the sgiven row

  • return: A box for this download, linking to the full download page
tempcode get_download_html (array $row, [boolean $pic = true], [boolean $breadcrumbs = true], [?ID_TEXT $zone = NULL])
  • array $row: The database field row of this download
  • boolean $pic: Whether to show a picture
  • boolean $breadcrumbs: Whether to show breadcrumbs
  • ?ID_TEXT $zone: The zone the download module we're using is in (NULL: find it)
get_download_sub_categories (line 466)

Get a templated portayal of the subcategories directly under the specified category.

  • return: The templated portayal
tempcode get_download_sub_categories (AUTO_LINK $category_id, [?AUTO_LINK $root = NULL], [?ID_TEXT $zone = NULL], [?string $order = NULL])
  • AUTO_LINK $category_id: The category the subcategories are being found for
  • ?AUTO_LINK $root: The pretend root of our download system (NULL: true root). This system is provided for large sites to be able to do virtually seperated download systems
  • ?ID_TEXT $zone: The zone the download module we're using is in (NULL: find it)
  • ?string $order: The order to show results in (NULL: default)
init__downloads (line 24)

Standard code module initialisation function.

void init__downloads ()
nice_get_downloads_tree (line 132)

Get a nice, formatted XHTML list of downloads, in download tree structure

  • return: The list of entries
tempcode nice_get_downloads_tree ([?AUTO_LINK $it = NULL], [?AUTO_LINK $submitter = NULL], [?AUTO_LINK $shun = NULL], [boolean $use_compound_list = false], [boolean $editable_filter = false])
  • ?AUTO_LINK $it: The currently selected entry (NULL: none selected)
  • ?AUTO_LINK $submitter: Only show entries submitted by this member (NULL: no filter)
  • ?AUTO_LINK $shun: Download we do not want to show (NULL: none to not show)
  • boolean $use_compound_list: Whether to get a list of child categories (not just direct ones, recursively), instead of just IDs
  • boolean $editable_filter: Whether to only show for what may be edited by the current member
nice_get_download_category_tree (line 241)

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_download_category_tree ([?AUTO_LINK $it = NULL], [boolean $use_compound_list = false], [boolean $addable_filter = false])
  • ?AUTO_LINK $it: The currently selected category (NULL: none selected)
  • boolean $use_compound_list: Whether to make the list elements store comma-separated child lists instead of IDs
  • boolean $addable_filter: Whether to only show for what may be added to by the current member
nice_get_download_licences (line 268)

Get a nice, formatted XHTML list to select a download licence

  • return: The list of categories
tempcode nice_get_download_licences ([?AUTO_LINK $it = NULL], [boolean $allow_na = false])
  • ?AUTO_LINK $it: The currently selected licence (NULL: none selected)
  • boolean $allow_na: Whether to allow an N/A selection

Documentation generated on Sun, 02 Jan 2011 23:13:17 +0000 by phpDocumentor 1.4.3