Function __global->add_download

Definitions

sources/downloads2.php

  • Add a download.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: int

Parameters

Name Type Default Set Range Description
$category_id AUTO_LINK required parameter N/A N/A The ID of the category the download is to be in
$name SHORT_TEXT required parameter N/A N/A The name of the download
$url URLPATH required parameter N/A N/A The URL to the download
$description LONG_TEXT required parameter N/A N/A The description of the download
$author ID_TEXT required parameter N/A N/A The author of the download (not necessarily same as the submitter)
$additional_details LONG_TEXT required parameter N/A N/A The supplementary description for the download
$out_mode_id ?AUTO_LINK required parameter N/A N/A 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)
$validated BINARY required parameter N/A N/A Whether the download has been validated
$allow_rating BINARY required parameter N/A N/A Whether the download may be rated
$allow_comments SHORT_INTEGER required parameter N/A N/A Whether comments are allowed (0=no, 1=yes, 2=review style)
$allow_trackbacks BINARY required parameter N/A N/A Whether the download may be trackbacked
$notes LONG_TEXT required parameter N/A N/A Hidden notes pertaining to the download
$original_filename SHORT_TEXT required parameter N/A N/A The downloads original filename (the URL may be obfuscated)
$file_size integer required parameter N/A N/A The file size of the download (we can't really detect this in real-time for remote URLs)
$cost integer 0 N/A N/A The cost of the download that members will have to pay to get it
$submitter_gets_points BINARY 0 N/A N/A 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)
$licence ?AUTO_LINK Null N/A N/A The licence to use (null: none)
$add_date ?TIME Null N/A N/A The add date for the download (null: now)
$num_downloads integer 0 N/A N/A The number of downloads that this download has had
$views integer 0 N/A N/A The number of views that this download has had
$submitter ?MEMBER Null N/A N/A The submitter (null: current user)
$edit_date ?TIME Null N/A N/A The edit date (null: never)
$id ?AUTO_LINK Null N/A N/A Force an ID (null: don't force an ID)
$meta_keywords SHORT_TEXT Blank (empty string) N/A N/A Meta keywords for this resource (blank: implicit)
$meta_description LONG_TEXT Blank (empty string) N/A N/A Meta description for this resource (blank: implicit)
$default_pic integer 1 N/A N/A The ordered number of the gallery image to use as the download representative image
$url_redirect URLPATH Blank (empty string) N/A N/A The URL to redirect

Return

  • The ID of the newly added download
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A