add_download
add_download_category
add_download_licence
count_download_category_children
create_data_mash
create_selection_list_download_category_tree
create_selection_list_download_licences
create_selection_list_downloads_tree
delete_download
delete_download_category
delete_download_licence
dload_script
download_breadcrumbs
download_gateway_script
download_licence_script
edit_download
edit_download_category
edit_download_licence
generate_dload_url
get_download_archive_size
get_download_bandwidth
get_download_category_tree
get_downloads_tree
get_num_archive_downloads
get_num_downloads_downloaded
log_download
render_download_box
render_download_category_box
set_download_gallery_permissions
add_download(\AUTO_LINK $category_id, \SHORT_TEXT $name, \URLPATH $url, \LONG_TEXT $description, \ID_TEXT $author, \LONG_TEXT $additional_details, \?AUTO_LINK $out_mode_id, \BINARY $validated, \BINARY $allow_rating, \SHORT_INTEGER $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes, \SHORT_TEXT $original_filename, integer $file_size, integer $cost, \BINARY $submitter_gets_points, \?AUTO_LINK $licence= null, \?TIME $add_date= null, integer $num_downloads= 0, integer $views= 0, \?MEMBER $submitter= null, \?TIME $edit_date= null, \?AUTO_LINK $id= null, \SHORT_TEXT $meta_keywords= '', \LONG_TEXT $meta_description= '', integer $default_pic= 1, \URLPATH $url_redirect= '') : \AUTO_LINK
| package | downloads |
|---|
\AUTO_LINKThe ID of the category the download is to be in
\SHORT_TEXTThe name of the download
\URLPATHThe URL to the download
\LONG_TEXTThe description of the download
\ID_TEXTThe author of the download (not necessarily same as the submitter)
\LONG_TEXTThe supplementary description for the download
\?AUTO_LINKThe out-mode-id (the ID of a download that this download is an old version of). Often people wonder why this is specified with the old version, and not the opposite with the new version - it is because statistically, we perceive more chance of downloads merging than splitting (null: none)
\BINARYWhether the download has been validated
\BINARYWhether the download may be rated
\SHORT_INTEGERWhether comments are allowed (0=no, 1=yes, 2=review style)
\BINARYWhether the download may be trackbacked
\LONG_TEXTHidden notes pertaining to the download
\SHORT_TEXTThe downloads original filename (the URL may be obfuscated)
integerThe file size of the download (we can't really detect this in real-time for remote URLs)
integerThe cost of the download that members will have to pay to get it
\BINARYWhether the submitter gets the points for the download (they are selling it) (otherwise they are just thrown out, which is an alternative model - one of enforcing community point building)
\?AUTO_LINKThe licence to use (null: none)
\?TIMEThe add date for the download (null: now)
integerThe number of downloads that this download has had
integerThe number of views that this download has had
\?MEMBERThe submitter (null: current user)
\?TIMEThe edit date (null: never)
\?AUTO_LINKForce an ID (null: don't force an ID)
\SHORT_TEXTMeta keywords for this resource (blank: implicit)
\LONG_TEXTMeta description for this resource (blank: implicit)
integerThe ordered number of the gallery image to use as the download representative image
\URLPATHThe URL to redirect
\AUTO_LINKThe ID of the newly added downloadadd_download_category(\SHORT_TEXT $category, \AUTO_LINK $parent_id, \LONG_TEXT $description, \LONG_TEXT $notes, \URLPATH $rep_image= '', \?AUTO_LINK $id= null, \?TIME $add_time= null, \?SHORT_TEXT $meta_keywords= '', \?LONG_TEXT $meta_description= '') : \AUTO_LINK
| package | downloads |
|---|
\SHORT_TEXTThe name of the download category
\AUTO_LINKThe parent download category
\LONG_TEXTA description
\LONG_TEXTHidden notes pertaining to this download category
\URLPATHThe representative image for the category (blank: none)
\?AUTO_LINKForce an ID (null: don't force an ID)
\?TIMEAdd time (null: now)
\?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 download categoryadd_download_licence(\SHORT_TEXT $title, \LONG_TEXT $text) : \AUTO_LINK
| package | downloads |
|---|
\SHORT_TEXTThe title of the download licence
\LONG_TEXTThe text of the download licence
\AUTO_LINKThe ID of the new download licencecount_download_category_children(\AUTO_LINK $category_id) : array
| package | downloads |
|---|
\AUTO_LINKThe ID of the category for which count details are collected
arrayThe 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'].create_data_mash(\URLPATH $url, \?string $data= null, \?ID_TEXT $extension= null, boolean $direct_path= false) : \LONG_TEXT
| package | downloads |
|---|
\URLPATHThe URL to make a data-mash of, or a filename if $data isn't blank
\?stringData (null: use URL)
\?ID_TEXTFile extension (null: get from URL)
booleanWhether a direct file path was given instead of a URL
\LONG_TEXTThe data-mashcreate_selection_list_download_category_tree(\?AUTO_LINK $it= null, boolean $use_compound_list= false, boolean $addable_filter= false, \?TIME $updated_since= null) : \Tempcode
| package | downloads |
|---|
\?AUTO_LINKThe currently selected category (null: none selected)
booleanWhether to make the list elements store comma-separated child lists instead of IDs
booleanWhether to only show for what may be added to by the current member
\?TIMETime from which content must be updated (null: no limit).
\TempcodeThe list of categoriescreate_selection_list_download_licences(\?AUTO_LINK $it= null, boolean $allow_na= false) : \Tempcode
| package | downloads |
|---|
\?AUTO_LINKThe currently selected licence (null: none selected)
booleanWhether to allow an N/A selection
\TempcodeThe list of categoriescreate_selection_list_downloads_tree(\?AUTO_LINK $it= null, \?AUTO_LINK $submitter= null, \?AUTO_LINK $shun= null, boolean $use_compound_list= false, boolean $editable_filter= false) : \Tempcode
| package | downloads |
|---|
\?AUTO_LINKThe currently selected entry (null: none selected)
\?AUTO_LINKOnly show entries submitted by this member (null: no filter)
\?AUTO_LINKDownload we do not want to show (null: none to not show)
booleanWhether to get a list of child categories (not just direct ones, recursively), instead of just IDs
booleanWhether to only show for what may be edited by the current member
\TempcodeThe list of entriesdelete_download(\AUTO_LINK $id, boolean $leave = false)
| package | downloads |
|---|
\AUTO_LINKThe ID of the download to delete
booleanWhether to leave the actual file behind
delete_download_category(\AUTO_LINK $category_id)
delete_download_licence(\AUTO_LINK $id)
edit_download(\AUTO_LINK $id, \AUTO_LINK $category_id, \SHORT_TEXT $name, \URLPATH $url, \LONG_TEXT $description, \ID_TEXT $author, \LONG_TEXT $additional_details, \?AUTO_LINK $out_mode_id, integer $default_pic, \BINARY $validated, \BINARY $allow_rating, \SHORT_INTEGER $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes, \SHORT_TEXT $original_filename, integer $file_size, integer $cost, \BINARY $submitter_gets_points, \?AUTO_LINK $licence, \SHORT_TEXT $meta_keywords, \LONG_TEXT $meta_description, \?TIME $edit_time= null, \?TIME $add_time= null, \?integer $views= null, \?MEMBER $submitter= null, \?integer $num_downloads= null, boolean $null_is_literal= false, \URLPATH $url_redirect= '')
| package | downloads |
|---|
\AUTO_LINKThe ID of the download to edit
\AUTO_LINKThe ID of the category the download is to be in
\SHORT_TEXTThe name of the download
\URLPATHThe URL to the download
\LONG_TEXTThe description of the download
\ID_TEXTThe author of the download (not necessarily same as the submitter)
\LONG_TEXTThe supplementary description for the download
\?AUTO_LINKThe out-mode-id (the ID of a download that this download is an old version of). Often people wonder why this is specified with the old version, and not the opposite with the new version - it is because statistically, we perceive more chance of downloads merging than splitting (null: none)
integerThe ordered number of the gallery image to use as the download representative image
\BINARYWhether the download has been validated
\BINARYWhether the download may be rated
\SHORT_INTEGERWhether comments are allowed (0=no, 1=yes, 2=review style)
\BINARYWhether the download may be trackbacked
\LONG_TEXTHidden notes pertaining to the download
\SHORT_TEXTThe downloads original filename (the URL may be obfuscated)
integerThe file size of the download (we can't really detect this in real-time for remote URLs)
integerThe cost of the download that members will have to pay to get it
\BINARYWhether the submitter gets the points for the download (they are selling it) (otherwise they are just thrown out, which is an alternative model - one of enforcing community point building)
\?AUTO_LINKThe licence to use (null: none)
\SHORT_TEXTMeta keywords
\LONG_TEXTMeta description
\?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)
\?integerThe number of downloads that this download has had (null: do not change)
booleanDetermines whether some NULLs passed mean 'use a default' or literally mean 'set to NULL'
\URLPATHThe URL to redirect
edit_download_category(\AUTO_LINK $category_id, \SHORT_TEXT $category, \AUTO_LINK $parent_id, \LONG_TEXT $description, \LONG_TEXT $notes, \URLPATH $rep_image, \?SHORT_TEXT $meta_keywords, \?LONG_TEXT $meta_description, \?TIME $add_time = null)
| package | downloads |
|---|
\AUTO_LINKThe ID of the category being edited
\SHORT_TEXTThe name of the download category
\AUTO_LINKThe parent download category
\LONG_TEXTA description
\LONG_TEXTHidden notes pertaining to this download category
\URLPATHThe representative image for the category (blank: none)
\?SHORT_TEXTMeta keywords for this resource (null: do not edit)
\?LONG_TEXTMeta description for this resource (null: do not edit)
\?TIMEAdd time (null: do not change)
edit_download_licence(\AUTO_LINK $id, \SHORT_TEXT $title, \LONG_TEXT $text)
| package | downloads |
|---|
\AUTO_LINKThe ID of the download licence to edit
\SHORT_TEXTThe title of the download licence
\LONG_TEXTThe text of the download licence
generate_dload_url(\AUTO_LINK $id, boolean $use_gateway) : \URLPATH
| package | downloads |
|---|
\AUTO_LINKThe ID of the download to be downloaded
booleanWhether to use the gateway script
\URLPATHThe URLget_download_archive_size() : string
get_download_bandwidth() : integer
get_download_category_tree(\?AUTO_LINK $category_id= null, \?string $breadcrumbs= null, \?ID_TEXT $category_info= null, boolean $do_stats= false, boolean $use_compound_list= false, \?integer $levels= null, boolean $addable_filter= false) : array
| package | downloads |
|---|
\?AUTO_LINKThe category being at the root of our recursion (null: true root category)
\?stringThe breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)
\?ID_TEXTThe category row 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
booleanWhether to collect download counts with our tree information
booleanWhether to make a compound list (a pair of a comma-separated list of children, and the child array)
\?integerThe number of recursive levels to search (null: all)
booleanWhether to only show for what may be added to by the current member
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). There is also an additional 'downloadcount' entry if stats were requestedget_downloads_tree(\?MEMBER $submitter= null, \?AUTO_LINK $category_id= null, \?string $breadcrumbs= 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) : array
| package | downloads |
|---|
\?MEMBEROnly show images/videos 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)
\?AUTO_LINKDownload we do not want to show (null: none to not show)
booleanWhether to get a list of child categories (not just direct ones, recursively), instead of just IDs
booleanWhether to only show for what may be edited by the current member
booleanWhether to only show entries that are tar files (addons)
arrayA list of maps for all categories. Each map entry containins the fields 'id' (category ID) and 'breadcrumbs' (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 branchesget_num_archive_downloads() : integer
get_num_downloads_downloaded() : integer
log_download(\AUTO_LINK $id, integer $size, boolean $got_before)
| package | downloads |
|---|
\AUTO_LINKThe ID of the download being downloaded
integerThe size of the download (if zero, no bandwidth will be done - zero implies either an empty file, or a remote file that doesn't affect our bandwidth)
booleanWhether the download has been downloaded before
render_download_box(array $row, boolean $pic= true, boolean $include_breadcrumbs= true, \?ID_TEXT $zone= null, \?string $text_summary= null, boolean $give_context= true, \?AUTO_LINK $root= null, \ID_TEXT $guid= '') : \Tempcode
| package | downloads |
|---|
arrayThe database field row of this download
booleanWhether to show a picture
booleanWhether to show breadcrumbs
\?ID_TEXTThe zone the download module we're using is in (null: find it)
\?stringText summary for result (e.g. highlighted portion of actual file from search result) (null: none)
booleanWhether to include context (i.e. say WHAT this is, not just show the actual content)
\?AUTO_LINKThe virtual root (null: read from environment)
\ID_TEXTOverridden GUID to send to templates (blank: none)
\TempcodeA box for this download, linking to the full download pagerender_download_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 | downloads |
|---|
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 page