Functions

Get width,height,length of a .avi video file.

_get_avi_details(resource $file) : array

Parameters

$file

resource

The file handle

Returns

arrayThe triplet (possibly containing NULL's for when we can't detect properties)

Get width,height,length of a .mov/.qt video file.

_get_mov_details(resource $file) : \?array

Parameters

$file

resource

The file handle

Returns

\?arrayThe triplet (possibly containing NULL's for when we can't detect properties) (NULL: error)

Get chunk-bytes-read,width,height,length of a atom list of a .mov/.qt video file.

_get_mov_details_do_atom_list(resource $file, \?integer $atom_size) : array

Parameters

$file

resource

The file handle

$atom_size

\?integer

The length of the current atom list (NULL: covers full file)

Returns

arrayThe quartet (possibly containing NULL's for when we can't detect properties)

Get width,height,length of a .rm/.ram video file.

_get_ram_details(resource $file) : \?array

Parameters

$file

resource

The file handle

Returns

\?arrayThe triplet (possibly containing NULL's for when we can't detect properties) (NULL: error)

Get width,height,length of a .wmv video file.

_get_wmv_details(resource $file) : array

Parameters

$file

resource

The file handle

Returns

arrayThe triplet (possibly containing NULL's for when we can't detect properties)

Get chunk-bytes-read,width,height,length of a chunk list of a .wmv video file.

_get_wmv_details_do_chunk_list(resource $file, \?integer $chunk_length) : \?array

Parameters

$file

resource

The file handle

$chunk_length

\?integer

The length of the current chunk list (NULL: covers full file)

Returns

\?arrayThe quartet (possibly containing NULL's for when we can't detect properties) (NULL: error)

Watermark the corner of an image.

_watermark_corner(resource $source, \URLPATH $watermark_url, \BINARY $x, \BINARY $y) 

Parameters

$source

resource

The image resource being watermarked

$watermark_url

\URLPATH

The (local) URL to the watermark file

$x

\BINARY

Whether a right hand side corner is being watermarked

$y

\BINARY

Whether a bottom edge corner is being watermarked

Add an image to a specified gallery.

add_image(\SHORT_TEXT $title, \ID_TEXT $cat, \LONG_TEXT $comments, \URLPATH $url, \URLPATH $thumb_url, \BINARY $validated, \BINARY $allow_rating, \BINARY $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes, \?MEMBER $submitter, \?TIME $add_date, \?TIME $edit_date, integer $views, \?AUTO_LINK $id) : \AUTO_LINK

Parameters

$title

\SHORT_TEXT

Image title

$cat

\ID_TEXT

The gallery name

$comments

\LONG_TEXT

The image comments

$url

\URLPATH

The URL to the actual image

$thumb_url

\URLPATH

The URL to the thumbnail of the actual image

$validated

\BINARY

Whether the image has been validated for display on the site

$allow_rating

\BINARY

Whether the image may be rated

$allow_comments

\BINARY

Whether the image may be commented upon

$allow_trackbacks

\BINARY

Whether the image may be trackbacked

$notes

\LONG_TEXT

Hidden notes associated with the image

$submitter

\?MEMBER

The submitter (NULL: current member)

$add_date

\?TIME

The time of adding (NULL: now)

$edit_date

\?TIME

The time of editing (NULL: never)

$views

integer

The number of views

$id

\?AUTO_LINK

Force an ID (NULL: don't force an ID)

Returns

\AUTO_LINKThe ID of the new entry

Add a video to a specified gallery.

add_video(\SHORT_TEXT $title, \ID_TEXT $cat, \LONG_TEXT $comments, \URLPATH $url, \URLPATH $thumb_url, \BINARY $validated, \BINARY $allow_rating, \BINARY $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes, integer $video_length, integer $video_width, integer $video_height, \?MEMBER $submitter, \?TIME $add_date, \?TIME $edit_date, integer $views, \?AUTO_LINK $id) : \AUTO_LINK

Parameters

$title

\SHORT_TEXT

Video title

$cat

\ID_TEXT

The gallery name

$comments

\LONG_TEXT

The video comments

$url

\URLPATH

The URL to the actual video

$thumb_url

\URLPATH

The URL to the thumbnail of the actual video

$validated

\BINARY

Whether the video has been validated for display on the site

$allow_rating

\BINARY

Whether the video may be rated

$allow_comments

\BINARY

Whether the video may be commented upon

$allow_trackbacks

\BINARY

Whether the video may be trackbacked

$notes

\LONG_TEXT

Hidden notes associated with the video

$video_length

integer

The length of the video

$video_width

integer

The width of the video

$video_height

integer

The height of the video

$submitter

\?MEMBER

The submitter (NULL: current member)

$add_date

\?TIME

The time of adding (NULL: now)

$edit_date

\?TIME

The time of editing (NULL: never)

$views

integer

The number of views

$id

\?AUTO_LINK

Force an ID (NULL: don't force an ID)

Returns

\AUTO_LINKThe ID of the new entry

Create a video thumbnail.

create_video_thumb(\URLPATH $src_url, \?PATH $expected_output_path) : \URLPATH

Parameters

$src_url

\URLPATH

Video to get thumbail from (must be local)

$expected_output_path

\?PATH

Where to save to (NULL: decide for ourselves)

Returns

\URLPATHThumbnail, only valid if expected_output_path was passed as NULL (blank: could not generate)

Delete a specified image from the database, and delete the file if possible.

delete_image(\AUTO_LINK $id, boolean $delete_full) 

Parameters

$id

\AUTO_LINK

The ID of the image

$delete_full

boolean

Whether to delete the actual file also

Delete a video in a specified gallery.

delete_video(\AUTO_LINK $id, boolean $delete_full) 

Parameters

$id

\AUTO_LINK

The ID of the entry to delete

$delete_full

boolean

Whether to delete the actual video file from disk as well as the entry

Edit an image in a specified gallery.

edit_image(\AUTO_LINK $id, \SHORT_TEXT $title, \ID_TEXT $cat, \LONG_TEXT $comments, \URLPATH $url, \URLPATH $thumb_url, \BINARY $validated, \BINARY $allow_rating, \BINARY $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes, \SHORT_TEXT $meta_keywords, \LONG_TEXT $meta_description) 

Parameters

$id

\AUTO_LINK

The ID of the image to edit

$title

\SHORT_TEXT

Image title

$cat

\ID_TEXT

The gallery name

$comments

\LONG_TEXT

The image comments

$url

\URLPATH

The URL to the actual image

$thumb_url

\URLPATH

The URL to the thumbnail of the actual image

$validated

\BINARY

Whether the image has been validated for display on the site

$allow_rating

\BINARY

Whether the image may be rated

$allow_comments

\BINARY

Whether the image may be commented upon

$allow_trackbacks

\BINARY

Whether the image may be trackbacked

$notes

\LONG_TEXT

Hidden notes associated with the image

$meta_keywords

\SHORT_TEXT

Meta keywords

$meta_description

\LONG_TEXT

Meta description

Edit a video in a specified gallery.

edit_video(\AUTO_LINK $id, \SHORT_TEXT $title, \ID_TEXT $cat, \LONG_TEXT $comments, \URLPATH $url, \URLPATH $thumb_url, \BINARY $validated, \BINARY $allow_rating, \BINARY $allow_comments, \BINARY $allow_trackbacks, \LONG_TEXT $notes, integer $video_length, integer $video_width, integer $video_height, \SHORT_TEXT $meta_keywords, \LONG_TEXT $meta_description) 

Parameters

$id

\AUTO_LINK

The ID of the entry to edit

$title

\SHORT_TEXT

Video title

$cat

\ID_TEXT

The gallery name

$comments

\LONG_TEXT

The video comments

$url

\URLPATH

The URL to the actual video

$thumb_url

\URLPATH

The URL to the thumbnail of the actual video

$validated

\BINARY

Whether the video has been validated for display on the site

$allow_rating

\BINARY

Whether the video may be rated

$allow_comments

\BINARY

Whether the video may be commented upon

$allow_trackbacks

\BINARY

Whether the video may be trackbacked

$notes

\LONG_TEXT

Hidden notes associated with the video

$video_length

integer

The length of the video

$video_width

integer

The width of the video

$video_height

integer

The height of the video

$meta_keywords

\SHORT_TEXT

Meta keywords

$meta_description

\LONG_TEXT

Meta description

Get a comma-separated list of allowed file types for video upload.

get_allowed_video_file_types() : string

Returns

stringAllowed file types

Get width,height,length of a video file.

get_video_details(\PATH $file_path, string $filename, boolean $delay_errors) : \~array

Note: unfortunately mpeg is not possible without huge amounts of code.

Parameters

$file_path

\PATH

The path to the video file

$filename

string

The original filename of the video file (so we can find the file type from the file extension)

$delay_errors

boolean

Whether to skip over errored files instead of dying. We don't currently make use of this as our readers aren't sophisticard enough to properly spot erroneous situations.

Returns

\~arrayThe triplet of width/height/length (possibly containing NULL's for when we can't detect properties) (false: error)

Standard code module initialisation function.

init__galleries() 

See whether a gallery is NOT a download gallery (designed as a filter).

only_conventional_galleries(\ID_TEXT $cat) : boolean

Parameters

$cat

\ID_TEXT

The gallery name

Returns

booleanWhether the gallery is NOT a download gallery

See whether a gallery is a download gallery (designed as a filter).

only_download_galleries(\ID_TEXT $cat) : boolean

Parameters

$cat

\ID_TEXT

The gallery name

Returns

booleanWhether the gallery is a download gallery

See whether the GET parameter 'id' is of a gallery that is a member gallery of the given member gallery container, or just a normal gallery.

only_member_galleries_of_id(\ID_TEXT $cat, \?MEMBER $member_id, integer $child_count) : boolean

Parameters

$cat

\ID_TEXT

The gallery name

$member_id

\?MEMBER

Member we are filtering for (NULL: not needed)

$child_count

integer

The number of children for this gallery

Returns

booleanThe answer

Read an integer from the given binary chunk.

read_intel_endian_int(string $buffer) : integer

The integer is in intel endian form.

Parameters

$buffer

string

The binary chunk

Returns

integerThe integer

Read an integer from the given binary chunk.

read_network_endian_int(string $buffer) : integer

The integer is in network endian form.

Parameters

$buffer

string

The binary chunk

Returns

integerThe integer

Render an image box.

render_image_box(array $row, \ID_TEXT $zone) : \tempcode

Parameters

$row

array

The video row

$zone

\ID_TEXT

The zone the galleries module is in

Returns

\tempcodeThe rendered box

Render a video box.

render_video_box(array $row, \ID_TEXT $zone) : \tempcode

Parameters

$row

array

The video row

$zone

\ID_TEXT

The zone the galleries module is in

Returns

\tempcodeThe rendered box

Get preview detailing for a video.

show_video_details(array $myrow) : \tempcode

Parameters

$myrow

array

The database row of the video

Returns

\tempcodeThe preview

Note that a zencoder transcode has failed.

store_transcoding_failure(\ID_TEXT $transcoder_id) 

Parameters

$transcoder_id

\ID_TEXT

Transcoding ID

Handle that a zencoder transcode has worked.

store_transcoding_success(\ID_TEXT $transcoder_id) 

Parameters

$transcoder_id

\ID_TEXT

Transcoding ID

Transcode a video.

transcode_video(\URLPATH $url, \ID_TEXT $table, \ID_TEXT $url_field, \?ID_TEXT $orig_filename_field, \?ID_TEXT $width_field, \?ID_TEXT $height_field) : \URLPATH

Parameters

$url

\URLPATH

Video to transcoded.

$table

\ID_TEXT

The table we are saving into

$url_field

\ID_TEXT

Name of the URL field in the table

$orig_filename_field

\?ID_TEXT

Name of the original filename field in the table (NULL: built into URL field)

$width_field

\?ID_TEXT

Name of the width field in the table (NULL: none)

$height_field

\?ID_TEXT

Name of the height field in the table (NULL: none)

Returns

\URLPATHTranscoded file (or original URL if no change was made)

Receive a message from zencoder that a video has transcoded.

zencoder_receive_script() 

Constants

 

GETID3_HELPERAPPSDIR

GETID3_HELPERAPPSDIR