Includes Admin

From TMM Wiki
Revision as of 16:41, 5 August 2010 by TMMStephenY2 (talk | contribs)
Jump to navigationJump to search
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
Includes Admin
The Includes Admin
The Promotionals Admin
IntelliChat

The new NATS4 Includes Admin provides an intuitive interface for including a NATS template in another PHP file and using simple programing logic to determine exactly what a surfer sees.

Skins and Templates Admin

Before you can use an include, you need to create a template. Go to Skins and Templates Admin under the Special Templates section. You must select "chaininclude_" as the prefix. (For example: "chaininclude_my_template".) In the header drop-down, select, "No Header"; in the footer drop-down, select, "No Footer." Enter a description and click the Create button.

On the next page, enter into the template body the HTML you want included. Click Save Template.

Includes Admin

To continue configuring your new include, go to the Includes Admin. At the bottom of the Include Chains table, there will be a set of blank fields that you can fill in to create your new include. Fill in the chain name and select the default template you want to use. You can also change the tour and the program encoded in the linkcode, whether you want to track a surfer's actions, and decide if you want to enable your new Include Chain. Resetting the surfer's tracking cookie will count the surfer as a unique hit every time they view your new include.

The New NATS4 Includes Admin

Click the View Rules (Purple Arrows) Icon to change the rules that determine who sees this include chain. Includes Admin rules follow the standard NATS hierarchy. A Hide rule will override all matching show rules, and a show rule will include the file even if you mark the include chain as disabled. NATS will automatically skip all Ignore rules.

Editing Include Chain Rules

Enter the rule's criteria, such as affiliate, program, tour, etc. Only one affiliate's name can be in the Affiliate box, so if you would like to match more than one affiliate you must create an additional rule. You can enter any value PHP's strtotime function can parse into the Start Date & Time and End Date & Time boxes.

NATS evaluates these rules every time a surfer requests a page from this chain, so you can enter recurring times in the Start Time and End Time fields. For example, you can start a rule on Saturday and end it on Monday to only match during weekends. When you are done configuring your rule, click "Save Rule".

Click the View Steps (magnifying glass) icon to change this include chain's steps or add new steps. The template drop-downs let you show a different template than the Default Template, while the Tour Change and Program Change drop-downs override the chain's default Tour and Program changes. The Track button records a new hit every time this a surfer loads this include, the Don't Track button never records a new hit, and the Don't Change button uses the Set Tracking Cookie setting. The value of the URL field is passed to the included template; you can use it with the following Smarty variable:

{$params.url}


Editing Include Chain Steps

Promotionals Admin

The Promotionals Admin is a sub-category in the NATS4 Includes Admin. This allows you to configure IntelliChat, a program that pops up an automated chat window when a surfer attempts to leave your page.

Configuring Your Promotionals Admin

If you wish to configure IntelliChat in the Promotionals Admin, you must first sign up for an account. To do so, click the "Signup for IntelliChat Account" icon. This will redirect you to the (external) IntelliChat application page. Fill out the necessary details; once your account is validated, you can continue setting up IntelliChat in NATS.

After your account is validated, go back to the Includes Admin and click "Edit IntelliChat"; on the next page, enter your IntelliChat Username and click Save.

In order to use IntelliChat on your NATS site, you will also need to configure at least one "ENABLE" rule. To do so, click the "Set IntelliChat Rules" icon. On the "Promotional Rules" page, you will be able to enable IntelliChat for certain affiliates, programs, and sites or hide it from specific affiliates, programs, and sites. For more information on how to configure Rules, please see our NATS4 Rules article.

Configuring Promotional Rules

Before you place IntelliChat on one of your pages, you must first generate the necessary code to implement it. To do so, click the "Get IntelliChat Links" icon. On the next page, you will need to set various conditions for your IntelliChat module. These conditions include:

  • Placing on Join Page - Choose if you want IntelliChat to be on your join page.
  • Linking to Join Page - Choose if you want IntelliChat to link to your join page.
  • Program Change - Select a program to switch to if a member uses IntelliChat.
  • Tour Change - Select a tour to switch to if a member uses IntelliChat.
  • Default Site - Select a default site for IntelliChat to appear on.
  • IntelliChat Campaign ID - This value must be obtained from IntelliChat.
  • IntelliChat Split ID - This value must be obtained from IntelliChat.
  • Additional Query - Input any additional queries you wish to add to your code.

IntelliChat Code Generation

Once you are done defining all the available fields, click "Generate Code" and a text box containing the necessary code will pop up below the wizard.

You can also remove the IntelliChat promotional from your Promotionals list by clicking the "Delete IntelliChat" icon. NATS will only remove this from the list of Promotionals, not fully delete it; click "Display Deleted Promotionals" to also see the promotionals you have removed from your list.

After you have configured your IntelliChat promotional to your liking, click the "Initialize IntelliChat" icon to active IntelliChat for your site.

For a further explanation of IntelliChat, please see our NATS4 IntelliChat wiki article.

Including

On any web server that supports PHP, you can create a new web page and enter at least the following code. (Note: if your included file is only a HTML fragment, you need to add your own HTML header and footer.)

<?php
include('http://linkdomain/include.php/linkcode/chainid/tpl/orderid/track');
?>

Replace linkdomain with your linkdomain or domain. Replace linkcode with your preferred linkcode. The other parameters are optional, and the following table describes them:

Parameter Arguments Default Example
chainid 0 or any chain ID number 0 (uses the lowest-numbered enabled chain or the lowest-numbered chain with a matching show rule and no matching hide rule) chainid=2 (use chain number two)
tpl 0 or the name of a chaininclude_ template 0 (show the step's default template) tpl=chaininclude_my_other_template
orderid* 0 or the number of any step in this chain 0 (show the first step) orderid=7
track 0, true, or false 0 (use the default tracking setting) track=true (track this hit as a unique)

* Notes: The orderid is not the same as the stepid displayed in the Includes Admin. The orderid is the numerical order of the steps displayed in the Includes Admin for the given chain.

Appendix: Using the Surfer's Session's Linkcode

In your PHP include statement, you should send the surfer's linkcode. If the surfer doesn't have a linkcode, you should send the site's default NATS code. The following code will try to send the surfer's linkcode, but if the surfer doesn't have a linkcode, it will send the default linkcode. You need to replace the word natscode in the following example with your site's default natscode.

<?php
$nats = $_REQUEST['nats']?$_REQUEST['nats']:'natscode';
include ('http://linkdomain/include.php/'.$nats);
?>

Changing Site/Program

If you are changing the site or program inside of the chain then you must use strack in your links to switch the tracking. The $switch array will contain the following information for your new site/program:

  • $switch.programid
  • $switch.siteid
  • $switch.tourid
  • $switch.campaignid
  • $switch.adtoolid
  • $switch.subid1
  • $switch.subid2

When using strack you'll only need to utilize $switch.programid and $switch.siteid, however, all the other variables are provided as well.

See Also

  • strtotime -- the PHP function that parses the Date & Time fields. Note: NATS uses strtotime so that it can take a special "NEVER" parameter.