Webmastersite.net
Register Log In

Same Variable but different output if in IF condition

Comments on Same Variable but different output if in IF condition

mc19
Forum Regular

Usergroup: Customer
Joined: May 14, 2006

Total Topics: 41
Total Comments: 103
mc19
Same Variable but different output if in IF condition
Posted Aug 11, 2012 - 9:50 PM:

My link detail page is

domain-name.com/link-title-name-lxx.html

I have this if condition on linkbit.tpl

<IF {LINKAFFISTATUS} is 1>
{LINKAFFIURL}
<OTHERWISE>
{TRACKLINKURL}
</IF>

if I place above condition, the output of {TRACKLINKURL} becomes

domain-name.com/links/XXXX.html

Any idea how I can fix? I just want to display an alternative URL if {LINKAFFISTATUS}=1.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 16, 2012 - 6:41 AM:

It's not working? What you've written looks like what you said you want. Are you sure {LINKAFFISTATUS} contains 1 when you expect it to and that {LINKAFFIURL} has what you want? And this this would all be inside an <a href> tag make sure you're not including line breaks that will mess up the html.
<a href="<IF {LINKAFFISTATUS} is 1>{LINKAFFIURL}<OTHERWISE>{TRACKLINKURL}</IF>">{LINKTITLE}</a>


I believe this will disable hits tracking, though, unless {LINKAFFIURL} points to link.php?id={LINKID}. Are you using this to obfuscate (in which case the link.php link would work) or to switch the actual destination? In the latter case, you'll need to conditionalize the whole a href in order to add an onclick="counthitout({LINKID}" to the affiliate version.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.