Function __global->add_banner

Definitions

sources/banners2.php

  • Add a banner to the database, and return the new ID of that banner in the database.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: string

Parameters

Name Type Default Set Range Description
$name ID_TEXT required parameter N/A N/A The name of the banner
$imgurl URLPATH required parameter N/A N/A The URL to the banner image
$title_text SHORT_TEXT 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 required parameter N/A N/A The caption of the banner
$direct_code LONG_TEXT required parameter N/A N/A Complete HTML/PHP for the banner
$campaign_remaining ?integer required parameter N/A N/A The number of hits the banner may have (null: not applicable for this banner type)
$site_url URLPATH required parameter N/A N/A The URL to the site the banner leads to
$display_likelihood integer required parameter N/A N/A The banner's "Display likelihood"
$notes LONG_TEXT required parameter N/A N/A Any notes associated with the banner
$deployment_agreement SHORT_INTEGER required parameter N/A N/A The type of banner (a BANNER_* constant)
$expiry_date ?TIME required parameter N/A N/A The banner expiry date (null: never)
$submitter ?MEMBER required parameter N/A N/A The banners submitter (null: current member)
$validated BINARY 0 N/A N/A Whether the banner has been validated
$b_type ID_TEXT Blank (empty string) N/A N/A The banner type (can be anything, where blank means 'normal')
$b_types array [] N/A N/A The secondary banner types (empty: no secondary banner types)
$regions array [] N/A N/A The regions (empty: not region-limited)
$time ?TIME Null N/A N/A The time the banner was added (null: now)
$hits_from integer 0 N/A N/A The number of return hits from this banners site
$hits_to integer 0 N/A N/A The number of banner hits to this banners site
$views_from integer 0 N/A N/A The number of return views from this banners site
$views_to integer 0 N/A N/A The number of banner views to this banners site
$edit_date ?TIME Null N/A N/A The banner edit date (null: never)
$uniqify boolean False N/A N/A Whether to force the name as unique, if there's a conflict

Return

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