Function __global->edit_gallery

Definitions

sources/galleries2.php

  • Edit a gallery.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$old_name ID_TEXT No No required parameter N/A N/A The old gallery codename (in case we are renaming)
$name ID_TEXT No No required parameter N/A N/A The gallery codename (maybe the same as the old one)
$fullname SHORT_TEXT No No required parameter N/A N/A The full human-readable name of the gallery
$description LONG_TEXT No No required parameter N/A N/A The description of the gallery
$notes LONG_TEXT No No required parameter N/A N/A Hidden notes associated with the gallery
$parent_id ?ID_TEXT No No Null N/A N/A The parent gallery (null: no parent)
$accept_images BINARY No No 1 N/A N/A Whether images may be put in this gallery
$accept_videos BINARY No No 1 N/A N/A Whether videos may be put in this gallery
$is_member_synched BINARY No No 0 N/A N/A Whether the gallery serves as a container for automatically created member galleries
$layout_mode ?ID_TEXT No No Null N/A N/A The layout mode this gallery uses (null: preserve existing mode)
$rep_image ?URLPATH No No Null N/A N/A The representative image of the gallery (null: none)
$watermark_top_left ?URLPATH No No Null N/A N/A Watermark (null: none)
$watermark_top_right ?URLPATH No No Null N/A N/A Watermark (null: none)
$watermark_bottom_left ?URLPATH No No Null N/A N/A Watermark (null: none)
$watermark_bottom_right ?URLPATH No No Null N/A N/A Watermark (null: none)
$gallery_sort ?SHORT_TEXT No No Null N/A N/A The sort order for sub-galleries (null: do not edit)
$media_sort ?SHORT_TEXT No No Null N/A N/A The sort order for media within the gallery (null: do not edit)
$meta_keywords ?SHORT_TEXT No No Null N/A N/A Meta keywords for this resource (null: do not edit)
$meta_description ?LONG_TEXT No No Null N/A N/A Meta description for this resource (null: do not edit)
$allow_rating BINARY No No 1 N/A N/A Whether rating are allowed
$allow_comments SHORT_INTEGER No No 1 N/A N/A Whether comments are allowed
$g_owner ?MEMBER No No Null N/A N/A The gallery owner (null: nobody)
$add_time ?TIME No No Null N/A N/A The add time (null: now)
$null_is_literal boolean No No False N/A N/A Determines whether some nulls passed mean 'use a default' or literally mean 'set to null'
$uniqify boolean No No False N/A N/A Whether to force the name as unique, if there's a conflict

Returns

  • The name
  • Type: ID_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Edit a gallery.
 *
 * @param  ID_TEXT $old_name The old gallery codename (in case we are renaming)
 * @param  ID_TEXT $name The gallery codename (maybe the same as the old one)
 * @param  SHORT_TEXT $fullname The full human-readable name of the gallery
 * @param  LONG_TEXT $description The description of the gallery
 * @param  LONG_TEXT $notes Hidden notes associated with the gallery
 * @param  ?ID_TEXT $parent_id The parent gallery (null: no parent)
 * @param  BINARY $accept_images Whether images may be put in this gallery
 * @param  BINARY $accept_videos Whether videos may be put in this gallery
 * @param  BINARY $is_member_synched Whether the gallery serves as a container for automatically created member galleries
 * @param  ?ID_TEXT $layout_mode The layout mode this gallery uses (null: preserve existing mode)
 * @param  ?URLPATH $rep_image The representative image of the gallery (null: none)
 * @param  ?URLPATH $watermark_top_left Watermark (null: none)
 * @param  ?URLPATH $watermark_top_right Watermark (null: none)
 * @param  ?URLPATH $watermark_bottom_left Watermark (null: none)
 * @param  ?URLPATH $watermark_bottom_right Watermark (null: none)
 * @param  ?SHORT_TEXT $gallery_sort The sort order for sub-galleries (null: do not edit)
 * @param  ?SHORT_TEXT $media_sort The sort order for media within the gallery (null: do not edit)
 * @param  ?SHORT_TEXT $meta_keywords Meta keywords for this resource (null: do not edit)
 * @param  ?LONG_TEXT $meta_description Meta description for this resource (null: do not edit)
 * @param  BINARY $allow_rating Whether rating are allowed
 * @param  SHORT_INTEGER $allow_comments Whether comments are allowed
 * @param  ?MEMBER $g_owner The gallery owner (null: nobody)
 * @param  ?TIME $add_time The add time (null: now)
 * @param  boolean $null_is_literal Determines whether some nulls passed mean 'use a default' or literally mean 'set to null'
 * @param  boolean $uniqify Whether to force the name as unique, if there's a conflict
 * @return ID_TEXT The name
 */

function edit_gallery(string $old_name, string $name, string $fullname, string $description, string $notes, ?string $parent_id = null, int $accept_images = 1, int $accept_videos = 1, int $is_member_synched = 0, ?string $layout_mode = null, ?string $rep_image = null, ?string $watermark_top_left = null, ?string $watermark_top_right = null, ?string $watermark_bottom_left = null, ?string $watermark_bottom_right = null, ?string $gallery_sort = null, ?string $media_sort = null, ?string $meta_keywords = null, ?string $meta_description = null, int $allow_rating = 1, int $allow_comments = 1, ?int $g_owner = null, ?int $add_time = null, bool $null_is_literal = false, bool $uniqify = false) : string