Function __global->add_video

Definitions

sources/galleries2.php

  • Add a video to a specified gallery.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$title SHORT_TEXT No No required parameter N/A N/A Video title
$cat ID_TEXT No No required parameter N/A N/A The gallery name
$description LONG_TEXT No No required parameter N/A N/A The video description
$url URLPATH No No required parameter N/A N/A The URL to the actual video
$thumb_url URLPATH No No required parameter N/A N/A The URL to the thumbnail of the actual video
$validated BINARY No No required parameter N/A N/A Whether the video has been validated for display on the site
$allow_rating BINARY No No required parameter N/A N/A Whether the video may be rated
$allow_comments SHORT_INTEGER No No required parameter N/A N/A Whether the video may be commented upon
$allow_trackbacks BINARY No No required parameter N/A N/A Whether the video may be trackbacked
$notes LONG_TEXT No No required parameter N/A N/A Hidden notes associated with the video
$video_length integer No No required parameter N/A N/A The length of the video
$video_width integer No No required parameter N/A N/A The width of the video
$video_height integer No No required parameter N/A N/A The height of the video
$closed_captions_url URLPATH No No Blank (empty string) N/A N/A The URL to the closed captions file for the video
$submitter ?MEMBER No No Null N/A N/A The submitter (null: current member)
$add_date ?TIME No No Null N/A N/A The time of adding (null: now)
$edit_date ?TIME No No Null N/A N/A The time of editing (null: never)
$views integer No No 0 N/A N/A The number of views
$id ?AUTO_LINK No No Null N/A N/A Force an ID (null: don't force an ID)
$meta_keywords ?SHORT_TEXT No No Blank (empty string) N/A N/A Meta keywords for this resource (null: do not edit) (blank: implicit)
$meta_description ?LONG_TEXT No No Blank (empty string) N/A N/A Meta description for this resource (null: do not edit) (blank: implicit)
$regions array No No [] N/A N/A The regions (empty: not region-limited)

Returns

  • The ID of the new entry
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Add a video to a specified gallery.
 *
 * @param  SHORT_TEXT $title Video title
 * @param  ID_TEXT $cat The gallery name
 * @param  LONG_TEXT $description The video description
 * @param  URLPATH $url The URL to the actual video
 * @param  URLPATH $thumb_url The URL to the thumbnail of the actual video
 * @param  BINARY $validated Whether the video has been validated for display on the site
 * @param  BINARY $allow_rating Whether the video may be rated
 * @param  SHORT_INTEGER $allow_comments Whether the video may be commented upon
 * @param  BINARY $allow_trackbacks Whether the video may be trackbacked
 * @param  LONG_TEXT $notes Hidden notes associated with the video
 * @param  integer $video_length The length of the video
 * @param  integer $video_width The width of the video
 * @param  integer $video_height The height of the video
 * @param  URLPATH $closed_captions_url The URL to the closed captions file for the video
 * @param  ?MEMBER $submitter The submitter (null: current member)
 * @param  ?TIME $add_date The time of adding (null: now)
 * @param  ?TIME $edit_date The time of editing (null: never)
 * @param  integer $views The number of views
 * @param  ?AUTO_LINK $id Force an ID (null: don't force an ID)
 * @param  ?SHORT_TEXT $meta_keywords Meta keywords for this resource (null: do not edit) (blank: implicit)
 * @param  ?LONG_TEXT $meta_description Meta description for this resource (null: do not edit) (blank: implicit)
 * @param  array $regions The regions (empty: not region-limited)
 * @return AUTO_LINK The ID of the new entry
 */

function add_video(string $title, string $cat, string $description, string $url, string $thumb_url, int $validated, int $allow_rating, int $allow_comments, int $allow_trackbacks, string $notes, int $video_length, int $video_width, int $video_height, string $closed_captions_url = '', ?int $submitter = null, ?int $add_date = null, ?int $edit_date = null, int $views = 0, ?int $id = null, ?string $meta_keywords = '', ?string $meta_description = '', array $regions = []) : int