I've added GoogleAds to my directories (usually in the wrapper template), but just today realized because of the article below that displaying them on non-content pages (login, registration, etc.) is a violation of their TOS. I tried wrapping the ad Javascript in an <IF {CATID}>, but it's still displaying the ads on non-content pages. Is there any simple way to exclude a block of code from non-link displaying pages from the wrapper template? I'd really rather avoid redoing almost all of my templates!
I've tried Paul's solution first and I get nothing when I add <IF {TID} contains displaylinks.tpl> somewhere in the wrapper.
But if I try <IF {AREA} contains Main></IF> I can add some custom blocks with Google Ads in - but only if I use Main and {AREA}. I can't do the same with displaylinks(.tpl - tried both).
What am I doing wrong? Or what should I do to fix the problem?
Kindly regards Michael
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on GoogleAds in wrapper template problem
Member
Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City
Total Topics: 24
Total Comments: 46
I've added GoogleAds to my directories (usually in the wrapper template), but just today realized because of the article below that displaying them on non-content pages (login, registration, etc.) is a violation of their TOS. I tried wrapping the ad Javascript in an <IF {CATID}>, but it's still displaying the ads on non-content pages. Is there any simple way to exclude a block of code from non-link displaying pages from the wrapper template? I'd really rather avoid redoing almost all of my templates!
Thanks,
Michelle
pchere.blogspot.com/2005/05...kes-by-google-adsense.html
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
To widen the scope of this question, is there anyway to use if statements in the wrapper to detect what template is being called.
Example,
if template is main or showlinks or details then show this, otherwise, show this.
This could answer Michelle's question, and give us the ability to call the appropriate navigation in the wrapper.
Member
Usergroup: Customer
Joined: Oct 30, 2004
Total Topics: 18
Total Comments: 47
You can use this
<IF {TID} contains search.tpl> table width="97%" <OTHERWISE> width="800" </IF>
TID is for the template names
Member
Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City
Total Topics: 24
Total Comments: 46
Thanks Olney... I ended up using <IF {TID} contains displaylinks>, as I had moved search.tpl to the wrapper also. You saved me a lot of work.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Added a manual entry based on this thread: scripts.webmastersite.net/w...nks/wsnmanual/articles/297
Beginner
Usergroup: Customer
Joined: Jul 29, 2005
Location: La Zubia, Spain
Total Topics: 1
Total Comments: 3
I'm still having trouble with the wrapper
I've tried Paul's solution first and I get nothing when I add <IF {TID} contains displaylinks.tpl> somewhere in the wrapper.
But if I try <IF {AREA} contains Main></IF> I can add some custom blocks with Google Ads in - but only if I use Main and {AREA}. I can't do the same with displaylinks(.tpl - tried both).
What am I doing wrong? Or what should I do to fix the problem?
Kindly regards
Michael