Keeping Adsense out of parts of forum.

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
zelnik44
Registered User
Posts: 40
Joined: Fri May 30, 2008 4:53 pm

Keeping Adsense out of parts of forum.

Post 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

User avatar
pentapenguin
Former Team Member
Posts: 11030
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Re: Keeping Adsense out of parts of forum.

Post 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
Support Resources: Support Request Template
If you need professional assistance with your board, please contact me for my reasonable rates.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51106
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Keeping Adsense out of parts of forum.

Post 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).
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

zelnik44
Registered User
Posts: 40
Joined: Fri May 30, 2008 4:53 pm

Re: Keeping Adsense out of parts of forum.

Post 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.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51106
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Keeping Adsense out of parts of forum.

Post 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.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

zelnik44
Registered User
Posts: 40
Joined: Fri May 30, 2008 4:53 pm

Re: Keeping Adsense out of parts of forum.

Post 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.

Locked

Return to “[3.0.x] Support Forum”