Page 1 of 1

Keeping Adsense out of parts of forum.

Posted: Sun Jul 20, 2008 4:21 pm
by zelnik44
Hi there.

Have just got adsense on my site and currently only have it entered into viewtopic and it shows after the first post.

Seems to be working ok, but my question is we have a moderators section that I would like it not to be able to have access to, how would I go about this?

Google bot can not access it etc so I'm confused how Adsense bot can?

Thank you

Re: Keeping Adsense out of parts of forum.

Posted: Sun Jul 20, 2008 4:31 pm
by pentapenguin
In your styles/prosilver/template/viewtopic_body.html you can use this code:

Code: Select all

<!-- IF FORUM_ID neq 7 -->
show ad code here
<!-- ENDIF -->
And replace 7 with the forum ID number of your moderator forum.

Topic moved to support

Re: Keeping Adsense out of parts of forum.

Posted: Sun Jul 20, 2008 4:34 pm
by stevemaury
And if you do not want the Adsense to crawl that forum, just remove the forum view permission from the Bots Group (or User Forum Permission from Adsense BOT).

Re: Keeping Adsense out of parts of forum.

Posted: Tue Jul 22, 2008 1:58 pm
by zelnik44
pentapenguin wrote:In your styles/prosilver/template/viewtopic_body.html you can use this code:

Code: Select all

<!-- IF FORUM_ID neq 7 -->
show ad code here
<!-- ENDIF -->
And replace 7 with the forum ID number of your moderator forum.

Topic moved to support
I wonder if you can help me?

1> where in viewtopic.body.html do i put this code, I've tried it after the original adsense entry and just put the forum number to 1 and cleared cache and it's still in all the sections.
2> How do i know which forum ID number is which?
3> Show add code here = the google adsense code I assume?

Thanks in advance.

Re: Keeping Adsense out of parts of forum.

Posted: Tue Jul 22, 2008 3:23 pm
by stevemaury
Pentapenguin's solution will remove ads from the Moderator's forum. My solution will leave ads there, but they will not be context specific (except to the forum title if that is viewable), since AdSense won't be able to see that forum.

Re: Keeping Adsense out of parts of forum.

Posted: Tue Jul 22, 2008 6:28 pm
by zelnik44
Hi Steve,

Thanks for the reply, I did try your method.

I got the user account up for adsense and from the pull down on the top right I selected forum permissions and changed it to "no access" and the bot is still able to read topics in that section as I can see it using the more advances who is online addon (it tells you what users are reading/replying to etc)

I'm sure it's something I'm doing wrong, i did purge the cache to double make sure it wasn't working.

Could you assist me any further? thanks

BTW: none of the other bots (google/yahoo) etc have access to the section so i'm confused how adsense does.