nats_decode
Article Topics: Smarty, Customization
Decodes a linkcode into a Smarty array.
Parameters
(Required parameters in bold)
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"
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 previous versions of NATS. If the code was generated in NATS, it will be displayed as old_code=1, and code generated in NATS will be displayed as old_code=0
See Also
nats_encodeLast updated
Was this helpful?