[request] Google AdSense as Second Post

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
jazzking2001
Registered User
Posts: 424
Joined: Tue Jul 10, 2007 9:10 pm

[request] Google AdSense as Second Post

Post by jazzking2001 »

This hack adds a Google AdSense block as the second post in view topic. It's display can be fully customised by the community owner.

It creates the appearance of an actual post, but includes the Google AdSense code and lists Google as the poster. Other sorts of ad codes, images, text, etc. could be included in this block instead of the Google AdSense code.
this is the mod 4 phpbb2

can this b added 2 phpbb3

i really need this mod lol
this can help me get $ to support forum


******************Edit**********************
i have added it to my forum
just look around and you will see the ads under the 1st post
http://neocrisis.com/forum/
Last edited by jazzking2001 on Wed Feb 27, 2008 2:26 am, edited 1 time in total.
Neocrisis.com- What will you find next
User avatar
Dr.Death
Registered User
Posts: 400
Joined: Fri Apr 25, 2003 10:04 am
Location: Germany

Re: [request] Google AdSense as Second Post

Post by Dr.Death »

Hi,

herer a quick and dirty hack:

OPEN viewtopic_body.html

SEARCH FOR:

Code: Select all

<!-- END postrow --> 
ADD BEFOR:

Code: Select all

    <!-- IF postrow.S_FIRST_ROW == 2 -->
    <div class="post bg3">
        <div class="inner"><span class="corners-top"><span></span></span>
        
        <div align="center">
            <script type="text/javascript">
            <!--
                google_ad_client = "pub-3184063006790756";
                google_ad_width = 728;
                google_ad_height = 90;
                google_ad_format = "728x90_as";
                google_ad_type = "text";
                //2006-11-07: LPI-Clan
                google_ad_channel = "0814071977";
                google_color_border = "555555";
                google_color_bg = "555555";
                google_color_link = "E7E7E7";
                google_color_text = "CCCCCC";
                google_color_url = "E7E7E7";
            //-->
            </script>
            <script type="text/javascript"
               src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
            </script>
        </div>
        
        <span class="corners-bottom"><span></span></span></div>
    </div>
    <!-- ENDIF -->
You must change the line:

Code: Select all

  google_ad_client = "pub-3184063006790756";
to your assigned google account.

Also change the colors...... ;-)
Doc.
jazzking2001
Registered User
Posts: 424
Joined: Tue Jul 10, 2007 9:10 pm

Re: [request] Google AdSense as Second Post

Post by jazzking2001 »

i get this message
Parse error: parse error, unexpected '}' in /hsphere/local/home/jazzking/forum.neocrisis.com/phpBB3/includes/template.php(158) : eval()'d code on line 297
when i try 2 add it
Neocrisis.com- What will you find next
User avatar
playerfr
Registered User
Posts: 851
Joined: Fri Jul 18, 2003 9:50 am
Location: France - Paris

Re: [request] Google AdSense as Second Post

Post by playerfr »

will be better if it is as a last post of the topic
All kind of help for your Forums / Sites. Installing for you the forum, the Mods, creating Custom Mods : for small fee http://www.phpbbhelpers.com
User avatar
Dr.Death
Registered User
Posts: 400
Joined: Fri Apr 25, 2003 10:04 am
Location: Germany

Re: [request] Google AdSense as Second Post

Post by Dr.Death »

jazzking2001 wrote:i get this message
Parse error: parse error, unexpected '}' in /hsphere/local/home/jazzking/forum.neocrisis.com/phpBB3/includes/template.php(158) : eval()'d code on line 297
when i try 2 add it
You've forgotten the

Code: Select all

<!-- ENDIF --> 
Code....
Doc.
jazzking2001
Registered User
Posts: 424
Joined: Tue Jul 10, 2007 9:10 pm

Re: [request] Google AdSense as Second Post

Post by jazzking2001 »

it now works thz
i thought i copied it all lol
Neocrisis.com- What will you find next
wired076
Registered User
Posts: 1441
Joined: Mon May 21, 2007 10:19 am

Re: [request] Google AdSense as Second Post

Post by wired076 »

I tried this on my forum and it works great. Located at http://www.wired.profusehost.net/forum . If you are using code from Google Adsense use the 728*90 Horizontal ad which works best.
ktwiford
Registered User
Posts: 6
Joined: Mon Oct 17, 2005 12:12 am

Re: [request] Google AdSense as Second Post

Post by ktwiford »

I can't find any viewtopic_body.html

I did find a viewtopic_body.php and that did not work

Anything I am missing
wired076
Registered User
Posts: 1441
Joined: Mon May 21, 2007 10:19 am

Re: [request] Google AdSense as Second Post

Post by wired076 »

Yes you are looking in the wrong spot for phpBB 3 it is located in the styles folder and then for each style you have you need to edit each one separately by finding the viewtopic.html file in the templates folder within each style folder.

E.g. styles/prosilver/templates/
KFreewalt
Registered User
Posts: 16
Joined: Sat Jan 12, 2008 11:51 pm

Re: [request] Google AdSense as Second Post

Post by KFreewalt »

How do you modify the height of this inserted row?.. Its like three times taller than I want or need it to be.
User avatar
scanman20
Registered User
Posts: 157
Joined: Tue Oct 01, 2002 8:23 pm

Re: [request] Google AdSense as Second Post

Post by scanman20 »

Worked great thanks
Even a broken clock is right twice a day.
NotOneBit.com
jazzking2001
Registered User
Posts: 424
Joined: Tue Jul 10, 2007 9:10 pm

Re: [request] Google AdSense as Second Post

Post by jazzking2001 »

my site is using it
http://neocrisis.com/
look around the forum to see it
http://neocrisis.com/forum/
Neocrisis.com- What will you find next
blacksea
Registered User
Posts: 2
Joined: Wed Feb 13, 2008 1:33 pm

Re: [request] Google AdSense as Second Post

Post by blacksea »

some1 know why adsense dissapear after 1 more post? if is just 1 post adsense is present.. but if i make 1 more post its dissapear
jazzking2001
Registered User
Posts: 424
Joined: Tue Jul 10, 2007 9:10 pm

Re: [request] Google AdSense as Second Post

Post by jazzking2001 »

cant help ya
maybe you added the code wrong
i did once
Neocrisis.com- What will you find next
blacksea
Registered User
Posts: 2
Joined: Wed Feb 13, 2008 1:33 pm

Re: [request] Google AdSense as Second Post

Post by blacksea »

i found the problem ty:>

Return to “[3.0.x] MOD Requests”