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_LINK
The ID of the category the download is to be in
\SHORT_TEXT
The name of the download
\URLPATH
The URL to the download
\LONG_TEXT
The description of the download
\ID_TEXT
The author of the download (not necessarily same as the submitter)
\LONG_TEXT
The supplementary description for the download
\?AUTO_LINK
The 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)
\BINARY
Whether the download has been validated
\BINARY
Whether the download may be rated
\SHORT_INTEGER
Whether comments are allowed (0=no, 1=yes, 2=review style)
\BINARY
Whether the download may be trackbacked
\LONG_TEXT
Hidden notes pertaining to the download
\SHORT_TEXT
The downloads original filename (the URL may be obfuscated)
integer
The file size of the download (we can't really detect this in real-time for remote URLs)
integer
The cost of the download that members will have to pay to get it
\BINARY
Whether 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_LINK
The licence to use (null: none)
\?TIME
The add date for the download (null: now)
integer
The number of downloads that this download has had
integer
The number of views that this download has had
\?MEMBER
The submitter (null: current user)
\?TIME
The edit date (null: never)
\?AUTO_LINK
Force an ID (null: don't force an ID)
\SHORT_TEXT
Meta keywords for this resource (blank: implicit)
\LONG_TEXT
Meta description for this resource (blank: implicit)
integer
The ordered number of the gallery image to use as the download representative image
\URLPATH
The URL to redirect
\AUTO_LINK
The 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_TEXT
The name of the download category
\AUTO_LINK
The parent download category
\LONG_TEXT
A description
\LONG_TEXT
Hidden notes pertaining to this download category
\URLPATH
The representative image for the category (blank: none)
\?AUTO_LINK
Force an ID (null: don't force an ID)
\?TIME
Add time (null: now)
\?SHORT_TEXT
Meta keywords for this resource (null: do not edit) (blank: implicit)
\?LONG_TEXT
Meta description for this resource (null: do not edit) (blank: implicit)
\AUTO_LINK
The ID of the newly added download categoryadd_download_licence(\SHORT_TEXT $title, \LONG_TEXT $text) : \AUTO_LINK
package | downloads |
---|
\SHORT_TEXT
The title of the download licence
\LONG_TEXT
The text of the download licence
\AUTO_LINK
The ID of the new download licencecount_download_category_children(\AUTO_LINK $category_id) : array
package | downloads |
---|
\AUTO_LINK
The ID of the category for which count details are collected
array
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'].create_data_mash(\URLPATH $url, \?string $data= null
, \?ID_TEXT $extension= null
, boolean $direct_path= false
) : \LONG_TEXT
package | downloads |
---|
\URLPATH
The URL to make a data-mash of, or a filename if $data isn't blank
\?string
Data (null: use URL)
\?ID_TEXT
File extension (null: get from URL)
boolean
Whether a direct file path was given instead of a URL
\LONG_TEXT
The 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_LINK
The currently selected category (null: none selected)
boolean
Whether to make the list elements store comma-separated child lists instead of IDs
boolean
Whether to only show for what may be added to by the current member
\?TIME
Time from which content must be updated (null: no limit).
\Tempcode
The list of categoriescreate_selection_list_download_licences(\?AUTO_LINK $it= null
, boolean $allow_na= false
) : \Tempcode
package | downloads |
---|
\?AUTO_LINK
The currently selected licence (null: none selected)
boolean
Whether to allow an N/A selection
\Tempcode
The 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_LINK
The currently selected entry (null: none selected)
\?AUTO_LINK
Only show entries submitted by this member (null: no filter)
\?AUTO_LINK
Download we do not want to show (null: none to not show)
boolean
Whether to get a list of child categories (not just direct ones, recursively), instead of just IDs
boolean
Whether to only show for what may be edited by the current member
\Tempcode
The list of entriesdelete_download(\AUTO_LINK $id, boolean $leave = false
)
package | downloads |
---|
\AUTO_LINK
The ID of the download to delete
boolean
Whether 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_LINK
The ID of the download to edit
\AUTO_LINK
The ID of the category the download is to be in
\SHORT_TEXT
The name of the download
\URLPATH
The URL to the download
\LONG_TEXT
The description of the download
\ID_TEXT
The author of the download (not necessarily same as the submitter)
\LONG_TEXT
The supplementary description for the download
\?AUTO_LINK
The 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)
integer
The ordered number of the gallery image to use as the download representative image
\BINARY
Whether the download has been validated
\BINARY
Whether the download may be rated
\SHORT_INTEGER
Whether comments are allowed (0=no, 1=yes, 2=review style)
\BINARY
Whether the download may be trackbacked
\LONG_TEXT
Hidden notes pertaining to the download
\SHORT_TEXT
The downloads original filename (the URL may be obfuscated)
integer
The file size of the download (we can't really detect this in real-time for remote URLs)
integer
The cost of the download that members will have to pay to get it
\BINARY
Whether 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_LINK
The licence to use (null: none)
\SHORT_TEXT
Meta keywords
\LONG_TEXT
Meta description
\?TIME
Edit time (null: either means current time, or if $null_is_literal, means reset to to NULL)
\?TIME
Add time (null: do not change)
\?integer
Number of views (null: do not change)
\?MEMBER
Submitter (null: do not change)
\?integer
The number of downloads that this download has had (null: do not change)
boolean
Determines whether some NULLs passed mean 'use a default' or literally mean 'set to NULL'
\URLPATH
The 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_LINK
The ID of the category being edited
\SHORT_TEXT
The name of the download category
\AUTO_LINK
The parent download category
\LONG_TEXT
A description
\LONG_TEXT
Hidden notes pertaining to this download category
\URLPATH
The representative image for the category (blank: none)
\?SHORT_TEXT
Meta keywords for this resource (null: do not edit)
\?LONG_TEXT
Meta description for this resource (null: do not edit)
\?TIME
Add time (null: do not change)
edit_download_licence(\AUTO_LINK $id, \SHORT_TEXT $title, \LONG_TEXT $text)
package | downloads |
---|
\AUTO_LINK
The ID of the download licence to edit
\SHORT_TEXT
The title of the download licence
\LONG_TEXT
The text of the download licence
generate_dload_url(\AUTO_LINK $id, boolean $use_gateway) : \URLPATH
package | downloads |
---|
\AUTO_LINK
The ID of the download to be downloaded
boolean
Whether to use the gateway script
\URLPATH
The 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_LINK
The category being at the root of our recursion (null: true root category)
\?string
The breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)
\?ID_TEXT
The 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
boolean
Whether to collect download counts with our tree information
boolean
Whether to make a compound list (a pair of a comma-separated list of children, and the child array)
\?integer
The number of recursive levels to search (null: all)
boolean
Whether to only show for what may be added to by the current member
array
A 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 |
---|
\?MEMBER
Only show images/videos submitted by this member (null: no filter)
\?AUTO_LINK
The category being at the root of our recursion (null: true root)
\?string
The breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)
\?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
\?integer
The number of recursive levels to search (null: all)
\?AUTO_LINK
Download we do not want to show (null: none to not show)
boolean
Whether to get a list of child categories (not just direct ones, recursively), instead of just IDs
boolean
Whether to only show for what may be edited by the current member
boolean
Whether to only show entries that are tar files (addons)
array
A 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_LINK
The ID of the download being downloaded
integer
The 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)
boolean
Whether 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 |
---|
array
The database field row of this download
boolean
Whether to show a picture
boolean
Whether to show breadcrumbs
\?ID_TEXT
The zone the download module we're using is in (null: find it)
\?string
Text summary for result (e.g. highlighted portion of actual file from search result) (null: none)
boolean
Whether to include context (i.e. say WHAT this is, not just show the actual content)
\?AUTO_LINK
The virtual root (null: read from environment)
\ID_TEXT
Overridden GUID to send to templates (blank: none)
\Tempcode
A 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 |
---|
array
The database field row of it
\ID_TEXT
The zone to use
boolean
Whether to include context (i.e. say WHAT this is, not just show the actual content)
boolean
Whether to include breadcrumbs (if there are any)
\?AUTO_LINK
Virtual root to use (null: none)
boolean
Whether to copy through any filter parameters in the URL, under the basis that they are associated with what this box is browsing
\ID_TEXT
Overridden GUID to send to templates (blank: none)
\Tempcode
A box for it, linking to the full page