/sources/galleries.php

Description
Functions
can_submit_to_gallery (line 504)

See whether the current member can submit to the named member gallery. Note - this function assumes that members have general submit permission, and does not check for gallery read access.

  • return: The owner of the gallery (false: we aren't allowed to submit to it) (-2: not a member gallery)
~integer can_submit_to_gallery (ID_TEXT $name)
  • ID_TEXT $name: The gallery name
gallery_breadcrumbs (line 525)

Get a UI element of a route from a known gallery back to the declared root of the tree.

  • return: The navigation element
tempcode gallery_breadcrumbs (ID_TEXT $category_id, [ID_TEXT $root = 'root'], [boolean $no_link_for_me_sir = true], [ID_TEXT $zone = ''])
  • ID_TEXT $category_id: The gallery name
  • ID_TEXT $root: The virtual root
  • boolean $no_link_for_me_sir: Whether not to put a link at this point in the navigation tree (usually, because the viewer is already at it)
  • ID_TEXT $zone: The zone that the linked to gallery module is in
gallery_has_content (line 53)

Find whether a certain gallery has any content (images, videos, or subgalleries).

  • return: The answer
boolean gallery_has_content (ID_TEXT $name)
  • ID_TEXT $name: The name of the gallery
get_default_gallery_max (line 39)

Find the default number of images per page in the galleries.

  • return: Images per page
integer get_default_gallery_max ()
get_gallery_content_tree (line 606)

Get a list of maps containing all the gallery entries, and path information, under the specified gallery - and those beneath it, recursively.

  • return: A list of maps for all galleries. Each map entry containins the fields 'id' (gallery ID) and 'tree' (tree path to the category, including the categories own title), and more. Or if $use_compound_list, the tree structure built with pairs containing the compound list in addition to the child branches
array get_gallery_content_tree (ID_TEXT $table, [?AUTO_LINK $submitter = NULL], [?ID_TEXT $gallery = NULL], [?string $tree = NULL], [?ID_TEXT $title = NULL], [?integer $levels = NULL], [boolean $use_compound_list = false], [boolean $editable_filter = false])
  • ID_TEXT $table: The table we are working with
  • ?AUTO_LINK $submitter: Only show images/videos submitted by this member (NULL: no filter)
  • ?ID_TEXT $gallery: The gallery being at the root of our recursion (NULL: true root)
  • ?string $tree: The tree up to this point in the recursion (NULL: blank, as we are starting the recursion)
  • ?ID_TEXT $title: The name of the $gallery we are currently going through (NULL: look it up). This is here for efficiency reasons, as finding children IDs to recurse to also reveals the childs title
  • ?integer $levels: The number of recursive levels to search (NULL: all)
  • boolean $use_compound_list: Whether to get a list of child galleries (not just direct ones, recursively), instead of just IDs
  • boolean $editable_filter: Whether to only show for what may be edited by the current member
get_gallery_tree (line 313)

Gets a gallery selection tree list, extending deeper from the given category_id, showing all sub(sub...)galleries.

  • return: The tree structure, or if $use_compound_list, the tree structure built with pairs containing the compound list in addition to the child branches
array get_gallery_tree ([?ID_TEXT $category_id = 'root'], [string $tree = ''], [?array $gallery_info = NULL], [boolean $do_stats = true], [?string $filter = NULL], [boolean $must_accept_images = false], [boolean $must_accept_videos = false], [boolean $purity = false], [boolean $use_compound_list = false], [?integer $levels = NULL], [?MEMBER $member_id = NULL], [boolean $addable_filter = false])
  • ?ID_TEXT $category_id: The gallery we are getting the tree starting from (NULL: root)
  • string $tree: The parent tree at this point of the recursion
  • ?array $gallery_info: The database row for the $category_id gallery (NULL: get it from the DB)
  • boolean $do_stats: Whether to include video/image statistics in the returned tree
  • ?string $filter: A function name to filter galleries with (NULL: no filter)
  • boolean $must_accept_images: Whether displayed galleries must support images
  • boolean $must_accept_videos: Whether displayed galleries must support videos
  • boolean $purity: Whether to NOT show member galleries that do not exist yet
  • boolean $use_compound_list: Whether to get a list of child galleries (not just direct ones, recursively), instead of just IDs
  • ?integer $levels: The number of recursive levels to search (NULL: all)
  • ?MEMBER $member_id: Member we are filtering for (NULL: not needed)
  • boolean $addable_filter: Whether to only show for what may be added to by the current member
get_member_id_from_gallery_name (line 105)

Find the owner of a gallery.

  • return: The owner of the gallery (NULL: not a member owned gallery)
?MEMBER get_member_id_from_gallery_name (ID_TEXT $gallery_name)
  • ID_TEXT $gallery_name: The name of the gallery
get_recursive_gallery_details (line 196)

Get details of the contents of a gallery.

  • return: A triplet: (num children, num images, num videos)
array get_recursive_gallery_details (ID_TEXT $name, [boolean $test_videos = true], [boolean $test_images = true])
  • ID_TEXT $name: The name of the gallery
  • boolean $test_videos: Whether to test for videos when making counts (ignore this parameter - used internally)
  • boolean $test_images: Whether to test for images when making counts (ignore this parameter - used internally)
init__galleries (line 24)

Standard code module initialisation function.

void init__galleries ()
nice_get_gallery_content_tree (line 571)

Get a nice, formatted XHTML list of gallery entries, in gallery tree structure

  • return: The list of entries
tempcode nice_get_gallery_content_tree (ID_TEXT $table, [?ID_TEXT $it = NULL], [?AUTO_LINK $submitter = NULL], [boolean $use_compound_list = false], [boolean $editable_filter = false])
  • ID_TEXT $table: The table we are working with
  • ?ID_TEXT $it: The currently selected entry (NULL: none selected)
  • ?AUTO_LINK $submitter: Only show images/videos submitted by this member (NULL: no filter)
  • boolean $use_compound_list: Whether to get a list of child galleries (not just direct ones, recursively), instead of just IDs
  • boolean $editable_filter: Whether to only show for what may be edited by the current member
nice_get_gallery_tree (line 277)

Gets a gallery selection tree list, extending deeper from the given category_id, showing all sub(sub...)galleries.

  • return: The tree list
tempcode nice_get_gallery_tree ([?ID_TEXT $it = NULL], [?string $filter = NULL], [boolean $must_accept_images = false], [boolean $must_accept_videos = false], [boolean $purity = false], [boolean $use_compound_list = false], [?MEMBER $member_id = NULL], [boolean $addable_filter = false])
  • ?ID_TEXT $it: The gallery to select by default (NULL: no specific default)
  • ?string $filter: A function name to filter galleries with (NULL: no filter)
  • boolean $must_accept_images: Whether displayed galleries must support images
  • boolean $must_accept_videos: Whether displayed galleries must support videos
  • boolean $purity: Whether to NOT show member galleries that do not exist yet
  • boolean $use_compound_list: Whether to get a list of child galleries (not just direct ones, recursively), instead of just IDs
  • ?MEMBER $member_id: Member we are filtering for (NULL: not needed)
  • boolean $addable_filter: Whether to only show for what may be added to by the current member
only_conventional_galleries (line 245)

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

  • return: Whether the gallery is NOT a download gallery
boolean only_conventional_galleries (ID_TEXT $cat)
  • ID_TEXT $cat: The gallery name
only_download_galleries (line 234)

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

  • return: Whether the gallery is a download gallery
boolean only_download_galleries (ID_TEXT $cat)
  • ID_TEXT $cat: The gallery name
only_member_galleries_of_id (line 258)

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.

  • return: The answer
boolean only_member_galleries_of_id (ID_TEXT $cat, ?MEMBER $member_id, integer $child_count)
  • ID_TEXT $cat: The gallery name
  • ?MEMBER $member_id: Member we are filtering for (NULL: not needed)
  • integer $child_count: The number of children for this gallery
show_gallery_box (line 134)

Get preview detailing for a gallery.

  • return: The preview
tempcode show_gallery_box (array $child, [ID_TEXT $root = 'root'], [boolean $show_member_stats_if_appropriate = false], [ID_TEXT $zone = '_SEARCH'], [boolean $quit_if_empty = true], [boolean $preview = false])
  • array $child: The database row of the gallery
  • ID_TEXT $root: The virtual root of the gallery
  • boolean $show_member_stats_if_appropriate: Whether to show member stats if it is a member owned gallery
  • ID_TEXT $zone: The zone that the gallery module we are linking to is in
  • boolean $quit_if_empty: Whether to not show anything if the gallery is empty
  • boolean $preview: Whether only to show 'preview' details
show_video_details (line 118)

Get preview detailing for a video.

  • return: The preview
tempcode show_video_details (array $myrow)
  • array $myrow: The database row of the video

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