Best plugin for Mybb forum

Discussion in 'Forum Management' started by habibpkck, Apr 8, 2013.

  1. #1
    Hi,
    Which plugin is best in mybb forum for adsense?
    any tip?
     
    habibpkck, Apr 8, 2013 IP
  2. terrymason

    terrymason Well-Known Member

    Messages:
    727
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    145
    #2
    I wouldn't waste my time with a plugin. Just go into your admin panel, then to

    Templates & Styles -> Templates -> your currently active template.
    Then, find a template where you'd like to place an ad, such as:
    Header Templates -> header

    Then add your google adsense code, surrounded by a div, like this:

    
     
    <div align="center" style="padding: 10px;">
    <script type="text/javascript"><!--
    google_ad_client = "xxxxxxxxxxxxxx";
    /* Forum 728x90 */
    google_ad_slot = "xxxxxxxxxxxx";
    google_ad_width = 728;
    google_ad_height = 90;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </div>
    
    Code (markup):


    If you really want to get fancy, you can install the mybb php template conditionals plugin, then use code like this

    
    <if $mybb->user['usergroup'] == '4' then>
    <div align="center" style="padding: 10px;">
    <script type="text/javascript"><!--
    google_ad_client = "xxxxxx";
    /* Forum 728x90 */
    google_ad_slot = "xxxxxxxxx";
    google_ad_width = 728;
    google_ad_height = 90;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </div>
    </if>
    
    Code (markup):
    that extra if statement means that the code will only be shown to guests - your members won't have to see see the ads.

    You can also install this code in your footer, as well as other templates.
     
    terrymason, Apr 11, 2013 IP