Class Module_cms_downloads

Description

Module page class.

  • copyright: ocProducts Ltd

Located in /cms/pages/modules/cms_downloads.php (line 26)

standard_aed_module
   |
   --Module_cms_downloads
Variable Summary
Method Summary
ID_TEXT add_actualisation ()
void delete_actualisation (ID_TEXT $_id)
tempcode do_next_manager (tempcode $title, tempcode $description, ?AUTO_LINK $id)
void edit_actualisation (ID_TEXT $_id)
integer filesystem_recursive_downloads_scan (PATH $server_path, URLPATH $server_url, AUTO_LINK $dest_cat, boolean $make_subfolders)
array fill_in_edit_form (ID_TEXT $_id)
integer ftp_recursive_downloads_scan (resource $conn_id, URLPATH $url, PATH $directory, AUTO_LINK $dest_cat, boolean $make_subfolders)
mixed get_cat (AUTO_LINK $id)
?array get_entry_points ()
array get_form_fields ([?AUTO_LINK $id = NULL], [SHORT_TEXT $name = ''], [?AUTO_LINK $category_id = NULL], [URLPATH $url = ''], [SHORT_TEXT $author = ''], [LONG_TEXT $description = ''], [LONG_TEXT $comments = ''], [?AUTO_LINK $out_mode_id = NULL], [BINARY $validated = 1], [BINARY $allow_rating = 1], [SHORT_INTEGER $allow_comments = 1], [BINARY $allow_trackbacks = 1], [LONG_TEXT $notes = ''], [?integer $file_size = NULL], [integer $cost = 0], [BINARY $submitter_gets_points = 1], [?SHORT_TEXT $original_filename = NULL], [?AUTO_LINK $licence = NULL], [integer $default_pic = 1])
array get_sp_overrides ()
array get_submitter (ID_TEXT $id)
tempcode import_interface ()
tempcode import_interface2 ()
tempcode misc ()
tempcode nice_get_ajax_tree ()
tempcode run_start (ID_TEXT $type)
tempcode _import ()
tempcode _import2 ()
Variables
mixed $award_type = 'download' (line 37)

Redefinition of:
standard_aed_module::$award_type
mixed $donext_type = NULL (line 40)
mixed $javascript = 'standardAlternateFields(\'file\',\'url\'); var url=document.getElementById(\'url\'); var form=url.form; var crf=function() { var s=url.value!=\'\'; if (form.elements[\'copy_to_server\']) form.elements[\'copy_to_server\'].disabled=!s; if (form.elements[\'file_size\']) form.elements[\'file_size\'].disabled=!s; }; crf(); url.onchange=crf; url.onkeyup=crf; var cost=document.getElementById(\'cost\'); if (cost) { var form=cost.form; var crf2=function() { var s=(cost.value!=\'\') && (cost.value!=\'0\'); if (form.elements[\'submitter_gets_points\']) form.elements[\'submitter_gets_points\'].disabled=!s; }; crf2(); cost.onchange=crf2; cost.onkeyup=crf2; }' (line 36)

Redefinition of:
standard_aed_module::$javascript
mixed $lang_type = 'DOWNLOAD' (line 28)
mixed $menu_label = 'SECTION_DOWNLOADS' (line 38)

Redefinition of:
standard_aed_module::$menu_label
mixed $permissions_cat_name = 'category_id' (line 32)

Redefinition of:
standard_aed_module::$permissions_cat_name
mixed $permissions_cat_require = 'downloads' (line 31)

Redefinition of:
standard_aed_module::$permissions_cat_require
mixed $permissions_require = 'mid' (line 30)

Redefinition of:
standard_aed_module::$permissions_require
mixed $select_name = 'NAME' (line 29)
mixed $seo_type = 'downloads_download' (line 34)

Redefinition of:
standard_aed_module::$seo_type
mixed $upload = 'file' (line 35)

Redefinition of:
standard_aed_module::$upload
mixed $user_facing = true (line 33)

Redefinition of:
standard_aed_module::$user_facing

Inherited Variables

Inherited from standard_aed_module

standard_aed_module::$add_one_cat_label
standard_aed_module::$add_one_label
standard_aed_module::$add_submit_name
standard_aed_module::$add_text
standard_aed_module::$alt_aed_module
standard_aed_module::$appended_actions_already
standard_aed_module::$archive_entry_point
standard_aed_module::$archive_label
standard_aed_module::$array_key
standard_aed_module::$author
standard_aed_module::$care_please
standard_aed_module::$catalogue
standard_aed_module::$cat_aed_module
standard_aed_module::$check_validation
standard_aed_module::$code_require
standard_aed_module::$default_type
standard_aed_module::$do_next_description
standard_aed_module::$do_next_editing_categories
standard_aed_module::$do_preview
standard_aed_module::$edit_one_cat_label
standard_aed_module::$edit_one_label
standard_aed_module::$edit_submit_name
standard_aed_module::$edit_text
standard_aed_module::$edit_this_cat_label
standard_aed_module::$edit_this_label
standard_aed_module::$extra_donext_categories
standard_aed_module::$extra_donext_entries
standard_aed_module::$extra_donext_whatever
standard_aed_module::$extra_donext_whatever_title
standard_aed_module::$javascript_require
standard_aed_module::$module_type
standard_aed_module::$new_id
standard_aed_module::$non_integer_id
standard_aed_module::$no_blank_ids
standard_aed_module::$orderer
standard_aed_module::$organisation
standard_aed_module::$output_of_action_is_confirmation
standard_aed_module::$permissions_cat_name_b
standard_aed_module::$permissions_cat_require_b
standard_aed_module::$permission_module
standard_aed_module::$permission_page
standard_aed_module::$possibly_some_kind_of_upload
standard_aed_module::$posting_form_text
standard_aed_module::$posting_form_text_parsed
standard_aed_module::$posting_form_title
standard_aed_module::$protect_first
standard_aed_module::$redirect_type
standard_aed_module::$second_stage_preview
standard_aed_module::$select_name_description
standard_aed_module::$send_validation_request
standard_aed_module::$skip_validation
standard_aed_module::$special_edit_frontend
standard_aed_module::$table
standard_aed_module::$table_prefix
standard_aed_module::$title_is_multi_lang
standard_aed_module::$type_code
standard_aed_module::$view_entry_point
Methods
add_actualisation (line 583)

Standard aed_module add actualiser.

  • return: The ID of the new entry
ID_TEXT add_actualisation ()
delete_actualisation (line 704)

Standard aed_module delete actualiser.

void delete_actualisation (ID_TEXT $_id)
  • ID_TEXT $_id: The entry being deleted
do_next_manager (line 720)

The do-next manager for after download content management (events only).

  • return: The UI
tempcode do_next_manager (tempcode $title, tempcode $description, ?AUTO_LINK $id)
  • tempcode $title: The title (output of get_page_title)
  • tempcode $description: Some description to show, saying what happened
  • ?AUTO_LINK $id: The ID of whatever was just handled (NULL: N/A)

Redefinition of:
standard_aed_module::do_next_manager()
The do-next manager for after content management.
edit_actualisation (line 647)

Standard aed_module edit actualiser.

void edit_actualisation (ID_TEXT $_id)
  • ID_TEXT $_id: The entry being edited
filesystem_recursive_downloads_scan (line 353)

Worker function to do a filesystem import.

  • return: Number of downloads added
integer filesystem_recursive_downloads_scan (PATH $server_path, URLPATH $server_url, AUTO_LINK $dest_cat, boolean $make_subfolders)
  • PATH $server_path: Filesystem-based path from where we are reading files
  • URLPATH $server_url: URL-based path from where we are reading files
  • AUTO_LINK $dest_cat: The destination downloading category
  • boolean $make_subfolders: Whether we add hierarchically (as opposed to a flat category fill)
fill_in_edit_form (line 552)

Standard aed_module edit form filler.

  • return: A tuple of lots of info
array fill_in_edit_form (ID_TEXT $_id)
  • ID_TEXT $_id: The entry being edited
ftp_recursive_downloads_scan (line 227)

Worker function to do an FTP import.

  • return: Number of downloads added
integer ftp_recursive_downloads_scan (resource $conn_id, URLPATH $url, PATH $directory, AUTO_LINK $dest_cat, boolean $make_subfolders)
  • resource $conn_id: The FTP connection
  • URLPATH $url: The URL that is equivalent to the base path on our FTP
  • PATH $directory: The directory we are scanning
  • AUTO_LINK $dest_cat: The destination downloading category
  • boolean $make_subfolders: Whether we add hierarchically (as opposed to a flat category fill)
get_cat (line 539)

Standard aed_module cat getter.

  • return: The cat
mixed get_cat (AUTO_LINK $id)
  • AUTO_LINK $id: The entry for which the cat is sought
get_entry_points (line 47)

Standard modular entry-point finder function.

  • return: A map of entry points (type-code=>language-code) (NULL: disabled).
?array get_entry_points ()

Redefinition of:
standard_aed_module::get_entry_points()
Standard modular entry-point finder function.
get_form_fields (line 451)

Get tempcode for a download adding/editing form.

  • return: A pair: the tempcode for the visible fields, and the tempcode for the hidden fields
array get_form_fields ([?AUTO_LINK $id = NULL], [SHORT_TEXT $name = ''], [?AUTO_LINK $category_id = NULL], [URLPATH $url = ''], [SHORT_TEXT $author = ''], [LONG_TEXT $description = ''], [LONG_TEXT $comments = ''], [?AUTO_LINK $out_mode_id = NULL], [BINARY $validated = 1], [BINARY $allow_rating = 1], [SHORT_INTEGER $allow_comments = 1], [BINARY $allow_trackbacks = 1], [LONG_TEXT $notes = ''], [?integer $file_size = NULL], [integer $cost = 0], [BINARY $submitter_gets_points = 1], [?SHORT_TEXT $original_filename = NULL], [?AUTO_LINK $licence = NULL], [integer $default_pic = 1])
  • ?AUTO_LINK $id: The ID of the download (NULL: new)
  • SHORT_TEXT $name: The name of the download
  • ?AUTO_LINK $category_id: The download category (NULL: first)
  • URLPATH $url: The URL for the downloadable file
  • SHORT_TEXT $author: The name of the author
  • LONG_TEXT $description: Description for the download
  • LONG_TEXT $comments: Additional comments for the download
  • ?AUTO_LINK $out_mode_id: The ID of the download this download is out-moding (NULL: none)
  • BINARY $validated: Whether the download is validated
  • BINARY $allow_rating: Whether rating is allowed
  • SHORT_INTEGER $allow_comments: Whether comments are allowed (0=no, 1=yes, 2=review style)
  • BINARY $allow_trackbacks: Whether trackbacks are allowed
  • LONG_TEXT $notes: Notes
  • ?integer $file_size: The file size (NULL: not added yet therefore unknown)
  • integer $cost: The point cost of the download
  • BINARY $submitter_gets_points: Whether the submitter gets the point cost
  • ?SHORT_TEXT $original_filename: The original file name for the file (we can't rely on the one on disk) (NULL: not added yet therefore unknown)
  • ?AUTO_LINK $licence: The licence to use (NULL: none)
  • integer $default_pic: Which image to use for the downloads representative image (counts from 1)
get_sp_overrides (line 57)

Standard modular specific-permission-overide finder function.

  • return: A map of specific-permissions that are overridable; sp to 0 or 1. 0 means "not category overridable". 1 means "category overridable".
array get_sp_overrides ()
get_submitter (line 526)

Standard aed_module submitter getter.

  • return: The submitter, and the time of submission (null submission time implies no known submission time)
array get_submitter (ID_TEXT $id)
  • ID_TEXT $id: The entry for which the submitter is sought
import_interface (line 123)

The UI for importing FTP downloads.

  • return: The UI
tempcode import_interface ()
import_interface2 (line 282)

The UI for importing filesystem downloads.

  • return: The UI
tempcode import_interface2 ()
misc (line 99)

The do-next manager for before download content management.

  • return: The UI
tempcode misc ()
nice_get_ajax_tree (line 421)

Standard aed_module list function.

  • return: The tree field
tempcode nice_get_ajax_tree ()
run_start (line 69)

Standard aed_module run_start.

  • return: The output of the run
tempcode run_start (ID_TEXT $type)
  • ID_TEXT $type: The type of module execution
_import (line 149)

The actualiser for importing FTP downloads.

  • return: The UI
tempcode _import ()
_import2 (line 306)

The actualiser for importing filesystem downloads.

  • return: The UI
tempcode _import2 ()

Inherited Methods

Inherited From standard_aed_module

standard_aed_module::ad()
standard_aed_module::choose_catalogue()
standard_aed_module::do_next_manager()
standard_aed_module::ed()
standard_aed_module::get_entry_points()
standard_aed_module::get_permission_fields()
standard_aed_module::handle_confirmations()
standard_aed_module::info()
standard_aed_module::nice_get_entries()
standard_aed_module::preview_intercept()
standard_aed_module::run()
standard_aed_module::set_permissions()
standard_aed_module::_ad()
standard_aed_module::_ed()
standard_aed_module::__ed()

Documentation generated on Sun, 02 Jan 2011 23:11:15 +0000 by phpDocumentor 1.4.3