Difference between revisions of "NATS4 Custom Program and Campaign Selection Pages"

From TMM Wiki
Jump to navigationJump to search
m
 
m
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
}}
 
}}
  
New pages in NATS can let affiliates select a program, [[ct#Campaign|campaign]] and site
+
Pages in [[NATS4]] can allow [[Ct#Affiliate|affiliates]] to select a [[Ct#Program|program]], [[Ct#Campaign|campaign]], and [[Ct#Site|site]] to promote, and provide the corresponding NATS [[Linkcode]].  
and provide the corresponding NATS link code. They will act similar to
+
 
the the adtools page or linkcodes page. Use the following template
+
These pages act similarly to the [[NATS4 Affiliate Adtools|Affiliate Adtools]] or the [[NATS4 Affiliate Link Codes|Affiliate Link Codes]] pages. You can use the following [[Ct#Template|template]] functions to configure your pages:
functions to configure the pages.
 
  
 
== {list_campaigns} ==
 
== {list_campaigns} ==
 
''For more details, see the [[nats_list_campaigns]] article.''
 
''For more details, see the [[nats_list_campaigns]] article.''
  
Returns a set of campaigns in the {$campaign} variable that
+
This [[Ct#Template|template]] function returns a set of campaigns in the {$campaign} variable, which you can then use to build a drop-down menu. For example:
you can use to build a drop down box. For example:
 
  
 
<pre>
 
<pre>
Line 22: Line 20:
 
''For more details, see the [[nats_list_programs]] article.''
 
''For more details, see the [[nats_list_programs]] article.''
  
Return a set of programs for the affiliate in into the {$programs}
+
This [[Ct#Template|template]] function returns a set of [[Ct#Program|programs]] for the affiliate into the {$programs} variable that you can then use to build a drop-down menu. For example:
variable that you can use to build a drop down box. For example:
 
  
 
<pre>
 
<pre>
Line 33: Line 30:
 
''For more details, see the [[nats_list_sites]] article.''
 
''For more details, see the [[nats_list_sites]] article.''
  
Wants the numeric ID number of a program be passed to the ''program''
+
This [[Ct#Template|template]] function wants the number ID number of a certain [[Ct#Program|program]] to be passed to the ''program'' parameter. It returns the variable ''($sites)'' with a set of sites found in that program. You can loop through [[Ct#Site|sites]] by using the following example code:
parameter. Returns the variable, {$sites}, with a set of sites in that
 
program. You can loop through sites with the following example code.
 
  
 
<pre>
 
<pre>
Line 47: Line 42:
 
''For more details, see the [[nats_encode]] article.''
 
''For more details, see the [[nats_encode]] article.''
  
Wants three parameters: campaignid, programid and siteid. Returns the
+
This [[Ct#Template|template]] function wants three parameters: ''campaignid'', ''programid'', and ''siteid.'' It returns the encoded [[NATS]] link code in the {$encoded} variable.
encoded NATS link code in the {$encoded} variable.
 
  
 
== Example ==
 
== Example ==
A sample template using all three template functions:
+
 
 +
The following is sample template using three of the [[Ct#Template|template]] functions listed above:
  
 
<pre>
 
<pre>
Line 76: Line 71:
 
</pre>
 
</pre>
  
The NATS linkcode code is inside the {foreach} ... {/foreach} loop; change the code to display the linkcode however you'd like.
+
The [[NATS]] linkcode code can be found inside the ''{foreach} ... {/foreach}'' loop. You can change this code in order to display the [[Linkcode]] however you wish.
 +
 
 +
[[Category:NATS4 Skins and Templates]]

Latest revision as of 14:41, 18 May 2011

NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers
Skins and Templates Admin
The Skins and Templates Admin
Skins
Templates
Site Templates
Language Skins
Language Files
custom_errors.php
Join Page Variables
Skipping NATS Join Form
Post URL Variables
Member Usernames & Passwords
Form Validation
Username Recommendations
Password Retrieval
Post-Biller Templates
Geo-Target Join Options
Random Usernames and Passwords
Smarty
Smarty print array
Smarty Plugins
Available Smarty Functions
Affiliate Support Template
Adding a Verification Image
Custom Program and Campaign Selection Pages
Output An Affiliate's Last Paid Date
Affiliate Signup Email
Affiliate Join Page Linkcodes
Approval/Upgrade/Denial Variables
Approval/Upgrade/Denial Template Variables
CSS Theme Builder

Pages in NATS4 can allow affiliates to select a program, campaign, and site to promote, and provide the corresponding NATS Linkcode.

These pages act similarly to the Affiliate Adtools or the Affiliate Link Codes pages. You can use the following template functions to configure your pages:

{list_campaigns}

For more details, see the nats_list_campaigns article.

This template function returns a set of campaigns in the {$campaign} variable, which you can then use to build a drop-down menu. For example:

{list_campaigns}
<select name="campaignid">{html_options options=$campaign}</select>

{list_programs}

For more details, see the nats_list_programs article.

This template function returns a set of programs for the affiliate into the {$programs} variable that you can then use to build a drop-down menu. For example:

{list_programs}
<select name="programid">{html_options options=$programs}</select>

{list_sites program=$smarty.request.programid}

For more details, see the nats_list_sites article.

This template function wants the number ID number of a certain program to be passed to the program parameter. It returns the variable ($sites) with a set of sites found in that program. You can loop through sites by using the following example code:

{list_sites program=$smarty.request.programid}
{foreach from=$sites item="site"}
{$site.id} :: {$site.name}
{/foreach}

{nats_encode campaignid=$smarty.request.campaignid programid=$smarty.request.programid siteid=$site.id}

For more details, see the nats_encode article.

This template function wants three parameters: campaignid, programid, and siteid. It returns the encoded NATS link code in the {$encoded} variable.

Example

The following is sample template using three of the template functions listed above:

<form method="get" action="internal.php">
<input type="hidden" name="page" value="thispage">
{list_campaigns}
Select Campaign: <select name="campaignid">{html_options options=$campaign}</select> <input type="submit" value=" Go ">
</form>
{if $smarty.request.campaignid}
<form method="get" action="internal.php">
<input type="hidden" name="page" value="thispage">
<input type="hidden" name="campaignid" value="{$smarty.request.campaignid}">
{list_programs}
Select Programid: <select name="programid">{html_options options=$programs}</select> <input type="submit" value=" Go ">
</form>
{if $smarty.request.programid}
{list_sites program=$smarty.request.programid}
{foreach from=$sites item="site"}
{nats_encode programid=$smarty.request.programid siteid=$site.id campaignid=$smarty.request.campaignid}
{$site.id} :: {$site.name} :: {$encoded}
{/foreach}
{/if}
{/if}

The NATS linkcode code can be found inside the {foreach} ... {/foreach} loop. You can change this code in order to display the Linkcode however you wish.