Function __global->add_banner_type

Definitions

sources/banners2.php

  • Add a banner type.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$id ID_TEXT No No required parameter N/A N/A The ID of the banner type
$is_textual BINARY No No required parameter N/A N/A Whether this is a textual banner
$image_width integer No No required parameter N/A N/A The image width (ignored for textual banners)
$image_height integer No No required parameter N/A N/A The image height (ignored for textual banners)
$max_file_size integer No No required parameter N/A N/A The maximum file size for the banners in Kilobytes (this is a string length for textual banners)
$comcode_inline BINARY No No required parameter N/A N/A Whether the banner will be automatically shown via Comcode hot-text (this can only happen if banners of the title are given title-text)
$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)

/**
 * Add a banner type.
 *
 * @param  ID_TEXT $id The ID of the banner type
 * @param  BINARY $is_textual Whether this is a textual banner
 * @param  integer $image_width The image width (ignored for textual banners)
 * @param  integer $image_height The image height (ignored for textual banners)
 * @param  integer $max_file_size The maximum file size for the banners in Kilobytes (this is a string length for textual banners)
 * @param  BINARY $comcode_inline Whether the banner will be automatically shown via Comcode hot-text (this can only happen if banners of the title are given title-text)
 * @param  boolean $uniqify Whether to force the name as unique, if there's a conflict
 * @return ID_TEXT The name
 */

function add_banner_type(string $id, int $is_textual, int $image_width, int $image_height, int $max_file_size, int $comcode_inline, bool $uniqify = false) : string