Nats list campaigns
From TMM WikiJump to navigationJump to search
Applies to NATS 4.0.25 and greater.
Obtains a list of available campaigns for an affiliate.
(Required parameters in bold)
|Parameter||Description||Possible Values||Default Value||Example|
|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|
|assign_prefix||Prefix output variables with this word. (Click link for details)||Any valid Smarty variable name||None. (No prefix is used)||assign_prefix="myvar"|
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(  => "Main campaign used by default.",  => "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(  => Array( [campaignid] => 59, [loginid] => 45, [name] => "Default", [description] => "Main campaign used by default.", [created_date] => 1209634033, [hide] => 0, [old_campaignid] => 0 ),  => Array( [campaignid] => 276, [loginid] => 45, [name] => "Second Campaign", [description] => "John Smith Special Campaign", [created_date] => 1209664102, [hide] => 0, [old_campaignid] => 0 ), )
- nats_list_sites -- lists all sites in a particular program.
- nats_list_tours -- lists all sites in a particular program and site.