Nats decode
From TMM Wiki
Jump to navigationJump to searchApplies to NATS 4.0.25 and greater.
nats_decode
Decodes a linkcode into a Smarty array.
Parameters
(Required parameters in bold)
Parameter | Description | Possible Values | Default Value | Example |
---|---|---|---|---|
nats | The linkcode to be decoded. | Any valid linkcode for this NATS installation. | None. This parameter is required | nats="OC4xLjEuMS4wLjAuMC4w" |
assign | Array name to store the decoded linkcode. | Any valid Smarty array name | decoded | assign="myarray" |
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" |
Output
Output is stored in an array with the same structure as the parameters in nats_encode. The data here is stored within the $decoded array, and contains the following information:
loginid => "2" programid => "18" siteid => "3" tourid => "7" campaignid => "0" adtoolid => "0" subid1 => "0" subid2 => "0" promotionalid => "0" is_unencoded => 0 networkid => 0 old_code => 0 inhouse => "0"
The values displayed for each variable in the example above are sample values, which will be replaced with the actual values found in your $decoded array.
The old_code variable provided here lets you know whether the code in question was generated in NATS3 or NATS4. If the code was generated in NATS3, it will be displayed as old_code=1, and code generated in NATS4 will be displayed as old_code=0
Notes
None.
See Also
- nats_encode -- make a NATS linkcode.