/sources/banners2.php

Description
Functions
add_banner (line 189)

Add a banner to the database, and return the new ID of that banner in the database.

void add_banner (ID_TEXT $name, URLPATH $imgurl, SHORT_TEXT $title_text, SHORT_TEXT $caption, ?integer $campaignremaining, URLPATH $site_url, integer $importancemodulus, LONG_TEXT $notes, SHORT_INTEGER $the_type, ?TIME $expiry_date, ?MEMBER $submitter, [BINARY $validated = 0], [ID_TEXT $b_type = ''], [?TIME $time = NULL], [integer $hits_from = 0], [integer $hits_to = 0], [integer $views_from = 0], [integer $views_to = 0], [?TIME $edit_date = NULL])
  • ID_TEXT $name: The name of the banner
  • URLPATH $imgurl: The URL to the banner image
  • 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)
  • SHORT_TEXT $caption: The caption of the banner
  • ?integer $campaignremaining: The number of hits the banner may have (NULL: not applicable for this banner type)
  • URLPATH $site_url: The URL to the site the banner leads to
  • integer $importancemodulus: The banners "importance modulus"
  • LONG_TEXT $notes: Any notes associated with the banner
  • SHORT_INTEGER $the_type: The type of banner (0=permanent, 1=campaign, 2=default)
  • ?TIME $expiry_date: The banner expiry date (NULL: never)
  • ?MEMBER $submitter: The banners submitter (NULL: current member)
  • BINARY $validated: Whether the banner has been validated
  • ID_TEXT $b_type: The banner type (can be anything, where blank means 'normal')
  • ?TIME $time: The time the banner was added (NULL: now)
  • integer $hits_from: The number of return hits from this banners site
  • integer $hits_to: The number of banner hits to this banners site
  • integer $views_from: The number of return views from this banners site
  • integer $views_to: The number of banner views to this banners site
  • ?TIME $edit_date: The banner edit date (NULL: never)
add_banner_type (line 290)

Add a banner type.

void add_banner_type (ID_TEXT $id, BINARY $is_textual, integer $image_width, integer $image_height, integer $max_file_size, BINARY $comcode_inline)
  • ID_TEXT $id: The ID of the banner type
  • BINARY $is_textual: Whether this is a textual banner
  • integer $image_width: The image width (ignored for textual banners)
  • integer $image_height: The image height (ignored for textual banners)
  • integer $max_file_size: The maximum file size for the banners (this is a string length for textual banners)
  • 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)
check_banner (line 102)

Check the uploaded banner is valid.

  • return: A pair: The URL, and the title text
array check_banner ([SHORT_TEXT $title_text = ''], [ID_TEXT $b_type = ''], [string $url_param_name = 'image_url'], [string $file_param_name = 'file'])
  • 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)
  • ID_TEXT $b_type: The banner type (can be anything, where blank means 'normal')
  • string $url_param_name: Param name for possible URL field
  • string $file_param_name: Param name for possible upload field
delete_banner (line 258)

Delete a banner.

void delete_banner (ID_TEXT $name)
  • ID_TEXT $name: The name of the banner
delete_banner_type (line 344)

Delete a banner type.

void delete_banner_type (ID_TEXT $id)
  • ID_TEXT $id: The ID of the banner type
edit_banner (line 229)

Edit a banner.

void edit_banner (ID_TEXT $old_name, ID_TEXT $name, URLPATH $imgurl, SHORT_TEXT $title_text, SHORT_TEXT $caption, ?integer $campaignremaining, URLPATH $site_url, integer $importancemodulus, LONG_TEXT $notes, SHORT_INTEGER $the_type, ?TIME $expiry_date, MEMBER $submitter, BINARY $validated, ID_TEXT $b_type)
  • ID_TEXT $old_name: The current name of the banner
  • ID_TEXT $name: The new name of the banner
  • URLPATH $imgurl: The URL to the banner image
  • 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)
  • SHORT_TEXT $caption: The caption of the banner
  • ?integer $campaignremaining: The number of hits the banner may have (NULL: not applicable for this banner type)
  • URLPATH $site_url: The URL to the site the banner leads to
  • integer $importancemodulus: The banners "importance modulus"
  • LONG_TEXT $notes: Any notes associated with the banner
  • SHORT_INTEGER $the_type: The type of banner (0=permanent, 1=campaign, 2=default)
  • ?TIME $expiry_date: The banner expiry date (NULL: never)
  • MEMBER $submitter: The banners submitter
  • BINARY $validated: Whether the banner has been validated
  • ID_TEXT $b_type: The banner type (can be anything, where blank means 'normal')
edit_banner_type (line 318)

Edit a banner type.

void edit_banner_type (ID_TEXT $old_id, ID_TEXT $id, BINARY $is_textual, integer $image_width, integer $image_height, integer $max_file_size, BINARY $comcode_inline)
  • ID_TEXT $old_id: The original ID of the banner type
  • ID_TEXT $id: The ID of the banner type
  • BINARY $is_textual: Whether this is a textual banner
  • integer $image_width: The image width (ignored for textual banners)
  • integer $image_height: The image height (ignored for textual banners)
  • integer $max_file_size: The maximum file size for the banners (this is a string length for textual banners)
  • 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)
get_banner_form_fields (line 43)

Get the tempcode for the form to add a banner, with the information passed along to it via the parameters already added in.

  • return: The input field tempcode
tempcode get_banner_form_fields ([boolean $simplified = false], [ID_TEXT $name = ''], [URLPATH $image_url = ''], [URLPATH $site_url = ''], [SHORT_TEXT $caption = ''], [LONG_TEXT $notes = ''], [integer $importancemodulus = 3], [?integer $campaignremaining = 50], [SHORT_INTEGER $the_type = 1], [?TIME $expiry_date = NULL], [?ID_TEXT $submitter = NULL], [BINARY $validated = 1], [ID_TEXT $b_type = ''], [SHORT_TEXT $title_text = ''])
  • boolean $simplified: Whether to simplify the banner interface (for the point-store buy process)
  • ID_TEXT $name: The name of the banner
  • URLPATH $image_url: The URL to the banner image
  • URLPATH $site_url: The URL to the site the banner leads to
  • SHORT_TEXT $caption: The caption of the banner
  • LONG_TEXT $notes: Any notes associated with the banner
  • integer $importancemodulus: The banners "importance modulus"
  • ?integer $campaignremaining: The number of hits the banner may have (NULL: not applicable for this banner type)
  • SHORT_INTEGER $the_type: The type of banner (0=permanent, 1=campaign, 2=default)
  • ?TIME $expiry_date: The banner expiry date (NULL: never expires)
  • ?ID_TEXT $submitter: The username of the banners submitter (NULL: current member)
  • BINARY $validated: Whether the banner has been validated
  • ID_TEXT $b_type: The banner type (can be anything, where blank means 'normal')
  • 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)

Documentation generated on Sun, 02 Jan 2011 23:09:04 +0000 by phpDocumentor 1.4.3