Built-in $-directives
Article
Directives are special control words for use in the ad
title/body/properties that are prefixed with $ sign and are treated by
the program in a special way. The following directives are currently
supported by the program:$hiddentext{x}
- inserts hidden text in your ad with x random words. Replace x by the
number of words you want to have in the hidden text. The text is hidden
via special HTML codes, which may be changed through Settings >
Mutations > Template for $hiddentext{x} directive.$randomtext{x}
- inserts x random words in your ad$randomchar{x}
- inserts x random characters in your ad$randomnumber{max} -
inserts random integer number with upper limit of max (exclusive)$randomnumber{min|max}
- inserts random integer number with lower limit of min (inclusive) and
upper limit of max (exclusive)$cityname - inserts a
name of the current region in any place of an ad$statename - inserts a
name of the current state in any place of an ad$statecode - inserts a
name of the current state code (e.g. FL for Florida) in any place of an ad$randomcity
- inserts random city name within the region you are posting to. CLAD
Genius database contains a list of more than 35 000 U.S. cities,
counties and other geographic locations that are tied to posting
regions. This directive selects random city from that list with respect
to your posting region.$randomzip - inserts random ZIP
code for U.S. locations within the region you are posting to. CLAD
Genius database contains a list of more than 50 000 U.S. ZIP Codes that
are tied to posting regions. This directive selects random ZIP code from
that list with respect to your posting region.$phone - if you have a phone number attached to an account that you are posting with (for phone verification purposes), this directive will include that phone number in your ad$rotate{item1|item2|itemN}
- randomly selects an item from the list$shuffle{delimiter|item1|item2|itemN} - randomly shuffles the list using the specified delimiter to separate the items. Example: $shuffle{,|apple|cherry|tomato} will return "apple,cherry,tomato" or "cherry,apple,tomato" or "cherry,tomato,apple" etc. If you need to use space for delimiter, use , for instance: $shuffle{ |apple|cherry|tomato}$upper{x} -
convert string x to upper case$lower{x} - convert
string x to lower case$capitalize{x} -
capitalize string x $spinurl{url,methods} - will create unique URL from the supplied$now{} - insert current date,time, week,month,day etc
into the ad. Supported format specifiers can be found here . Format specifiers are case sensitive. Format
specifiers may be combined in one $now directive. Examples:$now{MMMM}
- insert current month name$now{MMM} - insert
abbreviated month name (jan, feb, etc.)$now{yyyy} -
insert current yearr$now{ddd} - insert abbreviated name
of the day of the week (mon, tue, etc.)$now{dddd} -
insert full name of the day of the week$now{dd} - insert
current day of the month (01-31)$now{dddd, MMMM dd }
- insert full name of the day of the week (Monday, June 3) Above
listed directives may be used anywhere in the ad - in title, body,
location or publisher properties.
Directives may NOT be used in token variations Usage example in the ad body: -----------------Hello, I am from $cityname and I want need to sell my $rotate{bike|yacht|helicopter} fast!
-----------------
There is another place where directives are used, and that is e-mail
creation template. Please do NOT confuse directives used in ads with
directives used in e-mail templates, because those are 2 different sets.
E-mail templates are configured through Settings/Account creation/XXXX,
where XXX - hotmail, gmail or other provider. Currently, we support the
following set of directives in E-mail templates:
$firstname - inserts random firsn name from the list of 2000
most used american first names $lastname - inserts random last
name from the list of 1000 most used american last names $randomdigits(x)
- inserts x random digits (0-9) $randomchars(x)- inserts x
random lower case english letters (a-z)
Article Details
Created On: 13 Jul 2010 9:29 AM