Function __global->get_banner_form_fields
Definitions
sources/banners2.php
- Get the Tempcode for the form to add a banner, with the information passed along to it via the parameters already added in.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $simplified | boolean | No | No | False | N/A | N/A | Whether to simplify the banner interface (for the purchase process) |
| $name | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | The name of the banner |
| $image_url | URLPATH | No | No | Blank (empty string) | N/A | N/A | The URL to the banner image |
| $site_url | URLPATH | No | No | Blank (empty string) | N/A | N/A | The URL to the site the banner leads to |
| $caption | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The caption of the banner |
| $direct_code | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Complete HTML/PHP for the banner |
| $notes | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Any notes associated with the banner |
| $display_likelihood | integer | No | No | 3 | N/A | 1 max | The banner's "Display likelihood" |
| $campaign_remaining | ?integer | No | No | 50 | N/A | 0 max | The number of hits the banner may have (null: not applicable for this banner type) |
| $deployment_agreement | SHORT_INTEGER | No | No | 1 | 0 1 2 | N/A | The type of banner (0=permanent, 1=campaign, 2=fallback) |
| $expiry_date | ?TIME | No | No | Null | N/A | N/A | The banner expiry date (null: never expires) |
| $submitter | ?MEMBER | No | No | Null | N/A | N/A | The banners submitter (null: current member) |
| $validated | BINARY | No | No | 1 | N/A | N/A | Whether the banner has been validated |
| $validation_time | ?TIME | No | No | Null | N/A | N/A | The time on which this content should be validated (null: do not schedule) |
| $b_type | ID_TEXT | No | No | Blank (empty string) | 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) |
| $title_text | SHORT_TEXT | No | No | Blank (empty string) | 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) |
Returns
- A pair: The input field Tempcode, JavaScript code
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the Tempcode for the form to add a banner, with the information passed along to it via the parameters already added in.
*
* @param boolean $simplified Whether to simplify the banner interface (for the purchase process)
* @param ID_TEXT $name The name of the banner
* @param URLPATH $image_url The URL to the banner image
* @param URLPATH $site_url The URL to the site the banner leads to
* @param SHORT_TEXT $caption The caption of the banner
* @param LONG_TEXT $direct_code Complete HTML/PHP for the banner
* @param LONG_TEXT $notes Any notes associated with the banner
* @param integer $display_likelihood The banner's "Display likelihood"
* @range 1 max
* @param ?integer $campaign_remaining The number of hits the banner may have (null: not applicable for this banner type)
* @range 0 max
* @param SHORT_INTEGER $deployment_agreement The type of banner (0=permanent, 1=campaign, 2=fallback)
* @set 0 1 2
* @param ?TIME $expiry_date The banner expiry date (null: never expires)
* @param ?MEMBER $submitter The banners submitter (null: current member)
* @param BINARY $validated Whether the banner has been validated
* @param ?TIME $validation_time The time on which this content should be validated (null: do not schedule)
* @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 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)
* @return array A pair: The input field Tempcode, JavaScript code
*/
function get_banner_form_fields(bool $simplified = false, string $name = '', string $image_url = '', string $site_url = '', string $caption = '', string $direct_code = '', string $notes = '', int $display_likelihood = 3, ?int $campaign_remaining = 50, int $deployment_agreement = 1, ?int $expiry_date = null, ?int $submitter = null, int $validated = 1, ?int $validation_time = null, string $b_type = '', array $b_types = [], array $regions = [], string $title_text = '') : array
* Get the Tempcode for the form to add a banner, with the information passed along to it via the parameters already added in.
*
* @param boolean $simplified Whether to simplify the banner interface (for the purchase process)
* @param ID_TEXT $name The name of the banner
* @param URLPATH $image_url The URL to the banner image
* @param URLPATH $site_url The URL to the site the banner leads to
* @param SHORT_TEXT $caption The caption of the banner
* @param LONG_TEXT $direct_code Complete HTML/PHP for the banner
* @param LONG_TEXT $notes Any notes associated with the banner
* @param integer $display_likelihood The banner's "Display likelihood"
* @range 1 max
* @param ?integer $campaign_remaining The number of hits the banner may have (null: not applicable for this banner type)
* @range 0 max
* @param SHORT_INTEGER $deployment_agreement The type of banner (0=permanent, 1=campaign, 2=fallback)
* @set 0 1 2
* @param ?TIME $expiry_date The banner expiry date (null: never expires)
* @param ?MEMBER $submitter The banners submitter (null: current member)
* @param BINARY $validated Whether the banner has been validated
* @param ?TIME $validation_time The time on which this content should be validated (null: do not schedule)
* @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 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)
* @return array A pair: The input field Tempcode, JavaScript code
*/
function get_banner_form_fields(bool $simplified = false, string $name = '', string $image_url = '', string $site_url = '', string $caption = '', string $direct_code = '', string $notes = '', int $display_likelihood = 3, ?int $campaign_remaining = 50, int $deployment_agreement = 1, ?int $expiry_date = null, ?int $submitter = null, int $validated = 1, ?int $validation_time = null, string $b_type = '', array $b_types = [], array $regions = [], string $title_text = '') : array
