Bogotobogo
contact@bogotobogo.com
Bookmark and Share



phpbb and Adsense

amp logo


phpbb and Adsense

I've been running phpBB for my site discussion forums, and I tried to slip some advertising into forum posts for a while. Finally, I got it. Here is the code we can use.

phpbb styles

Your Ad Here


The files we need to edit can be located at [forum_name]/styles/prosilver/template.

  1. Header Ads
    If we want our ads in the header, we need to open overall_header.html and add our code at the very end of the file.

  2. Footer Ads
    We should locate the following line from overall_footer.html:
    <!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- 
    ENDIF -->
    
    Add ad code after that line.

  3. View forum page Ads
    If we want to place our ads in the view forum page that lists all the topics in that forum, open viewforum_body.html and add code after this line:
    <!-- INCLUDE overall_header.html -->
    



  4. Ads before/after the first post in a topic
    If we want tp place our ads either before/after the first post in a topic, we need to open viewtopic_body.html
    For ads before the first post, find the line below and add the code after this line:
    <!-- BEGIN postrow -->
    
    For ads after the first post, find the line below and add the code before this line:
    <!-- END postrow -->
    

  5. Blending Ads with the proSilver style
    We may want our ads to blend in with proSilver and have a nice blue background with rounded corner images, then we can use the following code in any template file where we want our ads to appear:
    <div class="panel">
       <div class="inner"><span class="corners-top"><span></span></span>
          <div class="content">
             <p style="text-align: center;">
                Our Ads here
             </p>
          </div>
       <span class="corners-bottom"><span></span></span></div>
    </div>
    

  6. We may need to Refresh:

    Refresh_phpbb

  7. Good Luck!




    1. List of PHP & MySQL Tutorials