nats_list_campaigns
Obtains a list of available campaigns for an affiliate.
Article Topics: Smarty, Customization
Parameters
(Required parameters in bold)
userid
the loginid of the affiliate whose campaigns should be listed.
The I.D. user viewing the page.
Any integer greater than zero
userid=123
details
Set to 1 to provide more details about the campaigns in the output. See note below.
0 or 1 (exclusive)
0
details=1
show_hidden
Set to 1 to include details about hidden campaigns in the output.
0 or 1 (exclusive)
0
show_hidden=1
Prefix output variables with this word. (Click link for details)
Any valid Smarty variable name
None. (No prefix is used)
assign_prefix="myvar"
Output
Outputs an array called $campaigns. The arguments above determine the array's structure.
If details is not set or are set to "0", $campaigns will have one-dimension with the numeric campaignid as the key and the campaign's text description as the value:
Array campaigns(
[59] => "Main campaign used by default.",
[276] => "My second campaign."
)If details is set to "1", all information about each campaign will be listed in a multi-dimensional array. For example:
Array campaigns(
[59] => Array(
[campaignid] => 59,
[loginid] => 45,
[name] => "Default",
[description] => "Main campaign used by default.",
[created_date] => 1209634033,
[hide] => 0,
[old_campaignid] => 0 ),
[276] => Array(
[campaignid] => 276,
[loginid] => 45,
[name] => "Second Campaign",
[description] => "John Smith Special Campaign",
[created_date] => 1209664102,
[hide] => 0,
[old_campaignid] => 0 ),
)See Also
nats_list_sites -- lists all sites in a particular program.
nats_list_tours -- lists all sites in a particular program and site.
Last updated
Was this helpful?