1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Welcome to GadgetBit!

We are a community of technology enthusiats.

If you are already a registered member then you can login here

If you are new to the site then why not join up? It will only take a couple of minutes to register, by doing so all adverts will be removed from the site. You can register here or you can use your Facebook or Twitter account.

Advertisements in phpBB3

By Creaky · Oct 10, 2015 ·
Tags:
  1. Creaky
    One frequently asked question is how to add ads in phpBB3 Olympus. The short answer is very simple: start your favourite text editor and open the correct .html template file. But which template file? Here's the longer answer....

    First, open your favourite text editor and then....

    Ads in the header

    If you want ads in your header, open styles/prosilver/template/overall_header.html and add your code at the very end of the file.

    Ads in the footer

    If you want ads in your footer, open styles/prosilver/template/overall_footer.html

    Find:
    PHP:
    <!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
    Add your code after that line. You may need to include one or two <br /> to get line breaks (newlines) if you so desire.

    Important note: Check with your ad provider before you put your ads in the header or footer. Some providers (like Google AdSense) only allow ads on pages that have actual content like the view topic or view forum pages.

    Ads in view forum page

    If you want ads in the view forum page that lists all the topics in that forum, open styles/prosilver/template/viewforum_body.html and add your code after this line:
    PHP:
    <!-- INCLUDE overall_header.html -->
    Ads before or after the first post in a topic

    If you want ads either before or after the first post in a topic, open styles/prosilver/template/viewtopic_body.html

    For ads before the first post, find the line below and add the sample code after this line.


    PHP:
    <!-- BEGIN postrow -->
    For ads after the first post, find the line below and add the sample code before this line.
    PHP:
    <!-- END postrow -->
    Here is the sample ad code:
    PHP:
    <!-- IF postrow.S_FIRST_ROW -->

         <
    div class="post bg2">

          <
    div class="inner"><span class="corners-top"><span></span></span>



          <
    div class="postbody">

           <
    h3>{postrow.POST_SUBJECT}</h3>

           <
    class="author"><strong>Sponsor</strong></p>



           <
    div class="content" style="text-align: center;">

             
    Insert your ad code here

           
    </div>

          </
    div>

         

          <
    dl class="postprofile" id="profile0000">

           <
    dt>

             <
    strong>Sponsor</strong>

           </
    dt>



           <
    dd> </dd>

          </
    dl>

         

          <
    div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>

          <
    span class="corners-bottom"><span></span></span></div>

         </
    div>

         <
    hr class="divider" />

         <!-- ENDIF -->
    Of course, replace Insert your ad code here with the ad code your provider gives you.

    Ads that blend in with the proSilver style

    If you want your ads to blend in with proSilver and have a nice blue background with rounded corner images (note: this is not needed if you followed the instructions above for adding the advertisement before or after the first post in a topic), then use this code in any template file where you want your ads to appear:
    PHP:
    <div class="panel">

         <
    div class="inner"><span class="corners-top"><span></span></span>

          <
    div class="content">

           <
    p style="text-align: center;">

             
    Insert your ad code here

           
    </p>

          </
    div>

         <
    span class="corners-bottom"><span></span></span></div>

       </
    div>
    Of course, replace Insert your ad code here with the ad code your provider gives you.

    Enjoy!

    Share This Article