Hi I'm wondering How may I exclude a ADS in showthread.php for visitors coming from a certain domain? I've heard you can do this with an <if condition ...> and $_SERVER. Can you please show me how to do this for example for www.x.com ? Thanks in advance.
probably wanna do <if condition="$_SERVER['HTTP_REFERER'] != "www.x.com""> code </if> something like that
Thanks but it doesn't work . the ads shows up for normal users and the referrers from that website . btw that code suppose to Show the ads to those guests or not showing it ? i want to not Showing ads to them . I dont know that it is different or not but my linkS in their website are like this : wvvw.x.com/something/something and that link would redirect to my website but my website is in a Iframe so still in browser u can see their website link (x.com/.....) . thanks in advance. p.s. x.com is not my website . its their website.
I'd create a plugin to detect the referrer and set a cookie if they've come from there or else the check will only work on the first page at your site that they visit. Then check for the cookie and set a variable and use that in the <if condition="">
If your website is inside an iframe of another domain, then most of the times the cookie will not work. This is in IE settings. You should use sessions instead. regards
I would create a plugin that has the PHP code to check the refer and set a certain variable to true/false. I will then check for that condition on the template. Please note that $_SERVER['HTTP_REFERER'] can be many values depending on your system, so it will not always be www.x.com, it might be http://www.x.com, http://x.com or x.com. Peace,