About the Advertising Management Unit Definitions for Classified Advertisments
Unit definitions are used to evaluate text in the submitted ad caption text box on an insertion order and return a unit count that is then used to calculate the price of the ad caption. Advertising Unit Definitions records define whether a unit is a character, word, or line. Unit definitions determine which characters are counted, how many characters make up a word on average, or how many characters make up a line.
Character Unit Definition
The Character unit definition requires no additional parameters, so the Type Parameter String field for a character type can be left blank. The unit count is the number of characters in the string minus any carriage return and line feed characters. The unit definition object shipped with Aptify Advertising includes all characters minus carriage return and line feed characters when counting characters.
Word Unit Definition
The Word unit definition requires parameters to define the characteristics of a word. This is defined in the Advertising module as a definition parameter. The definition parameter can be either "Distinct" or "Character", and both require additional parameter information.
The Definition parameter determines whether a word is further defined by separators (Distinct) or by an estimated word length (Character).
Definition Parameter = Distinct
Distinct means that a word is defined by the separator characters surrounding a word such as a space or punctuation character. It requires another parameter called "Separators" to tell the counter what characters will indicate separations between words. If it is set to Standard the standard separators include to following characters:
",./?!&|{space}{tab}{lf}".
Syntax
The syntax for the Word definition using the Distinct parameter string is as follows. Note that the "|" character separates each parameter and its definition from others.
Definition=Distinct|Separators=Standard
Definition Parameter = Character
Character means that a word is defined by an estimated word length such as 5 characters. The character definition parameter requires another parameter called "NumCharacters". This parameter is used to calculate the unit count by dividing the total number of characters by the value in NumCharacters.
The Character definition also supports the Rounding parameter to determine rounding rules. Rounding can be set to No (for no rounding), Up (for always round up) or Standard (for following standard programming rounding rules). The Rounding parameter is optional.
Syntax
The syntax for the Word definition using the Character parameter string is as follows. Note that the "|" character separates each parameter and its definition from others.
Definition=Character|NumCharacters=5|Rounding=Up
Line Unit Definition
The Line unit definition requires parameters to define the characteristics of a line. The Line is defined by the existence of a line feed character, however, only so many characters can fit on a line. The parameter determines the number of characters on a line.
Parameters
MaxCharsPerLine is the only parameter required for Line unit definition. The MaxCharsPerLine parameter defines the number of characters allowed on a line. If the text contains the MaxCharsPerLine plus consecutive characters without a line feed, the unit count will increment by one and the consecutive counter will reset.
The Line definition also supports the Rounding parameter to determine rounding rules. Rounding can be set to No (for no rounding), Up (for always round up) or Standard (for following standard programming rounding rules). The Rounding parameter is optional.
Syntax
The syntax for the Line type parameter string is as follows. Note that the "|" character separates each parameter and its definition from others.
MaxCharsPerLine=25|Rounding=Up
Copyright © 2014-2019 Aptify - Confidential and Proprietary