+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 14

Thread: How to place ads in phpbb3

  1. #1
    John is offline Administrator John has disabled reputation
    Join Date
    Sep 2005
    Posts
    504

    Default How to place ads in phpbb3

    How to place ads in phpbb3

    These direction were copied from - http://www.phpbb.com/community/viewt...3067&p=3152281

    If you are encountering errors, please ask for phpbb related support in that forum.



    OPEN viewtopic_body.html (/styles/prosilver/template)

    SEARCH FOR:

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

    <!-- IF postrow.S_FIRST_ROW == 2 -->
    <div class="post bg3">
    <div class="inner"><span class="corners-top"><span></span></span>

    <div align="center">
    REPLACE THIS WITH AD CODE
    </div>

    <span class="corners-bottom"><span></span></span></div>
    </div>
    <!-- ENDIF -->
    *Please make sure to update your phpbb3 cache after you make the changes.

  2. #2
    wired076 is offline Senior Member wired076 is on a distinguished road
    Join Date
    Nov 2005
    Location
    Wired
    Posts
    362

    Default

    This does work as I have done it on my forum at www.wired.profusehost.net/forum . I would suggest using a horizontal ad if you are going to place an ad or banner here. If using google adsense go for the leader board which is 728*90 as it will fit the best.

  3. #3
    studylot is offline Member studylot is on a distinguished road
    Join Date
    Nov 2007
    Posts
    88

    Default

    Hello john,
    Most of the forums now have 160x600 banner in the left or right side of them
    how can i put one of them in a forum like mine

    can you help me out with it or point me to some sites

  4. #4
    wired076 is offline Senior Member wired076 is on a distinguished road
    Join Date
    Nov 2005
    Location
    Wired
    Posts
    362

    Default

    Is your forum also a phpBB forum or does it use other software???

    If it is phpBB software have a look at this link http://www.phpbb.com/community/viewt...p?f=1&t=503964 .

    Good luck.

  5. #5
    borojim is offline Junior Member borojim is on a distinguished road
    Join Date
    Nov 2007
    Location
    'Yonder hill
    Posts
    4

    Default

    There are other places you can place them too such as viewforum_body.tpl just before <!-- END topicrow -->

    also indexbody.tpl just before <!-- END switch_user_logged_in -->
    there are a couple more that I have put in that seem to generate random ads in the same place depending when you visit them so you dont always get an ad when you go to the same page it kind of work every 2nd or 3rd visit but i have them in two or three more *_body.tpl files in various places including the index page between the main forum titles and the 'whose online# section I will post more when I write them all down
    these are also in the same directory as viewtopic_body
    Jimmy

  6. #6
    borojim is offline Junior Member borojim is on a distinguished road
    Join Date
    Nov 2007
    Location
    'Yonder hill
    Posts
    4

    Thumbs up You Lucky lucky people!! Perfect forum ads in 10 easy steps

    NO more do you need ads interupting your forum, or findding three rows of ads when there should be one!!

    After many tried I have found the best place to place your ad code (the 728 x 90 NOT the 160 x 600)

    1. open up you forum template folder and look for TWO files:

    one called:

    overall_header.tpl

    and the other

    overall_footer.tpl

    2. Create a BACKUP copy of these in case anything goes wrong!!

    3. Open up the first overall header with your editor and underneath this line:

    <body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
    4. Place the script from a 728 x 90 ad code script (your choice of back ground)

    a white background would be:

    5.
    <script language='JavaScript' type='text/javascript' src='http://ads2.psychz.net/adx.js'></script>
    <script language='JavaScript' type='text/javascript'>
    <!--
    if (!document.phpAds_used) document.phpAds_used = ',';
    phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

    document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
    document.write ("http://ads2.psychz.net/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:8");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
    //-->
    </script><noscript><a href='http://ads2.psychz.net/adclick.php?n=a477094b' target='_blank'><img src='http://ads2.psychz.net/adview.php?what=zone:8&amp;n=a477094b' border='0' alt=''></a></noscript>

    6. Upload that to your server and copy over the original, then to check to see if its working just open up your forum home page and run through a couple of posts, you should see the new ads AT THE TOP of ALL pages absolutly visible without interupting the flow of your site.

    Secondly the footer:

    7. Open up overall_footer.tpl and look for this line:

    Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>
    8. UNDERNEATH this line cut and paste this script:

    <script language='JavaScript' type='text/javascript' src='http://ads2.psychz.net/adx.js'></script>
    <script language='JavaScript' type='text/javascript'>
    <!--
    if (!document.phpAds_used) document.phpAds_used = ',';
    phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

    document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
    document.write ("http://ads2.psychz.net/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:24");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
    document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
    //-->
    </script><noscript><a href='http://ads2.psychz.net/adclick.php?n=ac3440ba' target='_blank'><img src='http://ads2.psychz.net/adview.php?what=zone:24&amp;n=ac3440ba' border='0' alt=''></a></noscript>
    9. Now upload to your server and copy over the original, then refresh the pages you opened earlier and scroll to the bottom of any page that you open and you will find the 'ads by google footer' underneath the 'powered by phb' message.

    10. Sit back and glow in the satisfaction of a job well done!( Iknow i said 10 but sit back you deserve it!)

  7. #7
    WorldAirliner is offline Junior Member WorldAirliner is on a distinguished road
    Join Date
    Nov 2006
    Posts
    5

    Default

    Guys,

    need some help here.. I've tried all the possible ways to have the ads code being displayed in PHPBB3, but none of them work !

    The code john placed isn't working and neither can I find the overall_header.tpl file. It's just not there !

    Any help here, since I need to activate ads on my forum as I don't want to risk it being suspended

    Sticky Rice

  8. #8
    WorldAirliner is offline Junior Member WorldAirliner is on a distinguished road
    Join Date
    Nov 2006
    Posts
    5

    Default

    Well i've finally found a solution and I highly recommend it for everyone using PHPBB3 !

    phpBB 3 View topic - [BETA] Ad Management

  9. #9
    wired076 is offline Senior Member wired076 is on a distinguished road
    Join Date
    Nov 2005
    Location
    Wired
    Posts
    362

    Default

    That is great to hear.

    Was good you figured it out for yourself.

    Good luck with learning out how to use the rest of phpBB3.

    It is great software and best of all it is free!

  10. #10
    ryku is offline Junior Member ryku is on a distinguished road
    Join Date
    Jan 2009
    Posts
    2

    Default please little more help

    I didn't find overall_header.tpl , i searched in all the phpbb3 diredtory but not one .tpl file pls i can't place the profusehost ads and i fear they just delete my forum !!

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Similar Threads

  1. phpBB3 Ads ?
    By pioneer in forum Web Hosting Support
    Replies: 2
    Last Post: 09-03-2009, 05:58 PM
  2. Auto Ad's with phpbb3
    By shrift in forum Web Hosting Support
    Replies: 1
    Last Post: 03-31-2009, 12:34 AM
  3. Cutenews & phpBB3
    By heritagerail in forum Tutorials
    Replies: 0
    Last Post: 01-12-2008, 07:15 PM
  4. phpbb3 discussion thread
    By shoes22 in forum Programming / Scripting / Coding Forum
    Replies: 5
    Last Post: 11-20-2007, 01:10 PM
  5. SEO Optimization for phpbb3
    By shoes22 in forum SEO - Search Engine Optimization
    Replies: 1
    Last Post: 07-31-2007, 11:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts