Function __global->edit_banner

Definitions

sources/banners2.php

  • Edit a banner.
  • 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 current name of the banner
$name ID_TEXT No No required parameter N/A N/A The new name of the banner
$imgurl URLPATH No No required parameter N/A N/A The URL to the banner image
$title_text SHORT_TEXT No No required parameter N/A N/A The title text for the banner (only used for text banners, and functions as the 'trigger text' if the banner type is shown inline)
$caption SHORT_TEXT No No required parameter N/A N/A The caption of the banner
$direct_code LONG_TEXT No No required parameter N/A N/A Complete HTML/PHP for the banner
$campaign_remaining ?integer No No required parameter N/A 0 max The number of hits the banner may have (null: not applicable for this banner type)
$site_url URLPATH No No required parameter N/A N/A The URL to the site the banner leads to
$display_likelihood integer No No required parameter N/A 1 max The banner's "Display likelihood"
$notes LONG_TEXT No No required parameter N/A N/A Any notes associated with the banner
$deployment_agreement SHORT_INTEGER No No required parameter 0 1 2 N/A The type of banner (a BANNER_* constant)
$expiry_date ?TIME No No required parameter N/A N/A The banner expiry date (null: never)
$submitter ?MEMBER No No required parameter N/A N/A The banners submitter (null: leave unchanged)
$validated BINARY No No required parameter N/A N/A Whether the banner has been validated
$b_type ID_TEXT No No required parameter N/A N/A The banner type (can be anything, where blank means 'normal')
$b_types array No No [] N/A N/A The secondary banner types (empty: no secondary banner types)
$regions array No No [] N/A N/A The regions (empty: not region-limited)
$edit_time ?TIME No No Null N/A N/A Edit time (null: either means current time, or if $null_is_literal, means reset to to null)
$add_time ?TIME No No Null N/A N/A Add time (null: do not change)
$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 banner.
 *
 * @param  ID_TEXT $old_name The current name of the banner
 * @param  ID_TEXT $name The new name of the banner
 * @param  URLPATH $imgurl The URL to the banner image
 * @param  SHORT_TEXT $title_text The title text for the banner (only used for text banners, and functions as the 'trigger text' if the banner type is shown inline)
 * @param  SHORT_TEXT $caption The caption of the banner
 * @param  LONG_TEXT $direct_code Complete HTML/PHP for the banner
 * @param  ?integer $campaign_remaining The number of hits the banner may have (null: not applicable for this banner type)
 * @range 0 max
 * @param  URLPATH $site_url The URL to the site the banner leads to
 * @param  integer $display_likelihood The banner's "Display likelihood"
 * @range 1 max
 * @param  LONG_TEXT $notes Any notes associated with the banner
 * @param  SHORT_INTEGER $deployment_agreement The type of banner (a BANNER_* constant)
 * @set 0 1 2
 * @param  ?TIME $expiry_date The banner expiry date (null: never)
 * @param  ?MEMBER $submitter The banners submitter (null: leave unchanged)
 * @param  BINARY $validated Whether the banner has been validated
 * @param  ID_TEXT $b_type The banner type (can be anything, where blank means 'normal')
 * @param  array $b_types The secondary banner types (empty: no secondary banner types)
 * @param  array $regions The regions (empty: not region-limited)
 * @param  ?TIME $edit_time Edit time (null: either means current time, or if $null_is_literal, means reset to to null)
 * @param  ?TIME $add_time Add time (null: do not change)
 * @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_banner(string $old_name, string $name, string $imgurl, string $title_text, string $caption, string $direct_code, ?int $campaign_remaining, string $site_url, int $display_likelihood, string $notes, int $deployment_agreement, ?int $expiry_date, ?int $submitter, int $validated, string $b_type, array $b_types = [], array $regions = [], ?int $edit_time = null, ?int $add_time = null, bool $null_is_literal = false, bool $uniqify = false) : string