1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Adding Adsense to PHPBB

Discussion in 'vBulletin' started by NewComputer, Nov 8, 2004.

  1. #1
    Hello to any fellow PHPBB users. I would like to use vbulletin, but at this point phpbb being free is too good to pass up. Anyways, what I want to do is add my adsense code after the first post of any thread.

    I have scoured PHPBB forums etc... with no luck. Lots on how to add it to the header or footer, but nothing after the first post. I have seen this in other forums (eg. [nourl]http://www.techimo.com/forum/t126440.html[/nourl]

    Anyone have any thoughts on where or how I would do this?

    PS: Techimo uses vbulletin, but you get the idea...
     
    NewComputer, Nov 8, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    I know how to do it on vBulletin... does that help? :) It shouldn't be too hard with phpBB I wouldn't think.
     
    digitalpoint, Nov 8, 2004 IP
  3. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #3
    I'd be interested in knowing how to do that Shawn. I'm using VB 3.03. Can you PM me? If you don't have the time can you point me to a resource?

    Sorry NC, I'm not trying to highjack your thread. ;)
     
    ResaleBroker, Nov 8, 2004 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    In the postbit template, use this logic towards the end of it:

    <if condition="$post[postcount] % 10 == 1">
    Your AdSense code here...
    </if>
    Code (markup):
    That assumes you display 10 posts at a time. You could get fancy and look to see how many posts per page the user is set to see (in case they change the default), but I was lazy. You could also use the FIRSTPOST variable instead, but my way lets you put it after whatever post you want by setting the 1 to whatever you want.
     
    digitalpoint, Nov 8, 2004 IP
    kusadasi-guy and mrlynam like this.
  5. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Thanks Shawn. I appreciate the help. :)
     
    ResaleBroker, Nov 8, 2004 IP
  6. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #6
    I believe the two are similar, I have seen that code somewhere before. I would assume using <td> etc... to display would work as well? Or would you leave it and let the display be set to follow the threads?
     
    NewComputer, Nov 9, 2004 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    Not sure to be honest... it really depends on how phpBB generates and spits out the threads.
     
    digitalpoint, Nov 9, 2004 IP
  8. stephfoster

    stephfoster Well-Known Member

    Messages:
    567
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    138
    #8
    stephfoster, Nov 9, 2004 IP
  9. johncr

    johncr Peon

    Messages:
    127
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Search 'Banner AdSense After First Post' or 'Banner Ad After First Post' (I don't remember exactly) at phpBB. It works fine.
     
    johncr, Nov 11, 2004 IP
  10. kusadasi-guy

    kusadasi-guy Peon

    Messages:
    83
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
  11. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #11
    Thanks guys, I had found that thread a while ago, but I have had a buddy look at implementing for me. I am trying to figure the co op ad network...
     
    NewComputer, Nov 11, 2004 IP
  12. johncr

    johncr Peon

    Messages:
    127
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    It was tricky while under development. I don't remember the whole installation process, but there are two zip's find and read'em plus the whole thread. As far as I remember a database mod is required too.
     
    johncr, Nov 12, 2004 IP
  13. DarrenC

    DarrenC Peon

    Messages:
    3,386
    Likes Received:
    154
    Best Answers:
    0
    Trophy Points:
    0
    #13
    To install Adsense just find your overall header or overall footer files, and then enter the javascript code.

    These files are usually found in the template folder.

    It's simple!

    I've just added it to mine.

    Darren
     
    DarrenC, Nov 13, 2004 IP
  14. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #14
    Thanks WW,

    But my inquiry was actually for after the first post in a thread.
     
    NewComputer, Nov 13, 2004 IP
  15. Design1

    Design1 Active Member

    Messages:
    388
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    78
    #15
    Thanks for these posts! I was curious on how to do it but i just haven't gotten around to doing it or spending the time trying to figure it out. I appreciate it! :D
     
    Design1, Dec 11, 2004 IP
  16. joeychgo

    joeychgo Notable Member

    Messages:
    3,368
    Likes Received:
    321
    Best Answers:
    0
    Trophy Points:
    255
    #16
    actually - to ad adsense to VB - just add the adsense code to whatever template you want it to show, where you want it to show. You can add it almost anywhere.

    For example - to add it above the quick reply box - just look for $quickreply in your showthread template and insert the adsense code above $quickreply.

    Play with it.
     
    joeychgo, Dec 11, 2004 IP
  17. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,199
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #17
    I know this is an old thread but no one really gave you a solution.

    I finally found one on the net, check this thread I created out.
     
    dcristo, Jul 9, 2005 IP
  18. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #18

    What i did was a while ago install Extreme styles mod .. If you got that mod installed. Type the following code in your viewtopic_body.tpl template file
     
    crazyhorse, Jul 9, 2005 IP
  19. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,199
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #19
    There's no mods to install for this fix, you just have to edit the viewtopic.php and viewtopic_body.tpl files.
     
    dcristo, Jul 9, 2005 IP
  20. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #20
    OK didnt notice that. Well anyways i wanted to have the mod installed . It allows me to code php directly into my files through the forum admins section.
     
    crazyhorse, Jul 9, 2005 IP