/sources/galleries2.php

Description
Functions
add_gallery (line 781)

Add a gallery with the specified parameters.

void add_gallery (ID_TEXT $name, SHORT_TEXT $fullname, LONG_TEXT $description, SHORT_TEXT $teaser, LONG_TEXT $notes, ID_TEXT $parent_id, [BINARY $accept_images = 1], [BINARY $accept_videos = 1], [BINARY $is_member_synched = 0], [BINARY $flow_mode_interface = 0], [URLPATH $rep_image = ''], [URLPATH $watermark_top_left = ''], [URLPATH $watermark_top_right = ''], [URLPATH $watermark_bottom_left = ''], [URLPATH $watermark_bottom_right = ''], [BINARY $allow_rating = 1], [BINARY $allow_comments = 1], [boolean $skip_exists_check = false], [?TIME $add_date = NULL])
  • ID_TEXT $name: The gallery codename
  • SHORT_TEXT $fullname: The full human-readeable name of the gallery
  • LONG_TEXT $description: The description of the gallery
  • SHORT_TEXT $teaser: Teaser text for the gallery
  • LONG_TEXT $notes: Hidden notes associated with the gallery
  • ID_TEXT $parent_id: The parent gallery (blank: no parent)
  • BINARY $accept_images: Whether images may be put in this gallery
  • BINARY $accept_videos: Whether videos may be put in this gallery
  • BINARY $is_member_synched: Whether the gallery serves as a container for automatically created member galleries
  • BINARY $flow_mode_interface: Whether the gallery uses the flow mode interface
  • URLPATH $rep_image: The representative image of the gallery (blank: none)
  • URLPATH $watermark_top_left: Watermark (blank: none)
  • URLPATH $watermark_top_right: Watermark (blank: none)
  • URLPATH $watermark_bottom_left: Watermark (blank: none)
  • URLPATH $watermark_bottom_right: Watermark (blank: none)
  • BINARY $allow_rating: Whether rating are allowed
  • BINARY $allow_comments: Whether comments are allowed
  • boolean $skip_exists_check: Whether to skip the check for whether the gallery exists (useful for importers)
  • ?TIME $add_date: The add time (NULL: now)
add_image (line 382)

Add an image to a specified gallery.

  • return: The ID of the new entry
AUTO_LINK add_image (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 = NULL], [?TIME $add_date = NULL], [?TIME $edit_date = NULL], [integer $views = 0], [?AUTO_LINK $id = NULL])
  • ID_TEXT $cat: The gallery name
  • LONG_TEXT $comments: The image comments
  • URLPATH $url: The URL to the actual image
  • URLPATH $thumb_url: The URL to the thumbnail of the actual image
  • BINARY $validated: Whether the image has been validated for display on the site
  • BINARY $allow_rating: Whether the image may be rated
  • BINARY $allow_comments: Whether the image may be commented upon
  • BINARY $allow_trackbacks: Whether the image may be trackbacked
  • LONG_TEXT $notes: Hidden notes associated with the image
  • ?MEMBER $submitter: The submitter (NULL: current member)
  • ?TIME $add_date: The time of adding (NULL: now)
  • ?TIME $edit_date: The time of editing (NULL: never)
  • integer $views: The number of views
  • ?AUTO_LINK $id: Force an ID (NULL: don't force an ID)
add_video (line 566)

Add a video to a specified gallery.

  • return: The ID of the new entry
AUTO_LINK add_video (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 = NULL], [?TIME $add_date = NULL], [?TIME $edit_date = NULL], [integer $views = 0], [?AUTO_LINK $id = NULL])
  • ID_TEXT $cat: The gallery name
  • LONG_TEXT $comments: The video comments
  • URLPATH $url: The URL to the actual video
  • URLPATH $thumb_url: The URL to the thumbnail of the actual video
  • BINARY $validated: Whether the video has been validated for display on the site
  • BINARY $allow_rating: Whether the video may be rated
  • BINARY $allow_comments: Whether the video may be commented upon
  • BINARY $allow_trackbacks: Whether the video may be trackbacked
  • LONG_TEXT $notes: Hidden notes associated with the video
  • integer $video_length: The length of the video
  • integer $video_width: The width of the video
  • integer $video_height: The height of the video
  • ?MEMBER $submitter: The submitter (NULL: current member)
  • ?TIME $add_date: The time of adding (NULL: now)
  • ?TIME $edit_date: The time of editing (NULL: never)
  • integer $views: The number of views
  • ?AUTO_LINK $id: Force an ID (NULL: don't force an ID)
constrain_gallery_image_to_max_size (line 749)

Make sure the detailed image file is not bigger than the defined box width.

void constrain_gallery_image_to_max_size (PATH $file_path, string $filename, integer $box_width)
  • PATH $file_path: The path to the image file
  • string $filename: The original filename of the image
  • integer $box_width: The box width
delete_gallery (line 933)

Delete a specified gallery.

void delete_gallery (ID_TEXT $name)
  • ID_TEXT $name: The gallery codename
delete_image (line 447)

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

void delete_image (AUTO_LINK $id, boolean $delete_full)
  • AUTO_LINK $id: The ID of the image
  • boolean $delete_full: Whether to delete the actual file also
delete_video (line 638)

Delete a video in a specified gallery.

void delete_video (AUTO_LINK $id, boolean $delete_full)
  • AUTO_LINK $id: The ID of the entry to delete
  • boolean $delete_full: Whether to delete the actual video file from disk as well as the entry
edit_gallery (line 842)

Edit a gallery.

void edit_gallery (ID_TEXT $old_name, ID_TEXT $name, SHORT_TEXT $fullname, LONG_TEXT $description, SHORT_TEXT $teaser, LONG_TEXT $notes, [?ID_TEXT $parent_id = NULL], [BINARY $accept_images = 1], [BINARY $accept_videos = 1], [BINARY $is_member_synched = 0], [BINARY $flow_mode_interface = 0], [URLPATH $rep_image = ''], [URLPATH $watermark_top_left = ''], [URLPATH $watermark_top_right = ''], [URLPATH $watermark_bottom_left = ''], [URLPATH $watermark_bottom_right = ''], [?SHORT_TEXT $meta_keywords = NULL], [?LONG_TEXT $meta_description = NULL], [BINARY $allow_rating = 1], [BINARY $allow_comments = 1])
  • ID_TEXT $old_name: The old gallery codename (in case we are renaming)
  • ID_TEXT $name: The gallery codename (maybe the same as the old one)
  • SHORT_TEXT $fullname: The full human-readeable name of the gallery
  • LONG_TEXT $description: The description of the gallery
  • SHORT_TEXT $teaser: Teaser text for the gallery
  • LONG_TEXT $notes: Hidden notes associated with the gallery
  • ?ID_TEXT $parent_id: The parent gallery (NULL: no parent)
  • BINARY $accept_images: Whether images may be put in this gallery
  • BINARY $accept_videos: Whether videos may be put in this gallery
  • BINARY $is_member_synched: Whether the gallery serves as a container for automatically created member galleries
  • BINARY $flow_mode_interface: Whether the gallery uses the flow mode interface
  • URLPATH $rep_image: The representative image of the gallery (blank: none)
  • URLPATH $watermark_top_left: Watermark (blank: none)
  • URLPATH $watermark_top_right: Watermark (blank: none)
  • URLPATH $watermark_bottom_left: Watermark (blank: none)
  • URLPATH $watermark_bottom_right: Watermark (blank: none)
  • ?SHORT_TEXT $meta_keywords: Meta keywords for this resource (NULL: do not edit)
  • ?LONG_TEXT $meta_description: Meta description for this resource (NULL: do not edit)
  • BINARY $allow_rating: Whether rating are allowed
  • BINARY $allow_comments: Whether comments are allowed
edit_image (line 419)

Edit an image in a specified gallery.

void edit_image (AUTO_LINK $id, 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)
  • AUTO_LINK $id: The ID of the image to edit
  • ID_TEXT $cat: The gallery name
  • LONG_TEXT $comments: The image comments
  • URLPATH $url: The URL to the actual image
  • URLPATH $thumb_url: The URL to the thumbnail of the actual image
  • BINARY $validated: Whether the image has been validated for display on the site
  • BINARY $allow_rating: Whether the image may be rated
  • BINARY $allow_comments: Whether the image may be commented upon
  • BINARY $allow_trackbacks: Whether the image may be trackbacked
  • LONG_TEXT $notes: Hidden notes associated with the image
  • SHORT_TEXT $meta_keywords: Meta keywords
  • LONG_TEXT $meta_description: Meta description
edit_video (line 608)

Edit a video in a specified gallery.

void edit_video (AUTO_LINK $id, 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)
  • AUTO_LINK $id: The ID of the entry to edit
  • ID_TEXT $cat: The gallery name
  • LONG_TEXT $comments: The video comments
  • URLPATH $url: The URL to the actual video
  • URLPATH $thumb_url: The URL to the thumbnail of the actual video
  • BINARY $validated: Whether the video has been validated for display on the site
  • BINARY $allow_rating: Whether the video may be rated
  • BINARY $allow_comments: Whether the video may be commented upon
  • BINARY $allow_trackbacks: Whether the video may be trackbacked
  • LONG_TEXT $notes: Hidden notes associated with the video
  • integer $video_length: The length of the video
  • integer $video_width: The width of the video
  • integer $video_height: The height of the video
  • SHORT_TEXT $meta_keywords: Meta keywords
  • LONG_TEXT $meta_description: Meta description
get_video_details (line 29)

Get width,height,length of a video file. Note: unfortunately mpeg is not possible without huge amounts of code.

  • return: The triplet of width/height/length (possibly containing NULL's for when we can't detect properties) (false: error)
~array get_video_details (PATH $file_path, string $filename, [boolean $delay_errors = false])
  • PATH $file_path: The path to the video file
  • string $filename: The original filename of the video file (so we can find the file type from the file extension)
  • boolean $delay_errors: 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.
make_member_gallery_if_needed (line 998)

The UI shows member galleries that do not exist. If it is a member gallery, and it does not exist, it'll need making, before something can be added. This gallery performs the check and makes the gallery if needed.

void make_member_gallery_if_needed (ID_TEXT $cat)
  • ID_TEXT $cat: The gallery name
read_intel_endian_int (line 113)

Read an integer from the given binary chunk. The integer is in intel endian form.

  • return: The integer
integer read_intel_endian_int (string $buffer)
  • string $buffer: The binary chunk
read_network_endian_int (line 129)

Read an integer from the given binary chunk. The integer is in network endian form.

  • return: The integer
integer read_network_endian_int (string $buffer)
  • string $buffer: The binary chunk
transcode_video (line 482)

Transcode a video using mencoder.

  • return: Transcoded file (or original URL if no change was made)
URLPATH transcode_video (URLPATH $url)
  • URLPATH $url: Video to transcoded
watermark_gallery_image (line 673)

Watermarks an image with the appropriate gallery watermarks.

void watermark_gallery_image (ID_TEXT $gallery, PATH $file_path, string $filename)
  • ID_TEXT $gallery: The name of the gallery for the image
  • PATH $file_path: The path to the image file
  • string $filename: The original file name of the image
_get_avi_details (line 226)

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

  • return: The triplet (possibly containing NULL's for when we can't detect properties)
array _get_avi_details (resource $file)
  • resource $file: The file handle
_get_mov_details (line 275)

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

  • return: The triplet (possibly containing NULL's for when we can't detect properties) (NULL: error)
?array _get_mov_details (resource $file)
  • resource $file: The file handle
_get_mov_details_do_atom_list (line 291)

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

  • return: The quartet (possibly containing NULL's for when we can't detect properties)
array _get_mov_details_do_atom_list (resource $file, [?integer $atom_size = NULL])
  • resource $file: The file handle
  • ?integer $atom_size: The length of the current atom list (NULL: covers full file)
_get_ram_details (line 245)

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

  • return: The triplet (possibly containing NULL's for when we can't detect properties) (NULL: error)
?array _get_ram_details (resource $file)
  • resource $file: The file handle
_get_wmv_details (line 145)

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

  • return: The triplet (possibly containing NULL's for when we can't detect properties)
array _get_wmv_details (resource $file)
  • resource $file: The file handle
_get_wmv_details_do_chunk_list (line 159)

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

  • return: The quartet (possibly containing NULL's for when we can't detect properties) (NULL: error)
?array _get_wmv_details_do_chunk_list (resource $file, [?integer $chunk_length = NULL])
  • resource $file: The file handle
  • ?integer $chunk_length: The length of the current chunk list (NULL: covers full file)
_watermark_corner (line 726)

Watermark the corner of an image.

void _watermark_corner (resource $source, URLPATH $watermark_url, BINARY $x, BINARY $y)
  • resource $source: The image resource being watermarked
  • URLPATH $watermark_url: The (local) URL to the watermark file
  • BINARY $x: Whether a right hand side corner is being watermarked
  • BINARY $y: Whether a bottom edge corner is being watermarked

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