Webmastersite.net
Register Log In

GoogleAds in wrapper template problem
excluding from non-content pages?

Comments on GoogleAds in wrapper template problem

Michelle
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City

Total Topics: 24
Total Comments: 46
Posted Jul 01, 2005 - 11:27 AM:

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!sticking out tongue

Thanks,
Michelle

pchere.blogspot.com/2005/05...kes-by-google-adsense.html
mrowton
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan

Total Topics: 57
Total Comments: 185
mrowton
Posted Jul 01, 2005 - 1:02 PM:

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.

Olney
Member

Usergroup: Customer
Joined: Oct 30, 2004

Total Topics: 18
Total Comments: 47
Olney
Posted Jul 01, 2005 - 9:21 PM:

You can use this

<IF {TID} contains search.tpl> table width="97%" <OTHERWISE> width="800" </IF>

TID is for the template names
Michelle
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City

Total Topics: 24
Total Comments: 46
Posted Jul 02, 2005 - 1:31 AM:

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.smiling face
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 02, 2005 - 10:46 AM:

Added a manual entry based on this thread: scripts.webmastersite.net/w...nks/wsnmanual/articles/297
_michael_
Beginner

Usergroup: Customer
Joined: Jul 29, 2005
Location: La Zubia, Spain

Total Topics: 1
Total Comments: 3
Posted Nov 17, 2005 - 3:58 AM:

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
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.