How to add the google adsense code in your 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.
Scam Warning

How to add the google adsense code in your forum?

Postby Luchtzak » Tue May 22, 2007 12:36 am

Looking for a good way to bring my google adsense code back in my brand new phpbb 3.0 forum, any suggestion on how to do this?

thanks,

Bart
Luchtzak
Registered User
 
Posts: 160
Joined: Sat Jul 20, 2002 7:13 pm

Re: How to add the google adsense code in your forum?

Postby bbrian017 » Tue May 22, 2007 12:40 am

Okay there are some files you will have to add code to and I will mention the ones that will generate you the best money for impressions :) Go to your forums directory and select the styles folder, and then prosilver assuming your using prosilver.


Open: viewforum_body.html

"FIRST"Find: <!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->

Add in new line Before: Google add code

Find: <!-- INCLUDE overall_footer.html -->

Add in new line before: Google add code

____________________________________________________________________________________________

Open: viewtopic_body.html

Find: <!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->

Add in new line Before: Google ad code

Find: <!-- INCLUDE overall_footer.html -->

Add in new line before: Google add code

____________________________________________________________________________________________

Open: ucp_footer.html

Find: <!-- INCLUDE overall_footer.html -->

Add in new line before: Google add code

____________________________________________________________________________________________

Open: ucp_header.html

Find: <h2>{L_UCP}</h2>

Add in new line Before: Google add code

____________________________________________________________________________________________

I will edit and add some more but this will keep you busy for a bit :) Remember to refresh your template files in the admin cp because if you don't, they won't appear :P

Okay here's another that will get you really great impressions :)

____________________________________________________________________________________________

Open: posting_layout.html

Find: <!-- IF TOPIC_TITLE -->

Add in new line before: Google ad code

Find: <!-- INCLUDE overall_footer.html -->

Add in new line before: Google add code
User avatar
bbrian017
Registered User
 
Posts: 720
Joined: Mon Mar 19, 2007 2:20 pm
Location: Canada

Re: How to add the google adsense code in your forum?

Postby FanShoot » Sun Jun 10, 2007 6:03 pm

Great advice!

The way you have them isnt to over powering either. Thanks for this Brian.
User avatar
FanShoot
Registered User
 
Posts: 75
Joined: Mon Jun 04, 2007 9:21 pm
Location: Minnesota.

Re: How to add the google adsense code in your forum?

Postby bbrian017 » Sun Jun 10, 2007 6:05 pm

This will increase your # of impressions and also increse your cost per click as a result :)
User avatar
bbrian017
Registered User
 
Posts: 720
Joined: Mon Mar 19, 2007 2:20 pm
Location: Canada

Re: How to add the google adsense code in your forum?

Postby antec » Mon Jun 11, 2007 12:50 pm

Can you tell us where they go? or show a screenshot?

Example

Code for banner in the header (I dont know if its the header)

Open: viewtopic_body.html

Find: <!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->

Add in new line Before: Google ad code

Find: <!-- INCLUDE overall_footer.html -->

Add in new line before: Google add code


Thanks
User avatar
antec
Registered User
 
Posts: 90
Joined: Thu Jun 07, 2007 1:58 pm

Re: How to add the google adsense code in your forum?

Postby bbrian017 » Tue Jun 19, 2007 2:24 am

I also want to add another point to this topic. When making your ads centered you must re align the forums after accordingly, NOTE this code will add a "Subsilver border" around your ads. Looks real nice :)

For example,


Code: Select all
<!-- IF not S_HIDE_ADS -->
    <div id="ysfi_ads" style="text-align:center; margin: 10px 0;">
       <div class="<!-- IF SCRIPT_NAME eq "viewtopic" -->navbar<!-- ELSE -->forumbg<!-- ENDIF -->" style="width:750px; margin:0 auto;">
            <div class="inner"><span class="corners-top"><span></span></span>
                <div align="center">

<script type="text/javascript"><!--
google_ad_client = "pub-4639496444672477";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "0D96DA";
google_color_bg = "D4E1EC";
google_color_link = "FFFFFF";
google_color_text = "FFFFFF";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

            <span class="corners-bottom"><span></span></span></div>
        </div>
    </div><div align="left">
    <!-- ENDIF -->


When I centered the ad, the forums also centered

Code: Select all
<div align="center">


so I off set this action by adding this

Code: Select all
<div align="left">


I hope this helps :) This is in the index_body.html

example add.jpg


bottom half of the page also has an add :)

ottom half.jpg
User avatar
bbrian017
Registered User
 
Posts: 720
Joined: Mon Mar 19, 2007 2:20 pm
Location: Canada

Better way

Postby Turboxgt » Thu Jun 28, 2007 2:06 am

Turboxgt
Registered User
 
Posts: 2
Joined: Thu Jun 28, 2007 1:51 am

Re: How to add the google adsense code in your forum?

Postby bbrian017 » Thu Jun 28, 2007 2:09 am

that was verry nice of you
User avatar
bbrian017
Registered User
 
Posts: 720
Joined: Mon Mar 19, 2007 2:20 pm
Location: Canada

Re: How to add the google adsense code in your forum?

Postby martingr » Thu Jun 28, 2007 11:12 am

Thank yo so much, bbrian017.

I have used your modifications on my forum http://www.golfutstyr.no. But I would also like to ad adsense on the index page (mainpage, landing page) between header and forum. How can I do this?

Again; thank you!

Best regards,
Martin,
Norway
martingr
Registered User
 
Posts: 2
Joined: Tue Jun 26, 2007 2:06 pm

Re: How to add the google adsense code in your forum?

Postby go99live » Fri Jul 13, 2007 4:21 pm

really very useful ;)
go99live
Registered User
 
Posts: 206
Joined: Mon May 01, 2006 7:18 pm

Re: How to add the google adsense code in your forum?

Postby bbrian017 » Fri Jul 13, 2007 4:58 pm

cheers
User avatar
bbrian017
Registered User
 
Posts: 720
Joined: Mon Mar 19, 2007 2:20 pm
Location: Canada

Re: How to add the google adsense code in your forum?

Postby photosa » Wed Jul 18, 2007 10:52 am

You said
"Remember to refresh your template files in the admin cp because if you don't, they won't appear"


How/where do you do that?
photosa
Registered User
 
Posts: 136
Joined: Wed Mar 23, 2005 2:35 pm
Location: South Africa

Re: How to add the google adsense code in your forum?

Postby bbrian017 » Wed Jul 18, 2007 11:46 am

admin cp -> styles -> Templates , Themes and Imagesets
User avatar
bbrian017
Registered User
 
Posts: 720
Joined: Mon Mar 19, 2007 2:20 pm
Location: Canada

Re: How to add the google adsense code in your forum?

Postby Phil » Wed Jul 18, 2007 1:19 pm

There is also a "purge cache" button on the homepage of the ACP.
Moving on, with the wind. | My Corner of the Web
User avatar
Phil
Former Team Member
 
Posts: 10402
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm

Re: How to add the google adsense code in your forum?

Postby nsfx84 » Tue Aug 21, 2007 5:12 pm

guys i cant get it to work. here are my google codes

<script type="text/javascript"><!--
google_ad_client = "pub-0886117832185077";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-08-21: site.com
google_ad_channel = "7694908866";
google_color_border = "FFFFFF";
google_color_bg = "000000";
google_color_link = "CC0000";
google_color_text = "FFFFFF";
google_color_url = "FFCC66";
google_ui_features = "rc:10";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

I followed the instructions and all but it still wouldn't work. Do i need a line spacing after and before the codes?? I refreshed my theme as well. Do i have to wait for while for the ads to appear? there's totally nothing on my site except the forum at the moment. No signs of any ads :(
nsfx84
Registered User
 
Posts: 14
Joined: Tue Jul 24, 2007 4:04 am

Next

Return to 3.0.x Support Forum

Who is online

Users browsing this forum: Bing [Bot], lappert, Marshalrusty, omgili [Bot], Oyabun1, Yandex [Bot] and 63 guests